/**
 * Dashboard Page Styles
 * Ultra-modern user profile, achievements, and gamification
 * With cosmic effects, glassmorphism, and neon animations
 */

/* ============================================
   CSS Variables
   ============================================ */
:root {
    --dashboard-gradient: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
    --xp-gradient: linear-gradient(90deg, #fbbf24, #f59e0b, #ef4444);
    --achievement-gold: linear-gradient(135deg, #ffd700, #ffb347);
    --achievement-silver: linear-gradient(135deg, #c0c0c0, #9ca3af);
    --achievement-bronze: linear-gradient(135deg, #cd7f32, #92400e);
    --neon-purple: #a855f7;
    --neon-blue: #3b82f6;
    --glass-bg: rgba(15, 15, 25, 0.8);
    --glass-border: rgba(255, 255, 255, 0.08);
}

/* ============================================
   Cosmic Background
   ============================================ */
.dashboard-page {
    background: linear-gradient(135deg, #0a0a0f 0%, #0d0d18 50%, #0a0a12 100%);
    min-height: 100vh;
    position: relative;
}

.dashboard-page::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(2px 2px at 20px 30px, rgba(139, 92, 246, 0.4), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(59, 130, 246, 0.3), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(251, 191, 36, 0.5), transparent),
        radial-gradient(2px 2px at 130px 80px, rgba(139, 92, 246, 0.3), transparent);
    background-size: 200px 200px;
    animation: starTwinkle 4s ease-in-out infinite alternate;
    z-index: 0;
}

@keyframes starTwinkle {
    0% {
        opacity: 0.3;
    }

    100% {
        opacity: 0.6;
    }
}

/* ============================================
   Profile Header
   ============================================ */
.profile-header {
    position: relative;
    padding: 140px 0 50px;
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.12) 0%, transparent 100%);
    overflow: hidden;
}

.profile-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 400px;
    background: radial-gradient(ellipse, rgba(139, 92, 246, 0.2), transparent 70%);
    filter: blur(60px);
    pointer-events: none;
}

.profile-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 36px;
    padding: 40px;
    background: linear-gradient(145deg, rgba(15, 15, 25, 0.95), rgba(20, 20, 35, 0.9));
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    backdrop-filter: blur(40px);
    flex-wrap: wrap;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, transparent 50%);
    pointer-events: none;
}

.profile-card:hover {
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 20px 60px rgba(139, 92, 246, 0.15);
}

.profile-avatar {
    position: relative;
    flex-shrink: 0;
}

.profile-avatar img {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 4px solid rgba(139, 92, 246, 0.5);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.3);
    transition: all 0.3s;
}

.profile-avatar:hover img {
    border-color: rgba(139, 92, 246, 0.8);
    box-shadow: 0 0 60px rgba(139, 92, 246, 0.5);
}

.level-badge {
    position: absolute;
    bottom: -6px;
    right: -6px;
    width: 42px;
    height: 42px;
    background: var(--dashboard-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
    color: white;
    border: 4px solid #0a0a0f;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
    animation: levelPulse 2s ease-in-out infinite;
}

@keyframes levelPulse {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
    }

    50% {
        box-shadow: 0 0 35px rgba(139, 92, 246, 0.8);
    }
}

.profile-info {
    flex: 1;
    min-width: 200px;
}

.username {
    font-size: 32px;
    font-weight: 900;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #fff, rgba(255, 255, 255, 0.9));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.user-title {
    font-size: 15px;
    color: var(--neon-purple);
    font-weight: 600;
    margin-bottom: 18px;
    text-shadow: 0 0 20px rgba(168, 85, 247, 0.5);
}

.user-stats {
    display: flex;
    gap: 36px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.user-stats .stat-value {
    font-size: 22px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    background: var(--dashboard-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.user-stats .stat-label {
    font-size: 12px;
    color: var(--color-text-secondary);
}

.profile-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--dashboard-gradient);
    border: none;
    color: white;
    box-shadow: 0 6px 25px rgba(139, 92, 246, 0.4);
}

.profile-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.5);
}

.profile-btn.secondary {
    background: linear-gradient(145deg, rgba(15, 15, 25, 0.95), rgba(20, 20, 35, 0.9));
    border: 1px solid var(--glass-border);
    color: var(--color-text);
    box-shadow: none;
}

.profile-btn.secondary:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.3);
}

/* XP Progress */
.xp-progress {
    margin-top: 28px;
    padding: 24px 28px;
    background: linear-gradient(145deg, rgba(15, 15, 25, 0.95), rgba(20, 20, 35, 0.9));
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    backdrop-filter: blur(30px);
}

.xp-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 14px;
    font-size: 13px;
}

.xp-info span:first-child {
    color: var(--color-text-secondary);
}

.xp-info span:nth-child(2) {
    color: var(--neon-purple);
    font-weight: 700;
    text-shadow: 0 0 15px rgba(168, 85, 247, 0.5);
}

.xp-info span:last-child {
    color: var(--color-text-secondary);
}

.xp-bar {
    height: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 5px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.xp-fill {
    height: 100%;
    background: var(--xp-gradient);
    border-radius: 5px;
    transition: width 0.6s ease;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
    animation: xpGlow 2s ease-in-out infinite alternate;
}

@keyframes xpGlow {
    0% {
        box-shadow: 0 0 15px rgba(251, 191, 36, 0.4);
    }

    100% {
        box-shadow: 0 0 30px rgba(251, 191, 36, 0.7);
    }
}

/* ============================================
   Quick Stats
   ============================================ */
.quick-stats {
    position: relative;
    padding: 30px 0 50px;
}

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

@media (max-width: 1000px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.stat-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 28px;
    background: linear-gradient(145deg, rgba(15, 15, 25, 0.95), rgba(20, 20, 35, 0.9));
    border: 1px solid var(--glass-border);
    border-radius: 22px;
    backdrop-filter: blur(40px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.stat-card:hover {
    transform: translateY(-6px);
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), 0 0 40px rgba(139, 92, 246, 0.1);
}

.stat-icon {
    font-size: 36px;
    filter: drop-shadow(0 4px 15px rgba(139, 92, 246, 0.3));
}

.stat-content {
    flex: 1;
}

.stat-card .stat-value {
    display: block;
    font-size: 26px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    background: linear-gradient(135deg, #fff, rgba(255, 255, 255, 0.9));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-card .stat-label {
    font-size: 13px;
    color: var(--color-text-secondary);
}

.stat-change {
    font-size: 13px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-positive);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

.stat-change.positive {
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-positive);
}

.stat-change.negative {
    background: rgba(239, 68, 68, 0.15);
    color: var(--color-negative);
}

/* ============================================
   Dashboard Grid
   ============================================ */
.dashboard-grid-section {
    position: relative;
    padding: 0 0 80px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

@media (max-width: 1100px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.dashboard-card {
    position: relative;
    background: linear-gradient(145deg, rgba(15, 15, 25, 0.95), rgba(20, 20, 35, 0.9));
    border: 1px solid var(--glass-border);
    border-radius: 26px;
    padding: 28px;
    backdrop-filter: blur(40px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.dashboard-card:hover {
    border-color: rgba(139, 92, 246, 0.35);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25), 0 0 40px rgba(139, 92, 246, 0.1);
}

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

.card-header h2 {
    font-size: 17px;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, rgba(255, 255, 255, 0.9));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.see-all {
    font-size: 13px;
    color: var(--neon-purple);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.see-all:hover {
    text-decoration: underline;
    text-shadow: 0 0 15px rgba(168, 85, 247, 0.5);
}

/* Achievements Card */
.achievements-card {
    grid-column: span 2;
}

@media (max-width: 700px) {
    .achievements-card {
        grid-column: span 1;
    }
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

@media (max-width: 700px) {
    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.achievement-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: linear-gradient(145deg, rgba(20, 20, 30, 0.9), rgba(25, 25, 40, 0.8));
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.achievement-item:hover {
    transform: translateY(-6px);
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(139, 92, 246, 0.15);
}

.achievement-item.locked {
    opacity: 0.35;
    filter: grayscale(0.8);
}

.achievement-icon {
    font-size: 40px;
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 15px rgba(251, 191, 36, 0.3));
}

.achievement-name {
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    color: var(--color-text-secondary);
}

/* Activity Card */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 320px;
    overflow-y: auto;
}

.activity-list::-webkit-scrollbar {
    width: 4px;
}

.activity-list::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3);
    border-radius: 2px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: linear-gradient(145deg, rgba(20, 20, 30, 0.9), rgba(25, 25, 40, 0.8));
    border-radius: 14px;
    border: 1px solid transparent;
    transition: all 0.3s;
}

.activity-item:hover {
    border-color: rgba(139, 92, 246, 0.3);
    background: rgba(139, 92, 246, 0.1);
}

.activity-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(59, 130, 246, 0.15));
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-size: 14px;
    font-weight: 600;
}

.activity-time {
    font-size: 11px;
    color: var(--color-text-secondary);
}

.activity-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-positive);
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

/* Arena Stats Card */
.arena-stats {
    display: flex;
    justify-content: space-around;
    padding: 24px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 18px;
}

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

.arena-stat-value {
    display: block;
    font-size: 32px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    background: linear-gradient(135deg, #fff, rgba(255, 255, 255, 0.9));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.arena-stat-label {
    font-size: 12px;
    color: var(--color-text-secondary);
}

.arena-stat.win-rate .arena-stat-value {
    background: linear-gradient(135deg, #10b981, #22d3ee);
    -webkit-background-clip: text;
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.arena-rank {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: linear-gradient(145deg, rgba(20, 20, 30, 0.9), rgba(25, 25, 40, 0.8));
    border-radius: 14px;
    border: 1px solid rgba(192, 192, 192, 0.15);
}

.rank-badge {
    font-size: 36px;
    filter: drop-shadow(0 4px 15px rgba(192, 192, 192, 0.4));
}

.rank-name {
    font-size: 17px;
    font-weight: 700;
    flex: 1;
}

.rank-progress {
    font-size: 12px;
    color: var(--color-text-secondary);
}

/* Watchlist Card */
.watchlist-preview {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.watchlist-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: linear-gradient(145deg, rgba(20, 20, 30, 0.9), rgba(25, 25, 40, 0.8));
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.watchlist-item:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.3);
}

.watchlist-item img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

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

.watchlist-item-symbol {
    font-size: 14px;
    font-weight: 700;
}

.watchlist-item-name {
    font-size: 11px;
    color: var(--color-text-secondary);
}

.watchlist-item-price {
    font-size: 15px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.watchlist-item-change {
    font-size: 12px;
    margin-left: 8px;
}

.watchlist-item-change.positive {
    color: var(--color-positive);
}

.watchlist-item-change.negative {
    color: var(--color-negative);
}

/* Streak Card */
.streak-content {
    text-align: center;
}

.streak-number {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 24px;
}

.streak-flame {
    font-size: 48px;
    animation: flameFlicker 1s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(251, 191, 36, 0.6));
}

@keyframes flameFlicker {

    0%,
    100% {
        transform: scale(1) rotate(-2deg);
    }

    50% {
        transform: scale(1.15) rotate(2deg);
    }
}

.streak-value {
    font-size: 56px;
    font-weight: 900;
    font-family: 'JetBrains Mono', monospace;
    background: var(--xp-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px rgba(251, 191, 36, 0.5);
}

.streak-label {
    font-size: 18px;
    color: var(--color-text-secondary);
}

.streak-calendar {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 18px;
}

.streak-day {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    transition: all 0.3s;
}

.streak-day.active {
    background: var(--xp-gradient);
    border-color: transparent;
    color: white;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.4);
}

.streak-day.today {
    border-color: var(--neon-purple);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
}

.streak-message {
    font-size: 14px;
    color: var(--color-text-secondary);
}

/* Leaderboard Card */
.leaderboard-preview {
    text-align: center;
}

.rank-position {
    margin-bottom: 24px;
}

.rank-number {
    font-size: 48px;
    font-weight: 900;
    font-family: 'JetBrains Mono', monospace;
    background: var(--dashboard-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rankGlow 2s ease-in-out infinite alternate;
}

@keyframes rankGlow {
    0% {
        filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.3));
    }

    100% {
        filter: drop-shadow(0 0 25px rgba(139, 92, 246, 0.6));
    }
}

.rank-total {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin-left: 8px;
}

.rank-categories {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rank-cat {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(145deg, rgba(20, 20, 30, 0.9), rgba(25, 25, 40, 0.8));
    border-radius: 12px;
    transition: all 0.3s;
}

.rank-cat:hover {
    background: rgba(139, 92, 246, 0.1);
}

.cat-name {
    font-size: 13px;
    color: var(--color-text-secondary);
}

.cat-rank {
    font-size: 15px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--neon-purple);
    text-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
}

/* ============================================
   All Achievements Section
   ============================================ */
.all-achievements-section {
    position: relative;
    padding: 80px 0 120px;
    background: linear-gradient(180deg, transparent, rgba(139, 92, 246, 0.03), transparent);
}

.section-title {
    font-size: 32px;
    font-weight: 900;
    text-align: center;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #fff, rgba(255, 255, 255, 0.9));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    text-align: center;
    font-size: 16px;
    color: var(--color-text-secondary);
    margin-bottom: 40px;
}

.achievement-categories {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.cat-btn {
    padding: 12px 24px;
    background: linear-gradient(145deg, rgba(15, 15, 25, 0.95), rgba(20, 20, 35, 0.9));
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--color-text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
}

.cat-btn:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.3);
    color: var(--color-text);
}

.cat-btn.active {
    background: var(--dashboard-gradient);
    border-color: transparent;
    color: white;
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.4);
}

.achievements-full-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
}

.achievement-card {
    position: relative;
    background: linear-gradient(145deg, rgba(15, 15, 25, 0.95), rgba(20, 20, 35, 0.9));
    border: 1px solid var(--glass-border);
    border-radius: 22px;
    padding: 28px;
    text-align: center;
    cursor: pointer;
    backdrop-filter: blur(40px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.achievement-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.achievement-card:hover {
    transform: translateY(-8px);
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), 0 0 40px rgba(139, 92, 246, 0.15);
}

.achievement-card.locked {
    opacity: 0.35;
    filter: grayscale(0.8);
}

.achievement-card.locked:hover {
    filter: grayscale(0.5);
    opacity: 0.5;
}

.achievement-card-icon {
    font-size: 54px;
    margin-bottom: 18px;
    filter: drop-shadow(0 4px 20px rgba(251, 191, 36, 0.4));
}

.achievement-card-name {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 10px;
}

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

.achievement-card-xp {
    display: inline-block;
    padding: 6px 16px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(59, 130, 246, 0.15));
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--neon-purple);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}

.achievement-card.gold {
    border-color: rgba(255, 215, 0, 0.35);
}

.achievement-card.gold:hover {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), 0 0 40px rgba(255, 215, 0, 0.15);
}

.achievement-card.silver {
    border-color: rgba(192, 192, 192, 0.35);
}

.achievement-card.bronze {
    border-color: rgba(205, 127, 50, 0.35);
}

/* ============================================
   Achievement Modal
   ============================================ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    background: linear-gradient(145deg, rgba(15, 15, 25, 0.98), rgba(20, 20, 35, 0.95));
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    backdrop-filter: blur(40px);
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.5), 0 0 60px rgba(139, 92, 246, 0.15);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    font-size: 26px;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.3s;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

.achievement-modal-content {
    max-width: 420px;
    text-align: center;
}

.achievement-modal-body {
    padding: 56px 36px;
}

.modal-achievement-icon {
    font-size: 90px;
    margin-bottom: 28px;
    animation: achievementPop 0.5s ease-out;
    filter: drop-shadow(0 0 30px rgba(251, 191, 36, 0.5));
}

@keyframes achievementPop {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.25);
    }

    100% {
        transform: scale(1);
    }
}

.modal-achievement-name {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 14px;
    background: linear-gradient(135deg, #fff, rgba(255, 255, 255, 0.9));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ============================================
   LIGHT THEME OVERRIDES
   ============================================ */
[data-theme="light"] {
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(0, 0, 0, 0.08);
    --neon-purple: #7c3aed;
    --neon-blue: #2563eb;
}

[data-theme="light"] .dashboard-page {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
}

[data-theme="light"] .dashboard-page::before {
    opacity: 0.1;
}

[data-theme="light"] .profile-header {
    background: linear-gradient(180deg, rgba(124, 58, 237, 0.08) 0%, transparent 100%);
}

[data-theme="light"] .profile-card,
[data-theme="light"] .stat-card,
[data-theme="light"] .dashboard-card,
[data-theme="light"] .xp-progress {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .profile-card::before,
[data-theme="light"] .stat-card::before,
[data-theme="light"] .dashboard-card::before {
    background: none;
}

[data-theme="light"] .username,
[data-theme="light"] .stat-card .stat-value,
[data-theme="light"] .card-header h2,
[data-theme="light"] .arena-stat-value,
[data-theme="light"] .modal-achievement-name {
    background: linear-gradient(135deg, #1f2937, #374151);
    -webkit-background-clip: text;
}

[data-theme="light"] .profile-avatar img {
    border-color: rgba(124, 58, 237, 0.4);
    box-shadow: 0 0 30px rgba(124, 58, 237, 0.2);
}

[data-theme="light"] .level-badge {
    border-color: #ffffff;
}

[data-theme="light"] .xp-bar {
    background: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .achievement-item,
[data-theme="light"] .activity-item,
[data-theme="light"] .arena-rank,
[data-theme="light"] .watchlist-item,
[data-theme="light"] .streak-day {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .achievement-item:hover,
[data-theme="light"] .activity-item:hover,
[data-theme="light"] .watchlist-item:hover {
    background: rgba(124, 58, 237, 0.08);
    border-color: rgba(124, 58, 237, 0.2);
}

[data-theme="light"] .activity-icon {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(37, 99, 235, 0.1));
}

[data-theme="light"] .profile-btn.secondary {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
    color: #374151;
}

[data-theme="light"] .see-all {
    color: #7c3aed;
}

[data-theme="light"] .user-title {
    color: #7c3aed;
    text-shadow: none;
}

[data-theme="light"] .achievement-name,
[data-theme="light"] .activity-time,
[data-theme="light"] .arena-stat-label,
[data-theme="light"] .rank-progress,
[data-theme="light"] .watchlist-item-name,
[data-theme="light"] .streak-label,
[data-theme="light"] .leaderboard-rank,
[data-theme="light"] .xp-info span:first-child,
[data-theme="light"] .xp-info span:last-child,
[data-theme="light"] .stat-card .stat-label,
[data-theme="light"] .user-stats .stat-label {
    color: #64748b;
}

[data-theme="light"] .activity-title,
[data-theme="light"] .watchlist-item-symbol,
[data-theme="light"] .rank-name,
[data-theme="light"] .leaderboard-name {
    color: #1f2937;
}

[data-theme="light"] .leaderboard-item {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .leaderboard-item:hover {
    background: rgba(124, 58, 237, 0.06);
}

/* ============================================
   Quick Actions Bar
   ============================================ */
.quick-actions-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    padding: 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow-x: auto;
    backdrop-filter: blur(20px);
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    color: var(--color-text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    min-width: 90px;
    transition: all 0.3s ease;
}

.quick-action-btn:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateY(-4px);
}

.quick-action-btn .qa-icon {
    font-size: 24px;
}

/* ============================================
   Akademi Progress Card
   ============================================ */
.akademi-card {
    grid-column: span 2;
}

.akademi-progress {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.akademi-stat-row {
    display: flex;
    justify-content: space-around;
    gap: 16px;
}

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

.akademi-stat .stat-num {
    display: block;
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.akademi-stat .stat-txt {
    font-size: 12px;
    color: var(--color-text-muted);
}

.progress-bar-container {
    margin-top: 8px;
}

.progress-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 8px;
    color: var(--color-text-muted);
}

.progress-bar {
    height: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #3b82f6, #06b6d4);
    border-radius: 10px;
    transition: width 0.5s ease;
}

.current-course {
    padding: 14px 18px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.current-course .course-label {
    font-size: 13px;
    color: var(--color-text-muted);
}

.current-course .course-name {
    font-size: 14px;
    font-weight: 600;
    color: #a78bfa;
}

/* ============================================
   Goals Card
   ============================================ */
.goals-card .goals-progress {
    font-size: 14px;
    font-weight: 700;
    background: linear-gradient(135deg, #10b981, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.goals-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.goal-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.goal-item.completed {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.2);
}

.goal-item.completed .goal-text {
    text-decoration: line-through;
    opacity: 0.7;
}

.goal-check {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    font-size: 12px;
    color: #10b981;
}

.goal-item.completed .goal-check {
    background: #10b981;
    color: white;
}

.goal-text {
    flex: 1;
    font-size: 14px;
}

.goal-reward {
    font-size: 12px;
    font-weight: 600;
    color: #fbbf24;
}

.goals-bonus {
    padding: 14px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(245, 158, 11, 0.05));
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.bonus-reward {
    font-weight: 700;
    color: #fbbf24;
}

/* ============================================
   Referral Card
   ============================================ */
.referral-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.referral-stats {
    display: flex;
    justify-content: space-around;
}

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

.ref-stat .ref-num {
    display: block;
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ref-stat .ref-txt {
    font-size: 12px;
    color: var(--color-text-muted);
}

.referral-code-box {
    padding: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed rgba(245, 158, 11, 0.3);
    border-radius: 12px;
}

.ref-label {
    font-size: 12px;
    color: var(--color-text-muted);
    display: block;
    margin-bottom: 8px;
}

.ref-code-wrapper {
    display: flex;
    gap: 12px;
    align-items: center;
}

.ref-code-wrapper code {
    flex: 1;
    font-size: 18px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: #f59e0b;
    letter-spacing: 2px;
}

.copy-btn {
    padding: 8px 14px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    color: #f59e0b;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: rgba(245, 158, 11, 0.25);
}

.referral-tiers {
    display: flex;
    gap: 8px;
}

.referral-tiers .tier {
    flex: 1;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    font-size: 12px;
    text-align: center;
    color: var(--color-text-muted);
}

.referral-tiers .tier.active {
    background: rgba(205, 127, 50, 0.15);
    border-color: rgba(205, 127, 50, 0.4);
    color: #cd7f32;
    font-weight: 600;
}

/* ============================================
   Trading History Card
   ============================================ */
.trading-summary {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--glass-border);
}

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

.trade-stat .trade-val {
    display: block;
    font-size: 20px;
    font-weight: 800;
}

.trade-stat .trade-val.positive {
    color: #10b981;
}

.trade-stat .trade-lbl {
    font-size: 12px;
    color: var(--color-text-muted);
}

.recent-trades {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.trade-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

.trade-item .trade-type {
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
}

.trade-item.buy .trade-type {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.trade-item.sell .trade-type {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.trade-item .trade-asset {
    font-weight: 700;
    flex: 1;
}

.trade-item .trade-amount {
    color: var(--color-text-muted);
    font-size: 13px;
}

.trade-item .trade-pnl {
    font-weight: 700;
    font-size: 13px;
}

.trade-pnl.positive {
    color: #10b981;
}

.trade-pnl.negative {
    color: #ef4444;
}

/* ============================================
   AI Insights Card
   ============================================ */
.ai-insights {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.insight-item {
    display: flex;
    gap: 14px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    transition: all 0.2s;
}

.insight-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.insight-icon {
    font-size: 24px;
}

.insight-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.insight-title {
    font-weight: 600;
    font-size: 14px;
}

.insight-desc {
    font-size: 12px;
    color: var(--color-text-muted);
}

/* ============================================
   Arena Next Match
   ============================================ */
.arena-next-match {
    margin-top: 16px;
    padding: 14px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(59, 130, 246, 0.05));
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.arena-next-match .countdown {
    font-weight: 700;
    color: #10b981;
}

/* ============================================
   Streak Rewards
   ============================================ */
.streak-rewards {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--glass-border);
}

.streak-rewards .sr-title {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-bottom: 10px;
    display: block;
}

.streak-rewards .sr-items {
    display: flex;
    gap: 8px;
}

.streak-rewards .sr-item {
    flex: 1;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    font-size: 12px;
    text-align: center;
    color: var(--color-text-muted);
}

.streak-rewards .sr-item.achieved {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: #10b981;
    font-weight: 600;
}

/* ============================================
   Rank Change
   ============================================ */
.rank-change {
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}

.rank-change.positive {
    color: #10b981;
}

.rank-change.negative {
    color: #ef4444;
}

/* ============================================
   Alerts Card
   ============================================ */
.alerts-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.alert-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

.alert-item.triggered {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.2);
}

.alert-icon {
    font-size: 20px;
}

.alert-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.alert-asset {
    font-weight: 700;
    font-size: 14px;
}

.alert-condition {
    font-size: 12px;
    color: var(--color-text-muted);
}

.alert-status {
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
}

.alert-status.pending {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.alert-status.done {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .quick-actions-bar {
        gap: 8px;
        padding: 12px;
    }

    .quick-action-btn {
        padding: 12px 16px;
        min-width: 70px;
        font-size: 11px;
    }

    .quick-action-btn .qa-icon {
        font-size: 20px;
    }

    .akademi-card {
        grid-column: span 1;
    }

    .akademi-stat-row {
        flex-wrap: wrap;
    }

    .referral-tiers {
        flex-wrap: wrap;
    }
}

/* ============================================
   PREMIUM SECTION STYLES
   ============================================ */

.premium-section {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--glass-border);
}

.section-header-premium {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.section-header-premium h2 {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.premium-badge {
    padding: 6px 14px;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    color: #000;
    letter-spacing: 1px;
}

.premium-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

.premium-card {
    position: relative;
    border: 1px solid rgba(255, 215, 0, 0.2) !important;
    overflow: visible;
}

.premium-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), transparent 50%);
    pointer-events: none;
}

.premium-tag {
    position: absolute;
    top: -10px;
    right: 20px;
    padding: 5px 12px;
    background: linear-gradient(135deg, #ff8c00, #ff6b00);
    border-radius: 8px;
    font-size: 10px;
    font-weight: 800;
    color: white;
    letter-spacing: 0.5px;
    z-index: 10;
}

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

/* ========== XM Quest Card ========== */
.xm-quest-card {
    border-color: rgba(16, 185, 129, 0.3) !important;
}

.xm-quest-card::before {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), transparent 50%);
}

.multiplier-badge {
    padding: 5px 12px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: white;
}

.xm-content {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.xm-progress-ring {
    position: relative;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.xm-progress-ring svg {
    transform: rotate(-90deg);
}

.ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 8;
}

.ring-fill {
    fill: none;
    stroke: url(#xmGradient);
    stroke: #10b981;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.xm-progress-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.xm-percent {
    font-size: 22px;
    font-weight: 800;
    color: #10b981;
}

.xm-label {
    font-size: 10px;
    color: var(--color-text-muted);
}

.xm-tasks {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.xm-task {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    font-size: 13px;
}

.xm-task.completed {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.2);
}

.xm-task.completed span:nth-child(2) {
    text-decoration: line-through;
    opacity: 0.7;
}

.xm-task .task-check {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    font-size: 11px;
}

.xm-task.completed .task-check {
    background: #10b981;
    color: white;
}

.xm-task .task-reward {
    margin-left: auto;
    font-weight: 700;
    color: #10b981;
}

.xm-cta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--glass-border);
}

.xm-earned {
    font-size: 14px;
    color: var(--color-text-muted);
}

.xm-earned strong {
    font-size: 18px;
    color: #10b981;
}

.xm-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 10px;
    color: white;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.xm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

/* ========== Risk Lab ========== */
.risk-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.risk-metric {
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    text-align: center;
}

.metric-label {
    display: block;
    font-size: 11px;
    color: var(--color-text-muted);
    margin-bottom: 4px;
}

.metric-value {
    font-size: 16px;
    font-weight: 700;
}

.metric-value.positive {
    color: #10b981;
}

.metric-value.negative {
    color: #ef4444;
}

.correlation-mini {
    padding: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

.corr-label {
    display: block;
    font-size: 12px;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}

.corr-heatmap {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.corr-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.corr-cell.high {
    background: rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.corr-cell.med {
    background: rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

.corr-cell.low {
    background: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
}

.corr-cell.neg {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* ========== Event Impact ========== */
.event-highlight {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.05));
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    margin-bottom: 16px;
}

.event-name {
    font-weight: 700;
    font-size: 15px;
}

.event-date {
    font-size: 12px;
    color: var(--color-text-muted);
}

.impact-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.impact-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.impact-val.positive {
    color: #10b981;
    font-weight: 600;
}

.impact-val.negative {
    color: #ef4444;
    font-weight: 600;
}

.confidence-bar {
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
}

.confidence-bar span {
    display: block;
    font-size: 12px;
    margin-bottom: 8px;
}

.conf-fill {
    height: 6px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 6px;
}

/* ========== Smart Alerts 2.0 ========== */
.smart-alerts-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alert-rule {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

.rule-icon {
    font-size: 20px;
}

.rule-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rule-name {
    font-weight: 600;
    font-size: 14px;
}

.rule-code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #a78bfa;
    background: rgba(139, 92, 246, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
}

.rule-status {
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
}

.rule-status.active {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.rule-status.paused {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.create-alert-btn,
.generate-report-btn {
    padding: 12px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(59, 130, 246, 0.1));
    border: 1px dashed rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    color: #a78bfa;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.create-alert-btn:hover,
.generate-report-btn:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(59, 130, 246, 0.2));
}

/* ========== Backtest ========== */
.backtest-strategy {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(236, 72, 153, 0.05));
    border-radius: 12px;
    margin-bottom: 16px;
}

.strategy-name {
    font-weight: 700;
}

.strategy-symbol {
    color: var(--color-text-muted);
    font-size: 13px;
}

.backtest-results {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.bt-metric {
    text-align: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
}

.bt-label {
    display: block;
    font-size: 11px;
    color: var(--color-text-muted);
}

.bt-value {
    font-size: 16px;
    font-weight: 700;
}

.bt-value.positive {
    color: #10b981;
}

.bt-value.negative {
    color: #ef4444;
}

.equity-curve-mini {
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
}

.mini-chart {
    width: 100%;
    height: 40px;
}

/* ========== Reports ========== */
.reports-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.report-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

.report-item.scheduled {
    border-color: rgba(251, 191, 36, 0.3);
    background: rgba(251, 191, 36, 0.05);
}

.report-icon {
    font-size: 20px;
}

.report-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.report-name {
    font-weight: 600;
    font-size: 14px;
}

.report-date {
    font-size: 12px;
    color: var(--color-text-muted);
}

.report-download {
    padding: 6px 12px;
    background: rgba(239, 68, 68, 0.15);
    border-radius: 8px;
    color: #ef4444;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.report-status {
    padding: 5px 10px;
    background: rgba(251, 191, 36, 0.15);
    border-radius: 8px;
    color: #fbbf24;
    font-size: 11px;
    font-weight: 600;
}

/* ========== Pro Terminal ========== */
.terminal-preview {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.terminal-layout {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 12px;
    min-height: 120px;
}

.tp-panel {
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
}

.panel-title {
    display: block;
    font-size: 11px;
    color: var(--color-text-muted);
    margin-bottom: 10px;
}

.mini-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
}

.chart-panel {
    display: flex;
    flex-direction: column;
}

.preview-chart {
    flex: 1;
    min-height: 60px;
}

.terminal-features {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.tf-item {
    font-size: 12px;
    color: #10b981;
}

/* ========== Flows ========== */
.flows-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.flow-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

.flow-item.bullish {
    border-left: 3px solid #10b981;
}

.flow-item.bearish {
    border-left: 3px solid #ef4444;
}

.flow-item.neutral {
    border-left: 3px solid #fbbf24;
}

.flow-icon {
    font-size: 20px;
}

.flow-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.flow-asset {
    font-weight: 700;
    font-size: 14px;
}

.flow-signal {
    font-size: 12px;
    color: var(--color-text-muted);
}

.flow-time {
    font-size: 11px;
    color: var(--color-text-muted);
}

/* ========== Referral Pro ========== */
.referral-pro-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.funnel-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.funnel-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    min-width: 60px;
}

.step-icon {
    font-size: 18px;
}

.step-value {
    font-size: 18px;
    font-weight: 800;
    color: #8b5cf6;
}

.step-label {
    font-size: 10px;
    color: var(--color-text-muted);
}

.funnel-arrow {
    color: var(--color-text-muted);
    font-size: 18px;
}

.conversion-rate,
.estimated-revenue {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    font-size: 14px;
}

.conv-value {
    font-weight: 700;
    color: #8b5cf6;
}

.rev-value {
    font-weight: 700;
}

.rev-value.positive {
    color: #10b981;
}

/* ========== Responsive for Premium ========== */
@media (max-width: 1024px) {
    .wide-card {
        grid-column: span 1;
    }

    .terminal-layout {
        grid-template-columns: 1fr;
    }

    .xm-content {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 768px) {
    .premium-grid {
        grid-template-columns: 1fr;
    }

    .funnel-stats {
        gap: 4px;
    }

    .funnel-step {
        padding: 8px 10px;
        min-width: 50px;
    }

    .step-value {
        font-size: 14px;
    }
}