:root {
    --ferrari-red: #DC0000;
    --ferrari-red-hover: #B80000;
    --ferrari-red-light: #ffebee;
    
    --primary-color: #DC0000;
    --primary-hover: #B80000;
    --secondary-color: #DC0000;
    --danger-color: #6c757d;
    --success-color: #28a745;
    
    --bg-light: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f1f3f5;
    --bg-card: #ffffff;
    --bg-card-hover: #f8f9fa;
    --bg-nav: #ffffff;
    --bg-sidebar: #ffffff;
    
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-muted: #adb5bd;
    
    --border-color: #e9ecef;
    --border-color-dark: #dee2e6;
    
    --border-radius: 16px;
    --border-radius-small: 12px;
    --spacing: 20px;
    
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-large: 0 8px 24px rgba(0, 0, 0, 0.15);
    
    --sidebar-width: 260px;
}

/* DARK MODE */
[data-theme="dark"] {
    --bg-light: #121212;
    --bg-secondary: #1e1e1e;
    --bg-tertiary: #2a2a2a;
    --bg-card: #1e1e1e;
    --bg-card-hover: #2a2a2a;
    --bg-nav: #1e1e1e;
    --bg-sidebar: #1e1e1e;
    
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --text-muted: #707070;
    
    --border-color: #333333;
    --border-color-dark: #444444;
    
    --ferrari-red-light: #3d1111;
    
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-large: 0 8px 24px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] body {
    background: #121212;
    color: var(--text-primary);
}

[data-theme="dark"] .topbar {
    background: #ff3131;
    border-bottom-color: rgba(255,255,255,0.2);
}

[data-theme="dark"] .sidebar {
    background: #ff3131;
    border-right-color: rgba(255,255,255,0.2);
}

[data-theme="dark"] .card {
    background: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .leaderboard-item,
[data-theme="dark"] .feed-item,
[data-theme="dark"] .news-item,
[data-theme="dark"] .project-card,
[data-theme="dark"] .group-card,
[data-theme="dark"] .user-card,
[data-theme="dark"] .friend-card,
[data-theme="dark"] .incoming-request-card {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .messages-area {
    background: #151515;
}

[data-theme="dark"] .message-bubble.message-received {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .login-card {
    background: var(--bg-card);
    color: var(--text-primary);
}

[data-theme="dark"] .champion-banner {
    background: linear-gradient(135deg, #cc0000, #ff4444);
}

[data-theme="dark"] .profile-banner-bg {
    background: linear-gradient(135deg, #cc0000, #ff4444, #cc0000);
}

/* Fix text readability in dark mode */
[data-theme="dark"] .feed-text,
[data-theme="dark"] .feed-user,
[data-theme="dark"] .news-item-title,
[data-theme="dark"] .project-card-title,
[data-theme="dark"] .group-card-name,
[data-theme="dark"] .username,
[data-theme="dark"] .user-card .username,
[data-theme="dark"] .leaderboard-item .username,
[data-theme="dark"] .incoming-request-name,
[data-theme="dark"] .friend-name,
[data-theme="dark"] .conversation-name,
[data-theme="dark"] .chat-user-name,
[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3, [data-theme="dark"] h4 {
    color: var(--text-primary);
}

[data-theme="dark"] .page-subtitle,
[data-theme="dark"] .card-subtitle,
[data-theme="dark"] .feed-time,
[data-theme="dark"] .news-item-body,
[data-theme="dark"] .project-card-desc,
[data-theme="dark"] .group-card-desc,
[data-theme="dark"] .user-card-bio {
    color: var(--text-secondary);
}

[data-theme="dark"] .post-tag,
[data-theme="dark"] .filter-pill,
[data-theme="dark"] .news-cat-btn,
[data-theme="dark"] .role-tag,
[data-theme="dark"] .tab-btn {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .stat-row {
    color: var(--text-primary);
}

[data-theme="dark"] .status-card,
[data-theme="dark"] .post-card,
[data-theme="dark"] .search-card {
    background: var(--bg-card);
    color: var(--text-primary);
}

[data-theme="dark"] .conversations-sidebar {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .conversations-header {
    background: var(--bg-card);
}

[data-theme="dark"] .conversation-item:hover,
[data-theme="dark"] .conversation-item.active {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .friend-bonus-hint {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .setting-label,
[data-theme="dark"] .setting-value {
    color: var(--text-primary);
}

[data-theme="dark"] .modal-content {
    background: var(--bg-card);
    color: var(--text-primary);
}

[data-theme="dark"] .stats-row .stat-card {
    background: var(--bg-secondary);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
}

/* ==================== LANDING PAGE ==================== */
.center-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.landing-container {
    width: 100%;
    max-width: 700px;
}

.hero-section {
    text-align: center;
    background: white;
    padding: 60px 40px;
    border-radius: 24px;
    box-shadow: var(--shadow-large);
}

.logo-container {
    margin-bottom: 20px;
}

.logo {
    font-size: 5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--ferrari-red), #ff4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    letter-spacing: -2px;
}

.logo-subtitle {
    font-size: 3rem;
    animation: flame 1.5s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(220, 0, 0, 0.3));
}

.tagline {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-weight: 400;
}

.feature-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 40px;
}

.pill {
    background: var(--bg-secondary);
    padding: 10px 20px;
    border-radius: 24px;
    font-size: 0.9rem;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 500;
}

.stats-preview {
    display: flex;
    gap: 60px;
    justify-content: center;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid var(--border-color);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--ferrari-red);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 5px;
}

/* ==================== CARDS ==================== */
.card {
    background: var(--bg-card);
    padding: 14px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    width: 100%;
    border: 1px solid var(--border-color);
}

.card:hover {
    box-shadow: var(--shadow-hover);
    border-color: var(--border-color-dark);
}

.card h2 {
    margin-bottom: 8px;
    font-size: 1rem;
}

.card h3 {
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.card-subtitle {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.login-card {
    max-width: 450px;
    margin: 0 auto;
    background: #ff3131 !important;
    border: none;
    box-shadow: 0 8px 32px rgba(255, 49, 49, 0.4);
}

/* Make login card text white */
.login-card h2,
.login-card .subtitle,
.login-card .form-switch,
.login-card .input-hint {
    color: white !important;
}

.login-card .form-switch a {
    color: white;
    text-decoration: underline;
    font-weight: 700;
}

.login-card input[type="text"],
.login-card input[type="email"],
.login-card input[type="password"] {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid white;
    color: #212529;
}

.login-card input[type="text"]:focus,
.login-card input[type="email"]:focus,
.login-card input[type="password"]:focus {
    background: white;
    border-color: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.login-card .checkbox-label {
    color: white;
}

.login-card .error-message {
    color: white;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 8px;
}

/* Login card buttons - white with red text */
.login-card .btn {
    background: white;
    color: #ff3131;
    border: 2px solid white;
    font-weight: 700;
}

.login-card .btn:hover {
    background: rgba(255, 255, 255, 0.9);
    color: #ff3131;
    transform: translateY(-2px);
}

.card-header {
    margin-bottom: 30px;
    text-align: center;
}

.card-header h2 {
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 1.8rem;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.back-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 20px;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--ferrari-red);
}

.form-switch {
    text-align: center;
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-switch a {
    color: var(--ferrari-red);
    text-decoration: none;
    font-weight: 600;
}

.form-switch a:hover {
    text-decoration: underline;
}

/* ==================== NAVIGATION ==================== */
.topbar {
    background: #ff3131;
    padding: 20px 0;
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-content {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.menu-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    color: white;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

.logo-small {
    font-size: 1.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--ferrari-red), #ff4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==================== NOTIFICATIONS ==================== */
.notification-icon-container {
    position: relative;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: var(--border-radius-small);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-icon-container:hover {
    background: rgba(255, 255, 255, 0.1);
}

.notification-bell {
    font-size: 1.3rem;
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 4px;
    background: var(--ferrari-red);
    color: white;
    font-size: 0.65rem;
    padding: 2px 5px;
    border-radius: 10px;
    font-weight: 700;
    min-width: 16px;
    text-align: center;
}

.notifications-dropdown {
    position: fixed;
    top: 60px;
    right: 20px;
    width: 380px;
    max-height: 500px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 999;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
}

.notifications-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-secondary);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.notifications-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.notifications-list {
    overflow-y: auto;
    max-height: 430px;
}

.notification-item {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.notification-item:hover {
    background: var(--bg-tertiary);
}

.notification-item.unread {
    background: #fff3e0;
}

.notification-icon-large {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
}

.notification-text {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.notification-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.notification-actions .btn {
    padding: 4px 10px;
    font-size: 0.75rem;
}

/* ==================== LOGO IMAGES ==================== */

/* Login Page Logo */
.login-logo-container {
    text-align: center;
    margin-bottom: 30px;
}

.logo-image-login {
    max-width: 180px;
    max-height: 180px;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Navbar Logo */
.logo-image-navbar {
    height: 40px;
    width: auto;
    display: block;
    transition: transform 0.3s ease;
    /* Logo keeps original colors on red background */
}

.logo-image-navbar:hover {
    transform: scale(1.05);
}

/* Sidebar Logo (optional - if you want to add one) */
.sidebar-logo-image {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

/* Responsive Logo Adjustments */
@media (max-width: 768px) {
    .logo-image-login {
        max-width: 140px;
        max-height: 140px;
    }
    
    .logo-image-navbar {
        height: 32px;
    }
}

.user-greeting {
    font-size: 1.1rem;
    color: white;
    font-weight: 500;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.g-score-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* ==================== SIDEBAR ==================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 73px;
    height: calc(100vh - 73px);
    width: var(--sidebar-width);
    background: #ff3131;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 90;
}

.sidebar.collapsed {
    transform: translateX(-100%);
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 73px;
    left: 0;
    width: 100%;
    height: calc(100vh - 73px);
    background: rgba(0, 0, 0, 0.5);
    z-index: 89;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Mobile sidebar handling */
@media (max-width: 1024px) {
    .sidebar {
        z-index: 1000;
    }
    
    /* Start collapsed on mobile */
    .sidebar.collapsed {
        transform: translateX(-100%);
    }
    
    /* When open on mobile, show fully */
    .sidebar:not(.collapsed) {
        transform: translateX(0);
    }
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 700;
    font-size: 1rem;
    color: white;
    margin-bottom: 4px;
}

.user-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #90EE90;
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-weight: 600;
    border-left: 3px solid white;
}

.nav-icon {
    font-size: 1.3rem;
    width: 24px;
    text-align: center;
}

.nav-text {
    flex: 1;
    font-size: 0.95rem;
}

.nav-badge {
    background: white;
    color: #ff3131;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    bottom: 0;
    background: #ff3131;
}

.quick-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.quick-stat {
    text-align: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-small);
}

.quick-stat .stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    display: block;
    margin-bottom: 4px;
}

.quick-stat .stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 40px 30px;
    padding-top: 113px; /* 73px topbar + 40px original padding */
    transition: margin-left 0.3s ease;
}

.main-content.expanded {
    margin-left: 0;
}

.page-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.page-content.active {
    display: block;
}

.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 2.2rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ==================== STATS ==================== */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.stat-card {
    background: var(--bg-card);
    padding: 12px 10px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: var(--ferrari-red);
}

.stat-icon {
    font-size: 1.5rem;
    margin-bottom: 6px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.stat-value {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--ferrari-red);
    margin-bottom: 3px;
}

.main-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 25px;
}

/* ==================== TIMER ==================== */
.timer-page-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.timer-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.timer-container {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 0 auto 30px;
}

.timer-circle {
    position: relative;
    width: 100%;
    height: 100%;
}

.timer-svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.timer-circle-bg {
    fill: none;
    stroke: var(--border-color);
    stroke-width: 12;
}

.timer-circle-progress {
    fill: none;
    stroke: var(--ferrari-red);
    stroke-width: 12;
    stroke-linecap: round;
    stroke-dasharray: 754;
    stroke-dashoffset: 754;
    transition: stroke-dashoffset 0.3s ease;
    filter: drop-shadow(0 0 8px rgba(220, 0, 0, 0.4));
}

.timer-circle.active .timer-circle-progress {
    animation: pulse-ring 2s ease-in-out infinite;
}

.timer-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.timer-time {
    font-size: 3.5rem;
    font-weight: 700;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    color: var(--text-primary);
    letter-spacing: -2px;
    line-height: 1;
    margin-bottom: 8px;
}

.timer-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.timer-status {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 25px;
    font-size: 1rem;
    min-height: 24px;
    font-weight: 500;
}

.timer-status.active {
    color: var(--ferrari-red);
    font-weight: 600;
}

.session-info {
    margin-top: 20px;
    padding: 20px;
    background: var(--ferrari-red-light);
    border-radius: var(--border-radius-small);
    text-align: center;
    font-size: 0.95rem;
    border: 2px solid rgba(220, 0, 0, 0.2);
    color: var(--text-primary);
}

.session-info strong {
    color: var(--ferrari-red);
    display: block;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.quick-timer-display {
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    color: var(--ferrari-red);
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    margin: 8px 0;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
}

.session-history {
    max-height: 400px;
    overflow-y: auto;
}

/* ==================== SOCIAL FEED ==================== */
.social-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 25px;
}

.social-main {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.social-sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* Status Selector */
.status-card h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.status-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.status-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-small);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.status-option:hover {
    border-color: var(--ferrari-red);
    background: var(--bg-tertiary);
}

.status-option.active {
    border-color: var(--ferrari-red);
    background: var(--ferrari-red-light);
    font-weight: 600;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-available {
    background: #28a745;
}

.status-coffee {
    background: #ffc107;
}

.status-dnd {
    background: #dc3545;
}

.status-groupstudy {
    background: #17a2b8;
}

.status-label {
    flex: 1;
}

/* Friend Search */
.friend-search {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.friend-search input {
    flex: 1;
    margin: 0;
}

.search-result {
    min-height: 50px;
    margin-top: 10px;
}

.friend-result-card {
    background: var(--bg-secondary);
    padding: 15px;
    border-radius: var(--border-radius-small);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid var(--border-color);
}

.friend-result-info {
    flex: 1;
}

.friend-result-name {
    font-weight: 700;
    margin-bottom: 4px;
}

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

/* Friends List */
.friends-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.friend-card {
    background: var(--bg-secondary);
    padding: 15px;
    border-radius: var(--border-radius-small);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.friend-card:hover {
    border-color: var(--ferrari-red);
    background: var(--bg-tertiary);
}

.friend-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.friend-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--ferrari-red-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    border: 2px solid var(--ferrari-red);
    flex-shrink: 0;
    position: relative;
}

.friend-status-indicator {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid white;
}

.friend-info {
    flex: 1;
}

.friend-name {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 2px;
}

.friend-status-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.friend-stats {
    display: flex;
    gap: 15px;
    padding: 10px 0;
    border-top: 1px solid var(--border-color);
}

.friend-stat {
    text-align: center;
    flex: 1;
}

.friend-stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ferrari-red);
}

.friend-stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.friend-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.friend-actions button {
    flex: 1;
    padding: 8px;
    font-size: 0.85rem;
}

/* Social Feed */
.social-feed {
    max-height: 250px;
    overflow-y: auto;
}

/* ==================== ENHANCED SOCIAL FEED ==================== */

/* Post Input Card */
.post-card {
    padding: 15px;
}

.post-input-row {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.post-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--ferrari-red-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    border: 2px solid var(--ferrari-red);
}

.post-input-row input {
    flex: 1;
    padding: 10px 16px;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 0.95rem;
    background: var(--bg-secondary);
    transition: border-color 0.3s;
}

.post-input-row input:focus {
    border-color: var(--ferrari-red);
    outline: none;
}

.post-actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 54px;
}

.post-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.post-tag {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.post-tag:hover {
    background: var(--ferrari-red-light);
    border-color: var(--ferrari-red);
    color: var(--ferrari-red);
}

/* Enhanced Feed Item */
.feed-item {
    display: flex;
    gap: 12px;
    padding: 14px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease;
}

.feed-item:hover {
    border-color: var(--ferrari-red);
    box-shadow: 0 2px 8px rgba(255, 49, 49, 0.1);
}

.feed-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--ferrari-red-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    border: 2px solid var(--ferrari-red);
}

.feed-content {
    flex: 1;
    min-width: 0;
}

.feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.feed-user {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.feed-time {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.feed-text {
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.5;
    font-size: 0.95rem;
}

.feed-interactions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.feed-vote-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.feed-vote-btn:hover {
    background: var(--bg-secondary);
}

.feed-vote-btn.upvoted {
    color: var(--ferrari-red);
    background: var(--ferrari-red-light);
    font-weight: 700;
}

.feed-vote-btn.downvoted {
    color: #666;
    background: #f0f0f0;
    font-weight: 700;
}

.feed-vote-count {
    font-weight: 600;
    min-width: 12px;
    text-align: center;
}

.feed-comment-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.feed-comment-btn:hover {
    background: var(--bg-secondary);
    color: var(--ferrari-red);
}

.feed-stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.feed-stat {
    background: var(--ferrari-red-light);
    color: var(--ferrari-red);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.feed-post-type {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
}

@media (max-width: 480px) {
    .post-actions-row {
        padding-left: 0;
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    .post-tags {
        width: 100%;
    }
}

/* Active Users / Who's Grinding */
.active-users {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.active-user-card {
    background: var(--bg-secondary);
    padding: 15px;
    border-radius: var(--border-radius-small);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease;
}

.active-user-card:hover {
    border-color: var(--ferrari-red);
    background: var(--bg-tertiary);
}

.active-user-card.grinding {
    background: var(--ferrari-red-light);
    border-color: var(--ferrari-red);
}

.active-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--ferrari-red-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    border: 2px solid var(--ferrari-red);
    position: relative;
    flex-shrink: 0;
}

.grinding-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--ferrari-red);
    animation: pulse-wave 2s ease-out infinite;
}

.active-user-info {
    flex: 1;
}

.active-user-name {
    font-weight: 700;
    margin-bottom: 4px;
}

.active-user-status {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.active-user-time {
    font-weight: 700;
    color: var(--ferrari-red);
    font-size: 1rem;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
}

/* ==================== LEADERBOARD ==================== */
/* ==================== ENHANCED LEADERBOARD ==================== */

/* Champion Banner */
.champion-banner {
    background: linear-gradient(135deg, #ff3131, #ff6b35);
    color: white;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    margin-bottom: 15px;
}

.champion-crown {
    font-size: 2.5rem;
    animation: pulse 2s infinite;
}

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

.champion-label {
    font-size: 0.8rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.champion-name {
    font-size: 1.4rem;
    font-weight: 900;
}

.champion-stats {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 2px;
}

/* Your Rank Card */
.your-rank-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    margin-bottom: 20px;
    border: 2px solid var(--ferrari-red);
    background: var(--ferrari-red-light);
}

.your-rank-position {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--ferrari-red);
    min-width: 60px;
    text-align: center;
}

.your-rank-info {
    flex: 1;
}

.your-rank-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.your-rank-stats {
    font-weight: 600;
    color: var(--text-primary);
}

.your-rank-gscore {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--ferrari-red);
}

/* Tabs */
.leaderboard-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.tab-btn {
    padding: 10px 18px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    color: var(--text-secondary);
    white-space: nowrap;
}

.tab-btn.active {
    background: var(--ferrari-red);
    color: white;
    border-color: var(--ferrari-red);
}

.tab-btn:hover {
    border-color: var(--ferrari-red);
    color: var(--ferrari-red);
}

.tab-btn.active:hover {
    color: white;
}

/* Podium */
.podium-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 20px;
    padding: 20px 0;
}

.podium-card {
    text-align: center;
    border-radius: var(--border-radius);
    padding: 16px 12px;
    transition: all 0.3s;
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    min-width: 100px;
    flex: 1;
    max-width: 180px;
}

.podium-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.podium-card.gold {
    border-color: #FFD700;
    background: linear-gradient(180deg, #FFF8E1, white);
    order: 2;
    padding-bottom: 30px;
}

.podium-card.silver {
    border-color: #C0C0C0;
    background: linear-gradient(180deg, #F5F5F5, white);
    order: 1;
    padding-bottom: 20px;
}

.podium-card.bronze {
    border-color: #CD7F32;
    background: linear-gradient(180deg, #FFF3E0, white);
    order: 3;
    padding-bottom: 14px;
}

.podium-medal {
    font-size: 2rem;
    margin-bottom: 6px;
}

.podium-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--ferrari-red-light);
    border: 3px solid var(--ferrari-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 8px;
}

.podium-name {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 4px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.podium-score {
    font-weight: 900;
    color: var(--ferrari-red);
    font-size: 1.1rem;
}

.podium-detail {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Rankings List */
.leaderboard {
    max-height: 600px;
    overflow-y: auto;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-small);
    margin-bottom: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    gap: 14px;
}

.leaderboard-item:hover {
    border-color: var(--ferrari-red);
    background: var(--bg-tertiary);
}

.leaderboard-item.your-rank {
    background: var(--ferrari-red-light);
    border-color: var(--ferrari-red);
    border-width: 2px;
}

.leaderboard-item .rank {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ferrari-red);
    min-width: 40px;
    text-align: center;
}

.leaderboard-item .lb-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--ferrari-red-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    border: 2px solid var(--border-color);
}

.leaderboard-item.your-rank .lb-avatar {
    border-color: var(--ferrari-red);
}

.leaderboard-item .user-info {
    flex: 1;
    min-width: 0;
}

.leaderboard-item .username {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.leaderboard-item .score {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--ferrari-red);
    white-space: nowrap;
}

@media (max-width: 768px) {
    .podium-container {
        gap: 8px;
        padding: 10px 0;
    }
    .podium-card {
        min-width: 80px;
        padding: 12px 8px;
    }
    .leaderboard-tabs {
        flex-wrap: nowrap;
    }
    .champion-banner {
        padding: 16px;
    }
    .champion-name {
        font-size: 1.1rem;
    }
}

/* ==================== PROFILE ==================== */

/* Profile Banner */
.profile-banner-card {
    padding: 0;
    overflow: hidden;
    margin-bottom: 20px;
}

.profile-banner-bg {
    height: 100px;
    background: linear-gradient(135deg, #ff3131, #ff6b35, #ff3131);
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
}

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

.profile-banner-content {
    display: flex;
    gap: 20px;
    padding: 0 24px 20px;
    margin-top: -45px;
    align-items: flex-end;
}

.profile-avatar-large {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    border: 4px solid var(--bg-card);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    flex-shrink: 0;
}

.profile-banner-info {
    padding-bottom: 4px;
}

.profile-banner-info h2 {
    font-size: 1.5rem;
    margin-bottom: 2px;
}

.profile-badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 6px 0;
}

.profile-badge-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 12px;
    border-radius: 14px;
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.profile-badge-pill.major {
    background: var(--ferrari-red);
    color: white;
    border-color: var(--ferrari-red);
}

/* Grind Level Colors */
.grind-level-beginner { background: #e8f5e9; color: #2e7d32; border-color: #a5d6a7; }
.grind-level-grinder { background: #e3f2fd; color: #1565c0; border-color: #90caf9; }
.grind-level-hustler { background: #fff3e0; color: #e65100; border-color: #ffcc80; }
.grind-level-beast { background: #fce4ec; color: #c62828; border-color: #ef9a9a; }
.grind-level-legend { background: linear-gradient(135deg,#FFD700,#FFA000); color: white; border: none; }

/* Bio Display */
.profile-bio-display {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.profile-bio-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 6px;
}

.profile-bio-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    font-style: italic;
}

.profile-no-bio {
    text-align: center;
    padding: 16px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.profile-no-bio p {
    margin-bottom: 10px;
}

/* Completeness Bar */
.completeness-bar-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.completeness-bar {
    flex: 1;
    height: 10px;
    background: var(--bg-secondary);
    border-radius: 6px;
    overflow: hidden;
}

.completeness-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ferrari-red), #ff6b35);
    border-radius: 6px;
    transition: width 0.5s ease;
}

.completeness-percent {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--ferrari-red);
    min-width: 40px;
}

.completeness-tips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.completeness-tip {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.completeness-tip.done {
    background: #e8f5e9;
    color: #2e7d32;
    text-decoration: line-through;
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.profile-card {
    grid-column: span 2;
}

.profile-header {
    display: flex;
    gap: 25px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--ferrari-red-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    border: 3px solid var(--ferrari-red);
}

.profile-info h2 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.profile-status {
    color: var(--ferrari-red);
    font-weight: 600;
    margin-bottom: 4px;
}

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

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .profile-banner-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .profile-badges-row {
        justify-content: center;
    }
    .profile-grid {
        grid-template-columns: 1fr;
    }
    .profile-card {
        grid-column: span 1;
    }
    .profile-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.profile-stat {
    text-align: center;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-small);
}

.profile-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--ferrari-red);
    margin-bottom: 8px;
}

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

.stats-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-small);
}

.stat-row span:last-child {
    font-weight: 700;
    color: var(--ferrari-red);
}

/* ==================== ACHIEVEMENTS ==================== */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.achievement-badge {
    background: var(--bg-secondary);
    padding: 25px 15px;
    border-radius: var(--border-radius);
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
}

.achievement-badge.unlocked {
    background: var(--ferrari-red-light);
    border-color: var(--ferrari-red);
    animation: unlock 0.6s ease;
}

.achievement-badge.unlocked .achievement-icon {
    filter: drop-shadow(0 4px 8px rgba(220, 0, 0, 0.3));
}

.achievement-badge.locked {
    opacity: 0.35;
}

.achievement-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.achievement-name {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.achievement-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ==================== SETTINGS ==================== */
.settings-grid {
    display: grid;
    gap: 25px;
}

.settings-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-small);
}

.setting-label {
    font-weight: 600;
    color: var(--text-primary);
}

.setting-value {
    color: var(--text-secondary);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color-dark);
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--ferrari-red);
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* ==================== BUTTONS ==================== */
.btn {
    background: var(--ferrari-red);
    border: none;
    padding: 14px 28px;
    margin: 6px;
    color: white;
    border-radius: var(--border-radius-small);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(220, 0, 0, 0.2);
}

.btn:hover {
    background: var(--ferrari-red-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 0, 0, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--ferrari-red);
}

.btn-secondary {
    background: var(--text-secondary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-secondary:hover {
    background: #5a6268;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-danger {
    background: var(--danger-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-danger:hover {
    background: #5a6268;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-small {
    padding: 10px 20px;
    font-size: 0.9rem;
}

/* Navbar buttons - white background on red navbar */
.topbar .btn-danger {
    background: white;
    color: #ff3131;
    border: 2px solid white;
}

.topbar .btn-danger:hover {
    background: rgba(255, 255, 255, 0.9);
    color: #ff3131;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.button-group {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==================== INPUTS ==================== */
.input-group {
    margin: 8px 0;
}

input[type="text"],
input[type="email"],
input[type="password"] {
    padding: 10px 12px;
    width: 100%;
    border-radius: var(--border-radius-small);
    border: 2px solid var(--border-color);
    background: var(--bg-light);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: var(--ferrari-red);
    box-shadow: 0 0 0 3px rgba(220, 0, 0, 0.1);
}

.input-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.checkbox-group {
    margin: 25px 0;
    text-align: center;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--ferrari-red);
}

/* ==================== TASKS ==================== */
.task-list {
    list-style: none;
    margin: 10px 0;
    max-height: 200px;
    overflow-y: auto;
}

.task-item {
    background: var(--bg-secondary);
    padding: 10px;
    margin: 6px 0;
    border-radius: var(--border-radius-small);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease;
    border: 1px solid var(--border-color);
}

.task-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--ferrari-red);
}

.task-item.completed {
    opacity: 0.6;
}

.task-item.completed .task-text {
    text-decoration: line-through;
    color: var(--text-secondary);
}

.task-text {
    flex: 1;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-size: 0.95rem;
}

.task-actions {
    display: flex;
    gap: 10px;
}

.task-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.3rem;
    padding: 6px;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.task-btn:hover {
    color: var(--ferrari-red);
    background: var(--ferrari-red-light);
    transform: scale(1.15);
}

.task-stats {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 15px;
    font-weight: 500;
}

/* ==================== ACTIVITY FEED ==================== */
.activity-feed {
    max-height: 220px;
    overflow-y: auto;
}

.activity-item {
    padding: 8px;
    margin: 6px 0;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-small);
    display: flex;
    gap: 8px;
    align-items: center;
    animation: slideIn 0.3s ease;
    border: 1px solid var(--border-color);
}

.activity-item:hover {
    border-color: var(--ferrari-red);
}

.activity-icon {
    font-size: 1.2rem;
    min-width: 24px;
}

.activity-text {
    flex: 1;
    font-size: 0.8rem;
    color: var(--text-primary);
}

.activity-time {
    color: var(--text-muted);
    font-size: 0.7rem;
}

/* ==================== DASHBOARD LAYOUT ==================== */
.dashboard-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 15px;
}

.dashboard-main {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Timer and Tasks side-by-side */
.dashboard-quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.dashboard-sidebar {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dashboard-sidebar .card {
    padding: 12px;
}

.dashboard-sidebar h3 {
    font-size: 0.9rem;
    margin-bottom: 10px;
}

/* Compact Status Selector */
.status-card-compact {
    padding: 10px;
}

.status-selector-compact {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.status-btn {
    flex: 1;
    padding: 8px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-small);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.status-btn:hover {
    border-color: var(--ferrari-red);
    background: var(--bg-tertiary);
}

.status-btn.active {
    border-color: var(--ferrari-red);
    background: var(--ferrari-red-light);
    transform: scale(1.05);
}

.status-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Compact Active Users */
.active-users-compact {
    max-height: 150px;
    overflow-y: auto;
}

.active-user-compact {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-small);
    margin-bottom: 5px;
    border: 1px solid var(--border-color);
}

.active-user-compact:hover {
    border-color: var(--ferrari-red);
}

.active-user-compact .avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--ferrari-red-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.active-user-compact .info {
    flex: 1;
    font-size: 0.75rem;
}

.active-user-compact .name {
    font-weight: 600;
}

.active-user-compact .time {
    color: var(--text-secondary);
    font-size: 0.65rem;
}

/* Compact Friends List */
.friends-list-compact {
    max-height: 180px;
    overflow-y: auto;
}

.friend-compact {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-small);
    margin-bottom: 5px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.friend-compact:hover {
    border-color: var(--ferrari-red);
    background: var(--bg-tertiary);
}

.friend-compact .avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--ferrari-red-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    position: relative;
}

.friend-compact .status-dot-mini {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: 2px solid white;
}

.friend-compact .info {
    flex: 1;
}

.friend-compact .name {
    font-weight: 600;
    font-size: 0.8rem;
}

.friend-compact .stats {
    color: var(--text-secondary);
    font-size: 0.65rem;
}

/* Friend Requests */
.friend-requests {
    max-height: 150px;
    overflow-y: auto;
}

.request-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-small);
    margin-bottom: 6px;
    border: 2px solid var(--ferrari-red-light);
}

.request-item .avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--ferrari-red-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.request-item .info {
    flex: 1;
}

.request-item .name {
    font-weight: 700;
    margin-bottom: 2px;
    font-size: 0.8rem;
}

.request-item .stats {
    color: var(--text-secondary);
    font-size: 0.65rem;
}

.request-item .actions {
    display: flex;
    gap: 3px;
}

.request-item .actions button {
    padding: 4px 8px;
    font-size: 0.7rem;
}

/* ==================== SIDEBAR EDIT HINT ==================== */
.sidebar-user {
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: var(--border-radius-small);
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
}

.sidebar-user:hover {
    background: rgba(255,255,255,0.15);
}

.sidebar-user:hover .edit-profile-hint {
    opacity: 1;
}

.edit-profile-hint {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* ==================== PROFILE MODAL ==================== */
.profile-modal-content {
    max-width: 560px;
    width: 95%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.profile-modal-content .modal-body {
    overflow-y: auto;
    flex: 1;
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: var(--bg-secondary);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

/* Profile picture */
.profile-pic-section {
    text-align: center;
    margin-bottom: 20px;
}

.profile-pic-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid var(--ferrari-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    margin: 0 auto 10px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    background: var(--bg-secondary);
    transition: all 0.3s ease;
}

.profile-pic-preview:hover .profile-pic-overlay {
    opacity: 1;
}

.profile-pic-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(220, 0, 0, 0.8);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 5px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.profile-pic-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.emoji-avatar-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 8px;
}

.emoji-avatar-grid span {
    font-size: 1.8rem;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--border-radius-small);
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.emoji-avatar-grid span:hover {
    border-color: var(--ferrari-red);
    background: var(--ferrari-red-light);
    transform: scale(1.15);
}

/* Profile fields */
.profile-field {
    margin-bottom: 18px;
}

.profile-field label {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.field-hint {
    font-weight: 400;
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-left: 8px;
}

.profile-field input[type="text"],
.profile-field textarea,
.profile-field select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-radius-small);
    font-size: 0.9rem;
    transition: border 0.2s ease;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.profile-field input[type="text"]:focus,
.profile-field textarea:focus,
.profile-field select:focus {
    border-color: var(--ferrari-red);
    outline: none;
}

.profile-field textarea {
    resize: none;
}

.anon-toggle-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.anon-toggle-row input[type="text"] {
    flex: 1;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

/* Group preview */
.group-preview {
    margin-top: 10px;
    padding: 10px 14px;
    background: var(--ferrari-red-light);
    border: 1.5px solid var(--ferrari-red);
    border-radius: var(--border-radius-small);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ferrari-red);
}

/* Interests */
.interests-selected {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 30px;
    margin-bottom: 10px;
}

.interests-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.interest-tag {
    padding: 6px 12px;
    background: var(--bg-secondary);
    border: 1.5px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.interest-tag:hover {
    border-color: var(--ferrari-red);
    background: var(--ferrari-red-light);
}

.interest-tag.selected {
    background: var(--ferrari-red);
    color: white;
    border-color: var(--ferrari-red);
}

.selected-interest-chip {
    padding: 4px 10px;
    background: var(--ferrari-red);
    color: white;
    border-radius: 20px;
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.selected-interest-chip .remove-interest {
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
}

/* Relationship status */
.relationship-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.rel-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--bg-secondary);
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-radius-small);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.rel-option:hover {
    border-color: var(--ferrari-red);
    background: var(--ferrari-red-light);
}

.rel-option input[type="radio"] {
    accent-color: var(--ferrari-red);
}

.rel-option:has(input:checked) {
    border-color: var(--ferrari-red);
    background: var(--ferrari-red-light);
    font-weight: 700;
}

/* ==================== GROUP CHAT / SECTION LABELS ==================== */
.conv-section-label {
    padding: 8px 15px 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1;
}

.empty-state-small {
    padding: 15px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.82rem;
}

.conversation-item.group-chat {
    background: linear-gradient(135deg, #fff3e0 0%, #ffffff 100%);
}

.conversation-item.group-chat .conversation-avatar {
    background: linear-gradient(135deg, var(--ferrari-red), #ff6b35);
    color: white;
}

.group-member-count {
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ==================== MESSAGES / CHAT SYSTEM ==================== */
.messages-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 0;
    height: calc(100vh - 200px);
    background: var(--bg-card);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* Conversations Sidebar */
.conversations-sidebar {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.conversations-header {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
}

.conversations-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.conversations-search {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.conversations-search input {
    width: 100%;
    padding: 8px 12px;
    border-radius: var(--border-radius-small);
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.conversations-list {
    flex: 1;
    overflow-y: auto;
}

.conversation-item {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    gap: 12px;
    align-items: center;
}

.conversation-item:hover {
    background: var(--bg-tertiary);
}

.conversation-item.active {
    background: var(--ferrari-red-light);
    border-left: 3px solid var(--ferrari-red);
}

.conversation-item.unread {
    background: #fff3e0;
}

.conversation-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--ferrari-red-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.conversation-info {
    flex: 1;
    min-width: 0;
}

.conversation-name {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.conversation-last-message {
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.conversation-unread-badge {
    background: var(--ferrari-red);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
}

/* Chat Window */
.chat-window {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--bg-card);
}

.chat-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.empty-state-large {
    text-align: center;
    padding: 40px;
}

.empty-state-large h2 {
    margin: 20px 0 10px 0;
    color: var(--text-primary);
}

.chat-active {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-secondary);
}

.chat-user-info {
    display: flex;
    gap: 12px;
    align-items: center;
}

.avatar-chat {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--ferrari-red-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.chat-user-details {
    display: flex;
    flex-direction: column;
}

.chat-user-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
}

.chat-user-status {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.chat-user-status.online {
    color: var(--success-color);
}

/* Messages Area */
.messages-area {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8f9fa;
}

.message-bubble {
    max-width: 70%;
    padding: 10px 14px;
    border-radius: 18px;
    word-wrap: break-word;
    animation: slideUp 0.2s ease;
}

.message-sent {
    align-self: flex-end;
    background: var(--ferrari-red);
    color: white;
    border-bottom-right-radius: 4px;
}

.message-received {
    align-self: flex-start;
    background: white;
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
    border: 1px solid var(--border-color);
}

.message-text {
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 4px;
}

.message-time {
    font-size: 0.7rem;
    opacity: 0.7;
    text-align: right;
}

.message-sent .message-time {
    color: white;
}

.message-received .message-time {
    color: var(--text-secondary);
}

.message-date-divider {
    text-align: center;
    padding: 10px 0;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Message Input */
.message-input-container {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
    background: var(--bg-card);
}

.message-input-container input {
    flex: 1;
    padding: 10px 15px;
    border-radius: 25px;
    border: 1px solid var(--border-color);
    font-size: 0.95rem;
}

.message-input-container input:focus {
    border-color: var(--ferrari-red);
    outline: none;
}

.message-input-container .btn {
    padding: 10px 25px;
    border-radius: 25px;
}

/* New Chat Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
}

.modal-close:hover {
    color: var(--ferrari-red);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
}

.friends-modal-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.friend-modal-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-small);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.friend-modal-item:hover {
    border-color: var(--ferrari-red);
    background: var(--bg-tertiary);
}

.friend-modal-item .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--ferrari-red-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.friend-modal-item .name {
    font-weight: 700;
    font-size: 0.95rem;
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Messages */
@media (max-width: 1024px) {
    .messages-layout {
        grid-template-columns: 1fr;
        height: auto;
        min-height: calc(100vh - 200px);
    }
    
    .conversations-sidebar {
        display: flex;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        max-height: 50vh;
        overflow-y: auto;
    }
    
    .chat-area {
        min-height: 50vh;
    }
}

/* ==================== WELCOME / ONBOARDING MODAL ==================== */
.welcome-modal-content {
    max-width: 650px;
    width: 95%;
    max-height: 90vh;
}

.welcome-hero {
    text-align: center;
    padding: 40px 20px 20px;
    background: linear-gradient(135deg, var(--ferrari-red), #ff4444);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.welcome-emoji {
    font-size: 4rem;
    margin-bottom: 15px;
    animation: pulse 2s infinite;
}

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

.welcome-hero h1 {
    margin: 0 0 10px;
    font-size: 2rem;
}

.welcome-hero p {
    margin: 0;
    font-size: 1.1rem;
    opacity: 0.9;
}

.onboarding-steps {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.onboarding-step {
    text-align: center;
    padding: 20px 15px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-small);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.onboarding-step:hover {
    border-color: var(--ferrari-red);
    background: var(--ferrari-red-light);
    transform: translateY(-3px);
}

.onboarding-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.onboarding-step h3 {
    font-size: 1rem;
    margin: 0 0 8px;
    color: var(--text-primary);
}

.onboarding-step p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

.welcome-tips {
    background: #fff8e1;
    border: 2px solid #ffd740;
    border-radius: var(--border-radius-small);
    padding: 15px 20px;
}

.welcome-tips h4 {
    margin: 0 0 10px;
    color: #f57f17;
    font-size: 1rem;
}

.welcome-tips ul {
    margin: 0;
    padding-left: 20px;
    list-style: none;
}

.welcome-tips li {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin: 6px 0;
    padding-left: 0;
}

.welcome-tips li::before {
    content: none;
}

.btn-large {
    padding: 14px 32px;
    font-size: 1.1rem;
    width: 100%;
}

@media (max-width: 600px) {
    .onboarding-steps {
        grid-template-columns: 1fr;
    }
}

/* ==================== PROFILE ENHANCEMENTS ==================== */
.profile-bio-section {
    margin-top: 15px;
    padding: 12px 15px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-small);
    border-left: 3px solid var(--ferrari-red);
}

.profile-bio-section p {
    font-style: italic;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.profile-tags-section {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.profile-major-badge {
    padding: 5px 14px;
    background: var(--ferrari-red);
    color: white;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.profile-interest-chip {
    padding: 4px 12px;
    background: var(--bg-secondary);
    border: 1.5px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.profile-rel-status {
    margin-top: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ferrari-red);
    background: var(--ferrari-red-light);
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* ==================== WELCOME MODAL ==================== */
.welcome-modal-content {
    max-width: 700px;
    width: 95%;
}

.welcome-header {
    text-align: center;
    padding: 30px 20px 20px;
    background: linear-gradient(135deg, var(--ferrari-red), #ff4444);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.welcome-header h1 {
    margin: 0 0 10px 0;
    font-size: 2rem;
}

.welcome-header p {
    margin: 0;
    opacity: 0.95;
    font-size: 1rem;
}

.welcome-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.welcome-step {
    text-align: center;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-small);
    border: 2px solid var(--border-color);
}

.welcome-step-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.welcome-step h3 {
    font-size: 0.95rem;
    margin: 0 0 8px 0;
    color: var(--text-primary);
}

.welcome-step p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.3;
}

.welcome-tip {
    margin-top: 20px;
    padding: 12px 15px;
    background: #fff3e0;
    border-left: 3px solid #ff9800;
    border-radius: var(--border-radius-small);
    font-size: 0.9rem;
}

.btn-large {
    padding: 14px 40px;
    font-size: 1.1rem;
}

/* ==================== ONBOARDING NUDGE ==================== */
.onboarding-nudge {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 998;
    animation: slideInRight 0.4s ease;
}

.nudge-content {
    background: white;
    padding: 15px 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border: 2px solid var(--ferrari-red);
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 380px;
    position: relative;
}

.nudge-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.nudge-text {
    flex: 1;
}

.nudge-text strong {
    display: block;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.nudge-text p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
}

.nudge-close {
    position: absolute;
    top: 5px;
    right: 8px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    line-height: 1;
}

.nudge-close:hover {
    color: var(--ferrari-red);
}

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

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

/* ==================== ABOUT PAGE ==================== */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 25px;
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.feature-list li:last-child {
    border-bottom: none;
}

.version-info {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: var(--border-radius-small);
    margin: 15px 0;
}

.version-item {
    padding: 8px 0;
    display: flex;
    justify-content: space-between;
}

.update-list {
    list-style: none;
    padding: 0;
}

.update-list li {
    padding: 8px 0;
    color: var(--text-secondary);
}

.how-it-works {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.step {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--ferrari-red);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.step-content h4 {
    margin: 0 0 5px 0;
    color: var(--text-primary);
}

.step-content p {
    margin: 0;
    color: var(--text-secondary);
}

.support-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* ==================== DISCOVER PAGE ==================== */
.discover-layout {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.search-filters {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.search-filters input[type="text"] {
    width: 100%;
}

.filter-options {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.user-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.user-card {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: var(--border-radius);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    text-align: center;
}

.user-card:hover {
    border-color: var(--ferrari-red);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 0, 0, 0.2);
}

.user-card .avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--ferrari-red-light);
    border: 3px solid var(--ferrari-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 15px;
}

.user-card .username {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.user-card .user-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 15px 0;
}

.user-card .stat-mini {
    text-align: center;
}

.user-card .stat-mini-value {
    font-weight: 700;
    color: var(--ferrari-red);
}

.user-card .stat-mini-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.user-card .action-btn {
    flex: 1;
    margin-top: 0;
}

.user-card-actions-row {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}

.user-card-bio.no-bio {
    color: var(--text-muted);
    font-style: normal;
    font-size: 0.8rem;
    opacity: 0.7;
}

.user-card-bio {
    font-size: 0.85rem;
    font-style: italic;
    color: var(--text-secondary);
    margin: 10px 0;
    padding: 8px 12px;
    background: rgba(0,0,0,0.03);
    border-radius: var(--border-radius-small);
    line-height: 1.4;
}

.user-card-major {
    display: inline-block;
    padding: 4px 12px;
    background: var(--ferrari-red);
    color: white;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    margin: 8px 0;
}

/* ==================== GROUPS & NEWS PAGE ==================== */

/* News Post Form */
.news-post-form input,
.news-post-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-small);
    font-size: 0.95rem;
    margin-bottom: 10px;
    background: var(--bg-secondary);
    transition: border-color 0.3s;
    resize: none;
    font-family: inherit;
}

.news-post-form input:focus,
.news-post-form textarea:focus {
    border-color: var(--ferrari-red);
    outline: none;
}

.news-post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.news-category-picker,
.group-cat-picker {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.news-cat-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.news-cat-btn:hover {
    border-color: var(--ferrari-red);
    color: var(--ferrari-red);
}

.news-cat-btn.active {
    background: var(--ferrari-red);
    color: white;
    border-color: var(--ferrari-red);
}

/* News Feed */
.news-feed {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.news-item {
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.news-item:hover {
    border-color: var(--ferrari-red);
}

.news-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    gap: 10px;
}

.news-item-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-primary);
    flex: 1;
}

.news-item-cat {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.news-cat-general { background: #e3f2fd; color: #1565c0; }
.news-cat-event { background: #fce4ec; color: #c62828; }
.news-cat-alert { background: #fff3e0; color: #e65100; }
.news-cat-resource { background: #e8f5e9; color: #2e7d32; }

.news-item-body {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 10px;
}

.news-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.news-item-votes {
    display: flex;
    gap: 10px;
}

.news-vote-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.news-vote-btn:hover { background: var(--bg-tertiary); }
.news-vote-btn.upvoted { color: var(--ferrari-red); background: var(--ferrari-red-light); font-weight: 700; }

/* Groups Grid */
.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}

.group-card {
    padding: 18px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 2px solid var(--border-color);
    transition: all 0.3s;
    text-align: center;
}

.group-card:hover {
    border-color: var(--ferrari-red);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220,0,0,0.1);
}

.group-card-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.group-card-name {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.group-card-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    line-height: 1.3;
}

.group-card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.group-card .btn {
    width: 100%;
}

.group-card.joined {
    border-color: var(--ferrari-red);
    background: var(--ferrari-red-light);
}

@media (max-width: 480px) {
    .news-post-footer {
        flex-direction: column;
        align-items: flex-start;
    }
    .groups-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== TEAMS / FIND A TEAM ==================== */

.team-post-form input,
.team-post-form textarea,
.team-post-form select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-small);
    font-size: 0.95rem;
    margin-bottom: 10px;
    background: var(--bg-secondary);
    transition: border-color 0.3s;
    resize: none;
    font-family: inherit;
}

.team-post-form input:focus,
.team-post-form textarea:focus {
    border-color: var(--ferrari-red);
    outline: none;
}

.team-post-form select {
    width: auto;
    padding: 8px 12px;
    cursor: pointer;
}

.role-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.role-tag {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.role-tag:hover {
    border-color: var(--ferrari-red);
    color: var(--ferrari-red);
}

.role-tag.selected {
    background: var(--ferrari-red);
    color: white;
    border-color: var(--ferrari-red);
}

.team-post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    gap: 12px;
}

.team-size-picker {
    display: flex;
    align-items: center;
    gap: 8px;
}

.team-filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 4px;
}

/* Project Cards */
.projects-feed {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.project-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    transition: all 0.3s;
}

.project-card:hover {
    border-color: var(--ferrari-red);
    box-shadow: 0 4px 16px rgba(220,0,0,0.08);
}

.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    gap: 12px;
}

.project-card-title {
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--text-primary);
}

.project-card-size {
    background: var(--bg-secondary);
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
}

.project-card-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 12px;
}

.project-card-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.project-role-badge {
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 0.8rem;
    font-weight: 600;
}

.project-role-badge.open {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.project-role-badge.filled {
    background: var(--bg-secondary);
    color: var(--text-muted);
    text-decoration: line-through;
    border: 1px solid var(--border-color);
}

.project-card-members {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.project-member {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--ferrari-red-light);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: var(--ferrari-red);
    font-weight: 600;
}

.project-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.project-card-actions {
    display: flex;
    gap: 8px;
}

.project-card.my-project {
    border-color: var(--ferrari-red);
    border-left: 4px solid var(--ferrari-red);
}

@media (max-width: 480px) {
    .team-post-footer {
        flex-direction: column;
        align-items: flex-start;
    }
    .project-card-header {
        flex-direction: column;
    }
}

/* ==================== ENHANCED DISCOVER PAGE ==================== */

/* Search Card */
.search-card {
    padding: 0;
    overflow: hidden;
}

.search-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-card);
}

.search-icon-large {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.search-input-row input {
    flex: 1;
    border: none;
    background: none;
    font-size: 1rem;
    padding: 8px 0;
    outline: none;
    color: var(--text-primary);
}

.search-input-row input::placeholder {
    color: var(--text-muted);
}

.search-clear {
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.1rem;
    padding: 4px 8px;
    border-radius: 50%;
    transition: all 0.2s;
}

.search-clear:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.search-results-header {
    padding: 8px 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

#searchResults .user-grid {
    padding: 15px;
}

/* Incoming Requests */
.incoming-requests-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.incoming-request-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 2px solid var(--ferrari-red-light);
    transition: all 0.2s;
}

.incoming-request-card:hover {
    border-color: var(--ferrari-red);
}

.incoming-request-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--ferrari-red-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    border: 2px solid var(--ferrari-red);
}

.incoming-request-info {
    flex: 1;
    min-width: 0;
}

.incoming-request-name {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 2px;
}

.incoming-request-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.incoming-request-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.btn-accept {
    background: var(--ferrari-red);
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-accept:hover {
    background: #e02020;
    transform: scale(1.02);
}

.btn-decline {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-decline:hover {
    background: #f0f0f0;
}

/* Request Badge */
.request-badge {
    background: var(--ferrari-red);
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
}

/* Filter Pills */
.filter-pills {
    display: flex;
    gap: 6px;
}

.filter-pill {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 5px 14px;
    border-radius: 18px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.filter-pill:hover {
    border-color: var(--ferrari-red);
    color: var(--ferrari-red);
}

.filter-pill.active {
    background: var(--ferrari-red);
    color: white;
    border-color: var(--ferrari-red);
}

/* Same Major tag on suggested cards */
.same-major-badge {
    display: inline-block;
    background: #22c55e;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: 6px;
}

@media (max-width: 480px) {
    .incoming-request-card {
        flex-wrap: wrap;
    }
    .incoming-request-actions {
        width: 100%;
        justify-content: flex-end;
    }
    .filter-pills {
        flex-wrap: wrap;
    }
}
}

.user-card-rel {
    display: inline-block;
    padding: 4px 12px;
    background: var(--ferrari-red-light);
    color: var(--ferrari-red);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin: 4px 0;
}

.user-card-interests {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin: 10px 0;
}

.user-card-interest-tag {
    padding: 3px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.user-card.already-friends {
    border-color: var(--success-color);
    background: #e8f5e9;
}

.user-card.request-sent {
    border-color: #ffc107;
    background: #fff8e1;
}

.sent-requests {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.sent-request-card {
    background: var(--bg-secondary);
    padding: 15px;
    border-radius: var(--border-radius-small);
    border: 2px solid #ffc107;
    text-align: center;
}

.sent-request-card .avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--ferrari-red-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 10px;
}

.sent-request-card .username {
    font-weight: 700;
    margin-bottom: 5px;
}

.sent-request-card .status {
    color: #f57c00;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.sent-request-card button {
    width: 100%;
    padding: 8px;
    font-size: 0.85rem;
}

/* ==================== SESSION HISTORY ==================== */
.session-history {
    max-height: 400px;
    overflow-y: auto;
}

.session-item {
    padding: 16px;
    margin: 10px 0;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-small);
    display: flex;
    gap: 14px;
    align-items: center;
    animation: slideIn 0.3s ease;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.session-item:hover {
    border-color: var(--ferrari-red);
    background: var(--bg-tertiary);
}

.session-icon {
    font-size: 1.8rem;
    min-width: 36px;
    text-align: center;
}

.session-info {
    flex: 1;
}

.session-date {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

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

.session-g {
    font-weight: 700;
    color: var(--ferrari-red);
    font-size: 1.1rem;
}

/* ==================== LOCK-IN MODE ==================== */
.lockin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 25px;
}

.lockin-card {
    grid-column: span 1;
    background: linear-gradient(135deg, #ff3131 0%, #dc0000 100%);
    color: white;
}

.lockin-card h2,
.lockin-card .card-subtitle,
.lockin-card h4,
.lockin-card ul,
.lockin-card label {
    color: white;
}

.lockin-timer-display {
    background: rgba(255, 255, 255, 0.1);
    padding: 40px 20px;
    border-radius: var(--border-radius);
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.multiplier-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: white;
    color: #ff3131;
    font-size: 1.5rem;
    font-weight: 900;
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.lockin-timer {
    font-size: 4rem;
    font-weight: 700;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    color: white;
    margin: 20px 0;
}

.lockin-status {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

.lockin-status.active {
    color: white;
    animation: pulse 2s ease-in-out infinite;
}

.lockin-stake-selector {
    margin: 25px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-small);
}

.lockin-stake-selector label {
    display: block;
    margin-bottom: 15px;
    font-size: 1rem;
}

.stake-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.stake-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px;
    border-radius: var(--border-radius-small);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.stake-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
}

.stake-btn.active {
    background: white;
    color: #ff3131;
    border-color: white;
}

.stake-info {
    text-align: center;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
}

.stake-info span {
    font-size: 1.3rem;
    font-weight: 700;
}

.lockin-rules {
    margin-top: 25px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius-small);
    border-left: 4px solid white;
}

.lockin-rules h4 {
    margin-bottom: 15px;
}

.lockin-rules ul {
    list-style: none;
    padding-left: 0;
}

.lockin-rules li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
}

.lockin-rules li:before {
    content: "→";
    position: absolute;
    left: 0;
    font-weight: 700;
}

/* Coffee Pool */
.pool-create {
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-small);
    margin-bottom: 20px;
}

.pool-create h4 {
    margin-bottom: 15px;
}

.pool-create input {
    width: 100%;
    margin-bottom: 10px;
}

.active-pools h4 {
    margin-bottom: 15px;
}

.pool-item {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: var(--border-radius-small);
    margin-bottom: 15px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.pool-item:hover {
    border-color: var(--ferrari-red);
}

.pool-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.pool-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.pool-stake {
    background: var(--ferrari-red-light);
    color: var(--ferrari-red);
    padding: 6px 12px;
    border-radius: 12px;
    font-weight: 700;
}

.pool-details {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.pool-participants {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.participant-badge {
    background: var(--bg-tertiary);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
}

.pool-actions {
    display: flex;
    gap: 10px;
}

/* Bet History */
.bet-history {
    max-height: 400px;
    overflow-y: auto;
}

.bet-item {
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: var(--border-radius-small);
    margin-bottom: 12px;
    border-left: 4px solid var(--border-color);
}

.bet-item.win {
    border-left-color: var(--success-color);
    background: #e8f5e9;
}

.bet-item.loss {
    border-left-color: #dc3545;
    background: #ffebee;
}

.bet-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.bet-type {
    font-weight: 700;
    color: var(--text-primary);
}

.bet-result {
    font-weight: 700;
}

.bet-item.win .bet-result {
    color: var(--success-color);
}

.bet-item.loss .bet-result {
    color: #dc3545;
}

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

/* Lock-in Stats */
.lockin-stats-card {
    grid-column: span 2;
}

.lockin-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.lockin-stat {
    text-align: center;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-small);
}

.lockin-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--ferrari-red);
    margin-bottom: 8px;
}

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

/* ==================== UTILITIES ==================== */
.text-muted {
    color: var(--text-muted);
}

.error-message {
    color: var(--ferrari-red);
    text-align: center;
    margin-top: 15px;
    font-size: 0.95rem;
    font-weight: 500;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse-ring {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(220, 0, 0, 0.4));
    }
    50% {
        filter: drop-shadow(0 0 16px rgba(220, 0, 0, 0.6));
    }
}

@keyframes flame {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.1) rotate(-5deg);
    }
    75% {
        transform: scale(1.1) rotate(5deg);
    }
}

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

@keyframes unlock {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.15);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes pulse-wave {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* ==================== TOAST NOTIFICATIONS ==================== */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-left: 4px solid var(--ferrari-red);
    min-width: 300px;
    max-width: 400px;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    pointer-events: auto;
}

.toast-show {
    opacity: 1;
    transform: translateX(0);
}

.toast-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
}

.toast-success {
    border-left-color: #4caf50;
}

.toast-info {
    border-left-color: #2196f3;
}

.toast-warning {
    border-left-color: #ff9800;
}

.toast-error {
    border-left-color: #f44336;
}

/* ==================== FRIEND BONUS HINT ==================== */
.friend-bonus-hint {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 24px;
    background: linear-gradient(135deg, #fff3e0 0%, #ffebcd 100%);
    border: 2px solid #ff9800;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
    animation: pulseGlow 2s ease-in-out infinite;
}

.bonus-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
    animation: bounce 1s ease-in-out infinite;
}

.bonus-text {
    flex: 1;
}

.bonus-text strong {
    display: block;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.bonus-text p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 152, 0, 0.4);
    }
    50% {
        box-shadow: 0 0 20px 5px rgba(255, 152, 0, 0.2);
    }
}

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

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 0;
    }
    
    .sidebar {
        transform: translateX(-100%);
        width: 260px;
        z-index: 1000;
    }
    
    .sidebar:not(.collapsed) {
        transform: translateX(0) !important;
        width: 260px;
        z-index: 1000;
    }
    
    .sidebar.collapsed {
        transform: translateX(-100%) !important;
    }
    
    .sidebar-overlay {
        z-index: 999;
    }
    
    .main-content {
        margin-left: 0;
        padding-top: 140px; /* large enough for fixed topbar on mobile */
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .timer-page-grid,
    .social-grid,
    .profile-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-card {
        grid-column: span 1;
    }
    
    .social-layout {
        grid-template-columns: 1fr;
    }
    
    .social-sidebar {
        order: -1;
    }
    
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
    
    .dashboard-sidebar {
        order: -1;
    }
    
    .dashboard-quick-actions {
        grid-template-columns: 1fr;
    }
    
    .lockin-stats-card {
        grid-column: span 1;
    }
    
    .lockin-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .user-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .topbar {
        padding: 12px 0;
    }
    
    .logo {
        font-size: 3.5rem;
    }
    
    .hero-section {
        padding: 40px 30px;
    }
    
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .main-grid {
        grid-template-columns: 1fr;
    }
    
    .timer-container {
        width: 240px;
        height: 240px;
    }
    
    .timer-time {
        font-size: 2.8rem;
    }
    
    .nav-content {
        padding: 0 15px;
    }
    
    .dashboard,
    .main-content {
        padding: 30px 20px;
    }
    
    .stats-preview {
        flex-direction: column;
        gap: 30px;
    }
    
    .profile-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .user-greeting {
        display: none;
    }
}

@media (max-width: 480px) {
    .stats-row {
        grid-template-columns: 1fr;
    }
    
    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .timer-container {
        width: 200px;
        height: 200px;
    }
    
    .timer-time {
        font-size: 2.2rem;
    }
    
    .leaderboard-tabs {
        flex-direction: column;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color-dark);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--ferrari-red);
}

/* Scrollbar for red sidebar */
.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* ==================== AURA SYSTEM ==================== */

/* Aura topbar badge */
.aura-topbar-badge {
    background: rgba(0,0,0,0.35);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.95rem;
    color: #FFFFFF !important;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid rgba(255,215,0,0.4);
}

.aura-topbar-badge span {
    font-weight: 800 !important;
    color: #FFD700 !important;
}

/* Aura badge (on cards and profiles) */
.aura-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

.aura-small {
    font-weight: 700;
    font-size: 0.85rem;
}

/* Aura profile section */
.aura-profile-section {
    display: flex;
    justify-content: space-around;
    align-items: center;
    text-align: center;
    gap: 20px;
    padding: 10px 0;
}

.aura-display-number {
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 4px;
}

.aura-display-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 4px;
}

.aura-display-tier {
    font-size: 0.9rem;
    font-weight: 700;
}

/* Profile views */
.profile-views-number {
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
}

.profile-views-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 600;
}

/* You Missed It */
.missed-it-card {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 20px;
    color: white;
}

[data-theme="dark"] .missed-it-card {
    background: linear-gradient(135deg, #2a1a3e, #1a2a4e);
}

.missed-it-header {
    font-weight: 800;
    font-size: 1rem;
    margin-bottom: 6px;
}

.missed-it-items {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Weekly Drop */
.drop-item {
    padding: 10px 14px;
    background: var(--bg-secondary);
    border-radius: 12px;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.drop-item:last-child {
    margin-bottom: 0;
}

/* Aura glow animations */
@keyframes auraGlow {
    0% { filter: brightness(1); }
    50% { filter: brightness(1.15); }
    100% { filter: brightness(1); }
}

@keyframes auraPulse {
    0% { opacity: 0.8; }
    50% { opacity: 1; }
    100% { opacity: 0.8; }
}

/* Aura ring classes */
.aura-ring-grey {
    box-shadow: 0 0 10px rgba(128,128,128,0.8), 0 0 20px rgba(128,128,128,0.4), 0 0 30px rgba(128,128,128,0.2) !important;
    border: 3px solid #888 !important;
    animation: auraPulse 4s ease-in-out infinite;
}

.aura-ring-bronze {
    box-shadow: 0 0 12px #CD7F32, 0 0 24px rgba(205,127,50,0.6), 0 0 36px rgba(205,127,50,0.3) !important;
    border: 3px solid #CD7F32 !important;
    animation: auraGlow 3s ease-in-out infinite;
}

.aura-ring-yellow {
    box-shadow: 0 0 14px #FFD700, 0 0 28px rgba(255,215,0,0.6), 0 0 42px rgba(255,215,0,0.3) !important;
    border: 3px solid #FFD700 !important;
    animation: auraGlow 3s ease-in-out infinite;
}

.aura-ring-blue {
    box-shadow: 0 0 16px #4169E1, 0 0 32px rgba(65,105,225,0.6), 0 0 48px rgba(65,105,225,0.3) !important;
    border: 3px solid #4169E1 !important;
    animation: auraGlow 2.5s ease-in-out infinite;
}

.aura-ring-violet {
    box-shadow: 0 0 18px #8A2BE2, 0 0 36px rgba(138,43,226,0.6), 0 0 54px rgba(138,43,226,0.3) !important;
    border: 3px solid #8A2BE2 !important;
    animation: auraGlow 2.5s ease-in-out infinite;
}

.aura-ring-green {
    box-shadow: 0 0 20px #00C853, 0 0 40px rgba(0,200,83,0.6), 0 0 60px rgba(0,200,83,0.3) !important;
    border: 3px solid #00C853 !important;
    animation: auraGlow 2s ease-in-out infinite;
}

.aura-ring-orange {
    box-shadow: 0 0 24px #FF6D00, 0 0 48px rgba(255,109,0,0.6), 0 0 72px rgba(255,109,0,0.3) !important;
    border: 3px solid #FF6D00 !important;
    animation: auraGlow 2s ease-in-out infinite;
}

.aura-ring-red {
    box-shadow: 0 0 28px #DC0000, 0 0 56px rgba(220,0,0,0.6), 0 0 84px rgba(220,0,0,0.3) !important;
    border: 3px solid #DC0000 !important;
    animation: auraGlow 1.5s ease-in-out infinite;
}

/* Mobile: hide topbar logout, show sidebar logout */
.sidebar-logout {
    display: none;
}

@media (max-width: 768px) {
    .topbar-logout {
        display: none !important;
    }
    .sidebar-logout {
        display: block !important;
    }
    .g-score-badge {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
    .aura-topbar-badge {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
}
