* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-black: #0a0a0f;
    --secondary-black: #14141f;
    --primary-blue: #1e3a8a;
    --secondary-blue: #2563eb;
    --dark-blue: #1e1b4b;
    --primary-purple: #5b21b6;
    --secondary-purple: #7c3aed;
    --accent-purple: #a78bfa;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --card-bg: rgba(20, 20, 31, 0.8);
    --card-border: rgba(123, 58, 237, 0.3);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--primary-black) 0%, var(--dark-blue) 50%, var(--primary-black) 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

.site-footer {
    margin-top: 3rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--card-border);
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.6), rgba(91, 33, 182, 0.6));
    backdrop-filter: blur(8px);
    color: var(--text-secondary);
}

.site-footer .footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.site-footer a {
    color: var(--accent-purple);
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.navbar {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.9), rgba(91, 33, 182, 0.9));
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--card-border);
    box-shadow: 0 4px 20px rgba(123, 58, 237, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-icon {
    display: none; /* old emoji icon hidden */
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* New gradient logo badge */
.logo-badge {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: conic-gradient(from 180deg at 50% 50%, #7c3aed, #2563eb, #a78bfa, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 0 20px rgba(167, 139, 250, 0.45), inset 0 0 12px rgba(0,0,0,0.35);
    border: 2px solid rgba(167, 139, 250, 0.35);
    overflow: hidden;
}

.logo-badge::after {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: 10px;
    background: radial-gradient(120px 60px at 30% 20%, rgba(255,255,255,0.15), transparent 60%),
                radial-gradient(120px 60px at 70% 80%, rgba(255,255,255,0.08), transparent 60%);
}

.logo-badge span {
    position: relative;
    font-weight: 800;
    letter-spacing: 0.5px;
    font-size: 0.95rem;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.35);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-toggle {
    display: none;
    background: rgba(167, 139, 250, 0.15);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 0.6rem 0.9rem;
    font-size: 1.25rem;
    cursor: pointer;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.75rem 0;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    display: inline-block;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--secondary-blue), var(--secondary-purple));
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active {
    color: var(--text-primary);
}

.nav-link.active::after {
    width: 100%;
    background: linear-gradient(90deg, var(--secondary-purple), var(--accent-purple));
}

.container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.user-header {
    display: flex;
    gap: 2rem;
    align-items: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.6), rgba(91, 33, 182, 0.6));
    border-radius: 20px;
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.user-header:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(123, 58, 237, 0.4);
}

.user-avatar {
    position: relative;
}

.avatar-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary-blue), var(--secondary-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    box-shadow: 0 0 30px rgba(167, 139, 250, 0.6);
    animation: float 3s ease-in-out infinite;
    border: 4px solid rgba(167, 139, 250, 0.3);
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.user-info h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    cursor: pointer;
}

.editable-name:hover {
    opacity: 0.8;
}

.editable-name:focus {
    outline: 2px solid var(--accent-purple);
    outline-offset: 4px;
    border-radius: 8px;
}

.user-title {
    color: var(--accent-purple);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.user-stats {
    display: flex;
    gap: 2rem;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
}

.stat:hover {
    transform: scale(1.05);
    background: rgba(167, 139, 250, 0.2);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.stat-value {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: bold;
}

.xp-container {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 15px;
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
}

.xp-bar-wrapper {
    width: 100%;
    height: 30px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

.xp-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-blue), var(--secondary-purple), var(--accent-purple));
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
    border-radius: 15px;
    transition: width 0.5s ease;
    box-shadow: 0 0 20px rgba(167, 139, 250, 0.6);
}

@keyframes shimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.xp-text {
    text-align: center;
    color: var(--text-secondary);
    font-weight: 600;
}

.card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(123, 58, 237, 0.3);
    border-color: var(--accent-purple);
}

.card h3 {
    margin-bottom: 1rem;
    color: var(--accent-purple);
    font-size: 1.3rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(167, 139, 250, 0.2);
    transform: scale(1.05);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary-blue), var(--secondary-purple));
    color: white;
    box-shadow: 0 4px 15px rgba(123, 58, 237, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(123, 58, 237, 0.5);
}

.btn-secondary {
    background: rgba(167, 139, 250, 0.2);
    color: var(--text-primary);
    border: 1px solid var(--accent-purple);
}

.btn-secondary:hover {
    background: rgba(167, 139, 250, 0.3);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #059669, #10b981);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 2rem;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.input {
    width: 100%;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.input:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 15px rgba(167, 139, 250, 0.4);
}

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: linear-gradient(135deg, var(--secondary-black), var(--dark-blue));
    margin: 5% auto;
    padding: 2rem;
    border: 2px solid var(--card-border);
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 8px 40px rgba(123, 58, 237, 0.4);
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close {
    color: var(--text-secondary);
    float: right;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close:hover {
    color: var(--danger);
    transform: scale(1.2);
}

.notification-container {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.notification {
    background: linear-gradient(135deg, var(--secondary-blue), var(--secondary-purple));
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(123, 58, 237, 0.5);
    animation: slideInRight 0.5s ease, fadeOut 0.5s ease 2.5s;
    min-width: 300px;
    border: 1px solid var(--accent-purple);
}

@keyframes slideInRight {
    from { transform: translateX(400px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
    to { opacity: 0; transform: translateX(400px); }
}

.assignments-grid, .exams-grid, .grades-grid, .quests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.assignment-card, .exam-card, .grade-card, .quest-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
}

.assignment-card:hover, .exam-card:hover, .grade-card:hover, .quest-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(123, 58, 237, 0.3);
    border-color: var(--accent-purple);
}

.priority-badge, .difficulty-badge, .status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.priority-low { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.priority-medium { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.priority-high { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.priority-urgent { background: rgba(220, 38, 38, 0.3); color: #dc2626; animation: pulse 1.5s ease-in-out infinite; }
/* Difficulty-specific badges for exams */
.priority-easy { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.priority-hard { background: rgba(239, 68, 68, 0.2); color: #ef4444; }

.timer-display {
    font-size: 4rem;
    text-align: center;
    font-weight: bold;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 2rem 0;
    font-family: 'Courier New', monospace;
}

.timer-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.study-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.shop-item {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
}

.shop-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(123, 58, 237, 0.4);
    border-color: var(--accent-purple);
}

.item-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 10px rgba(167, 139, 250, 0.6));
}

.coin-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-purple);
}

.coin-icon {
    font-size: 2rem;
    animation: spin 3s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.quest-progress {
    width: 100%;
    height: 20px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    overflow: hidden;
    margin: 1rem 0;
}

.quest-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--success), #34d399);
    transition: width 0.5s ease;
    border-radius: 10px;
}

.activity-list {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    margin-bottom: 0.75rem;
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
}

.activity-item:hover {
    background: rgba(167, 139, 250, 0.2);
    transform: translateX(5px);
}

/* Grades page spacing */
.gpa-card {
    margin-bottom: 1.5rem;
}

.activity-icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 10px rgba(167, 139, 250, 0.4));
}

.nav-avatar {
    font-size: 1.2rem;
    margin-right: 0.25rem;
}

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
}

.auth-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 3rem;
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    max-width: 500px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header .logo-badge {
    margin: 0 auto 1rem;
}

.auth-header h1 {
    font-size: 2rem;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-secondary);
}

.auth-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.auth-tab {
    flex: 1;
    padding: 0.75rem;
    background: rgba(167, 139, 250, 0.1);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 600;
}

.auth-tab.active {
    background: linear-gradient(135deg, var(--secondary-blue), var(--secondary-purple));
    color: var(--text-primary);
    border-color: var(--accent-purple);
}

.auth-tab:hover:not(.active) {
    background: rgba(167, 139, 250, 0.2);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.auth-form h2 {
    margin-bottom: 1.5rem;
    color: var(--accent-purple);
}

.error-message {
    color: var(--danger);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    min-height: 20px;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.profile-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.avatar-circle.large {
    width: 150px;
    height: 150px;
    font-size: 4rem;
}

.profile-info label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    margin-top: 1rem;
}

.profile-info label:first-of-type {
    margin-top: 0;
}

.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.badge-item {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
}

.badge-item:hover {
    transform: scale(1.05);
    background: rgba(167, 139, 250, 0.2);
    border-color: var(--accent-purple);
}

.badge-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 0 10px rgba(167, 139, 250, 0.6));
}

.badge-name {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.inventory-item {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
}

.inventory-item:hover {
    transform: translateY(-3px);
    border-color: var(--accent-purple);
}

.inventory-item-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.inventory-item h4 {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.profile-actions {
    text-align: center;
    margin-top: 2rem;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.event-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(123, 58, 237, 0.3);
    border-color: var(--accent-purple);
}

.event-date {
    color: var(--accent-purple);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.event-title {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.event-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.event-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.event-detail {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.event-type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(167, 139, 250, 0.2);
    color: var(--accent-purple);
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
}

.leaderboard-item:hover {
    background: rgba(167, 139, 250, 0.2);
    transform: translateX(5px);
}

.leaderboard-rank {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--accent-purple);
    min-width: 30px;
}

.leaderboard-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary-blue), var(--secondary-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.leaderboard-info {
    flex: 1;
}

.leaderboard-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.leaderboard-stats {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.dashboard-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.emoji-picker {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 0.5rem;
}

.emoji-option {
    font-size: 2rem;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-align: center;
}

.emoji-option:hover {
    background: rgba(167, 139, 250, 0.3);
    transform: scale(1.1);
}

.avatar-upload-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--card-border);
}

@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        right: 1rem;
        top: 70px;
        background: linear-gradient(135deg, rgba(30, 58, 138, 0.97), rgba(91, 33, 182, 0.97));
        border: 1px solid var(--card-border);
        border-radius: 12px;
        padding: 0.75rem;
        flex-direction: column;
        gap: 0.25rem;
        display: none;
        box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    }
    .nav-links.open { display: flex; }
    .nav-toggle { display: inline-block; }
    
    .user-header {
        flex-direction: column;
        text-align: center;
    }
    
    .dashboard-grid, .study-container, .dashboard-grid-2 {
        grid-template-columns: 1fr;
    }

    .emoji-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .events-grid {
        grid-template-columns: 1fr;
    }
}
