/* User Account Page Styles */
.account-layout {
    display: flex;
    gap: 0;
}

/* Account Sidebar */
.account-sidebar {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 2rem 1.25rem 1.25rem;
    margin-bottom: 1.5rem;
}
.account-sidebar .sidebar-title {
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    color: rgba(255,255,255,0.3);
}
.account-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    width: 100%;
    font-size: 0.95em;
}
.account-sidebar li {
    margin-bottom: 0.75rem;
    font-size: 0.95em;
    color: rgba(255,255,255,0.45);
    cursor: pointer;
    transition: color .2s;
    display: flex;
    align-items: center;
    border-radius: 8px;
    padding: 0.3rem 0.5rem;
}
.account-sidebar li.active, .account-sidebar li:hover {
    color: #f0eeff;
    background: rgba(255,255,255,0.04);
}
.account-sidebar i {
    margin-right: 10px;
    font-size: 1em;
    color: rgba(255,255,255,0.3);
    transition: color .2s;
    width: 16px;
    text-align: center;
}
.account-sidebar li.active i, .account-sidebar li:hover i {
    color: #ff3afd;
}
.account-sidebar .logout a{
    margin-top: 1.5rem;
    color: rgba(255,77,79,0.8);
    font-weight: 600;
    cursor: pointer;
    transition: color .2s;
    text-decoration:none;
}
.account-sidebar .logout a:hover { color: #ff4d4f; }

.account-main {
    background: rgba(255,255,255,0.03);
    color: #eef4fb;
    padding: 2rem;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
}
.account-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2.2rem;
}
.account-points {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.45rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.2), rgba(249, 115, 22, 0.2));
    border: 1px solid rgba(251, 146, 60, 0.3);
    border-radius: 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fb923c;
}
.account-points i {
    color: #fb923c;
}

.account-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,0.12);
    margin-bottom: 1rem;
}
.account-profile-name {
    font-size: 1.35em;
    font-weight: 800;
    color: #f0eeff;
    margin-bottom: 0.2rem;
    letter-spacing: -0.02em;
}
.account-profile-location {
    font-size: 0.9em;
    color: rgba(255,255,255,0.45);
    margin-bottom: 1rem;
}
.account-form {
    margin-bottom: 2.2rem;
}
.account-form .form-label {
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    margin-bottom: 4px;
}

/* Input group for social links */
.account-info-input-group {
    display: flex;
}
.account-info-input-group span{
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}
.account-info-input-group input {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}



.account-save-btn {
    margin-top: 1.2rem;
    width: 100%;
    background: #2563eb;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(37,99,235,0.5);
    padding: 11px 0;
    transition: background 0.2s;
}
.account-save-btn:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
}
.account-save-btn[disabled], .account-save-btn:disabled {
    background: rgba(255,255,255,0.05) !important;
    color: rgba(255,255,255,0.25) !important;
    border-color: rgba(255,255,255,0.08) !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
}
#accountMenu {
    margin-bottom: 0;
}

.account-quiz-card {
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 1rem;
    color: #eef4fb;
}
.account-quiz-header {
    font-size: 0.97em;
    font-weight: 600;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: #f0eeff;
}
.account-quiz-meta {
    font-size: 0.85em;
    color: rgba(255,255,255,0.4);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
}
.account-quiz-actions .btn {
    margin-right: 0.5rem;
}
.avatar-upload-label:hover {
    background: #18182a;
    box-shadow: 0 4px 12px rgba(64,150,255,0.18);
}
.account-avatar-wrapper {
    position: relative;
    display: inline-block;
}

/* === REWARDS STYLES === */
.rewards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}
.reward-box {
    background: linear-gradient(135deg, rgba(37,99,235,0.08), rgba(29,78,216,0.05));
    border: 2px solid rgba(37,99,235,0.3);
    border-radius: 1.2rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: visible;
    z-index: 0;
}
.reward-box.unopened {
    border-color: #fbbf24;
    background: linear-gradient(135deg, rgba(251,191,36,0.12), rgba(245,158,11,0.08));
    animation: pulse-glow 2s infinite;
}
.reward-box.opened {
    border-color: rgba(100,116,139,0.3);
    background: rgba(30,41,59,0.4);
    cursor: default;
}
.reward-box:not(.opened):hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(37,99,235,0.25);
}
.reward-box-icon {
    width: 200px;
    height: 200px;
    margin: 0 auto 1rem;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}
.reward-box-type {
    font-size: 1.1em;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
}
.reward-box-event {
    font-size: 0.9em;
    color: #a2b6e1;
    margin-bottom: 0.8rem;
}
.reward-box-btn {
    padding: 0.6rem 1.5rem;
    border-radius: 0.6rem;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.reward-box-btn.open-btn {
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    color: #000;
}
.reward-box-btn.open-btn:hover {
    background: linear-gradient(90deg, #f59e0b, #d97706);
    box-shadow: 0 4px 12px rgba(251,191,36,0.4);
}
.reward-item {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 1rem;
    transition: border-color 0.2s, background 0.2s;
}
.reward-item:hover {
    border-color: rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.05);
}
.reward-item-icon {
    width: 60px;
    height: 60px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
}
.reward-item-details {
    flex: 1;
    text-align: left;
}
.reward-item-type {
    font-size: 1em;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.3rem;
}
.reward-item-value {
    font-size: 0.95em;
    color: #a2b6e1;
}
.reward-item-value.blurred {
    user-select: none;
    cursor: pointer;
    letter-spacing: 0.15em;
}
.reward-item-reveal-btn {
    padding: 0.5rem 1rem;
    background: rgba(37,99,235,0.2);
    border: 1px solid rgba(37,99,235,0.4);
    border-radius: 0.5rem;
    color: #60a5fa;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.reward-item-reveal-btn:hover {
    background: rgba(37,99,235,0.3);
    border-color: rgba(37,99,235,0.6);
}
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(251,191,36,0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(251,191,36,0.5);
    }
}

/* === NEW OPENING ANIMATION: Icon Shake & Burst === */
@keyframes icon-shake {
    0% { 
        transform: scale(1) rotate(0deg); 
        filter: brightness(1) drop-shadow(0 0 5px rgba(251,191,36,0.3));
        opacity: 1;
    }
    10% { transform: scale(1.05) rotate(-3deg); opacity: 1; }
    20% { transform: scale(1.1) rotate(3deg); opacity: 1; }
    30% { transform: scale(1.08) rotate(-3deg); opacity: 1; }
    40% { transform: scale(1.12) rotate(3deg); opacity: 1; }
    50% { 
        transform: scale(1.1) rotate(-2deg); 
        filter: brightness(1.3) drop-shadow(0 0 15px rgba(251,191,36,0.6));
        opacity: 1;
    }
    60% { transform: scale(1.14) rotate(2deg); opacity: 1; }
    70% { transform: scale(1.12) rotate(-2deg); opacity: 1; }
    80% { 
        transform: scale(1.15) rotate(0deg); 
        filter: brightness(1.5) drop-shadow(0 0 20px rgba(251,191,36,0.8));
        opacity: 1;
    }
    85% { 
        transform: scale(1.18) rotate(0deg); 
        filter: brightness(1.8) drop-shadow(0 0 25px rgba(251,191,36,1));
        opacity: 1;
    }
    /* BURST - very fast scale up and fade out */
    90% { 
        transform: scale(1.5) rotate(0deg); 
        filter: brightness(2) drop-shadow(0 0 30px rgba(251,191,36,1));
        opacity: 1;
    }
    97% { 
        transform: scale(2.3) rotate(0deg); 
        opacity: 0.3;
    }
    100% { 
        transform: scale(2.8) rotate(0deg); 
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes particle-burst {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: var(--particle-end) scale(0);
        opacity: 0;
    }
}

.reward-box-icon.opening {
    animation: icon-shake 1.2s ease-in-out forwards;
}

.reward-box.opening {
    pointer-events: none;
}

.reward-box.opening .reward-box-type,
.reward-box.opening .reward-box-event,
.reward-box.opening button {
    opacity: 0.3;
    transition: opacity 0.3s;
}

.particle {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    pointer-events: none;
    animation: particle-burst 0.8s ease-out forwards;
    box-shadow: 0 0 10px currentColor;
    z-index: 0;
}

.reward-box {
    position: relative;
    z-index: 1;
}

.reward-box-icon {
    position: relative;
    z-index: 2;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ========== ACC HEADER (MY ACCOUNT PAGE) ========== */
.acc-header { padding: 2.75rem 0 2rem; border-bottom: 1px solid rgba(255,255,255,0.06); margin-bottom: 2.5rem; }
.acc-header h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -0.03em; color: #f0eeff; line-height: 1.1; margin-bottom: 0.35rem; }
.acc-header h1 em { font-style: normal; color: #ff3afd; }
.acc-header p { color: rgba(255,255,255,0.6); font-size: 0.95rem; margin: 0; }

/* ========== UP SECTION BAR (USER PROFILE PAGE) ========== */
.up-section-bar { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.5rem; }
.up-section-bar-pip { width: 3px; height: 1.1rem; background: #ff3afd; border-radius: 2px; flex-shrink: 0; }
.up-section-bar-label { font-size: 1rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.16em; color: rgba(255,255,255,0.35); white-space: nowrap; }
.up-section-bar-label em { font-style: normal; color: #ff3afd; }
.up-section-bar::after { content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.06); }
.up-section-bar .btn-sm { font-size: 0.75rem; color: rgba(255,255,255,0.4); border-color: rgba(255,255,255,0.12); padding: 0.2rem 0.65rem; }
.up-section-bar .btn-sm:hover { color: #f0eeff; border-color: rgba(255,255,255,0.35); background: rgba(255,255,255,0.04); }

/* ========== PROFILE CARD CONTENT (USER PROFILE + CONTENT PAGES) ========== */
.up-profile-name { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; letter-spacing: -0.03em; color: #f0eeff; line-height: 1.15; margin: 0 0 0.3rem; }
.up-profile-name em { font-style: normal; color: #ff3afd; }
.up-profile-username { font-size: 0.9rem; color: rgba(255,255,255,0.38); margin: 0 0 0.6rem; }
.up-profile-bio { font-size: 0.95rem; color: rgba(255,255,255,0.6); margin: 0; }

/* ========== BACK LINK (USER CONTENT PAGE) ========== */
.up-content-back { display: inline-flex; align-items: center; color: rgba(255,255,255,0.38); font-size: 0.85rem; text-decoration: none; margin-bottom: 1.5rem; transition: color 0.18s; gap: 0.4rem; }
.up-content-back:hover { color: #f0eeff; }

/* ========== USER PANEL (USER PROFILE PAGE) ========== */
.user-panel {
    padding: 2.5rem 0 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}