/* RGB Gaming Aesthetic Revolution */
:root {
    --primary-bg: #0a0a0f;
    --secondary-bg: rgba(15, 15, 25, 0.95);
    --card-bg: rgba(20, 25, 35, 0.7);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --rgb-red: #ff0040;
    --rgb-green: #00ff80;
    --rgb-blue: #0080ff;
    --rgb-purple: #8040ff;
    --rgb-cyan: #00ffff;
    --rgb-yellow: #ffff00;
    --accent-color: var(--rgb-cyan);
    --text-primary: #ffffff;
    --text-secondary: #b0b8c4;
    --text-muted: #7a8394;
    --border-color: rgba(255, 255, 255, 0.1);
    --glow-rgb: 0 0 30px;
    --steam-glow: #66c0f4;
    --playstation-glow: #0070d1;
    --xbox-glow: #9bf00b;
    --nintendo-glow: #ff6b6b;
    --epic-glow: #ffffff;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--primary-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 15% 85%, rgba(255, 0, 64, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 85% 15%, rgba(0, 255, 128, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(0, 128, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
    animation: rgbShift 12s ease-in-out infinite;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px, 30px 30px;
    pointer-events: none;
    z-index: -1;
    animation: circuitFlow 20s linear infinite;
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    background: var(--secondary-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo i {
    font-size: 2rem;
    color: var(--accent-cyan);
    animation: logoGlow 3s ease-in-out infinite;
    filter: drop-shadow(var(--glow-cyan));
}

.logo-text h1 {
    font-size: 1.8rem;
    color: var(--text-primary);
    font-weight: 600;
    margin: 0;
}

.logo-text small {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
    display: block;
    margin-top: -0.2rem;
}

.nav-menu {
    display: flex;
    gap: 1rem;
}

.nav-btn {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: rgba(88, 166, 255, 0.1);
}

.nav-btn.active {
    background: var(--accent-color);
    color: var(--primary-bg);
    border-color: var(--accent-color);
}

.header-controls {
    display: flex;
    gap: 1rem;
}

.export-btn, .theme-toggle {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.export-btn:hover, .theme-toggle:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: rgba(88, 166, 255, 0.1);
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

.section {
    display: none;
    animation: sectionReveal 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes sectionReveal {
    0% { 
        opacity: 0; 
        transform: translateY(40px) scale(0.95);
        filter: blur(10px);
    }
    100% { 
        opacity: 1; 
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.section.active {
    display: block;
}

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

.section-header h2 {
    font-size: 2rem;
    color: var(--text-primary);
    font-weight: 600;
}

/* Time Filters */
.time-filters {
    display: flex;
    gap: 0.5rem;
}

.filter-btn {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.filter-btn.active {
    background: var(--accent-color);
    color: var(--primary-bg);
    border-color: var(--accent-color);
}

/* Dashboard Grid */
.dashboard-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.stats-row .stat-card {
    animation: cardReveal 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
    transform: translateY(60px) rotateX(-15deg);
}

.stats-row .stat-card:nth-child(1) { animation-delay: 0.1s; }
.stats-row .stat-card:nth-child(2) { animation-delay: 0.2s; }
.stats-row .stat-card:nth-child(3) { animation-delay: 0.3s; }
.stats-row .stat-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes cardReveal {
    0% {
        opacity: 0;
        transform: translateY(60px) rotateX(-15deg) scale(0.9);
        filter: blur(5px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0deg) scale(1);
        filter: blur(0);
    }
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transform-style: preserve-3d;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--rgb-cyan);
    border-radius: 20px 20px 0 0;
    opacity: 0.7;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(0, 255, 255, 0.15) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    border-radius: 20px;
}

.stat-card:hover {
    transform: translateY(-8px) rotateX(5deg) scale(1.03);
    border-color: transparent;
    box-shadow: 
        0 0 40px rgba(0, 255, 255, 0.4),
        0 20px 60px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card:hover::after {
    opacity: 1;
}

.stat-card[data-platform="steam"]:hover {
    box-shadow: 0 0 40px rgba(102, 192, 244, 0.5), 0 20px 60px rgba(0, 0, 0, 0.6);
}

.stat-card[data-platform="playstation"]:hover {
    box-shadow: 0 0 40px rgba(0, 112, 209, 0.5), 0 20px 60px rgba(0, 0, 0, 0.6);
}

.stat-card[data-platform="xbox"]:hover {
    box-shadow: 0 0 40px rgba(155, 240, 11, 0.5), 0 20px 60px rgba(0, 0, 0, 0.6);
}

.stat-card[data-platform="nintendo"]:hover {
    box-shadow: 0 0 40px rgba(255, 107, 107, 0.5), 0 20px 60px rgba(0, 0, 0, 0.6);
}

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.stat-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.stat-card:hover .stat-icon::before {
    transform: translateX(100%);
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotateY(10deg);
}

.stat-icon.steam { background: var(--steam-color); color: #66c0f4; }
.stat-icon.playstation { background: var(--playstation-color); color: #00d4ff; }
.stat-icon.xbox { background: var(--xbox-color); color: #9bf00b; }
.stat-icon.nintendo { background: var(--nintendo-color); color: #ffffff; }

.stat-info h3 {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.stat-card:hover .stat-info h3 {
    transform: scale(1.05);
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
}

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

/* Charts */
.chart-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.chart-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    height: 400px;
}

.chart-card canvas {
    max-height: 300px !important;
}

.chart-card:hover {
    border-color: var(--accent-purple);
    box-shadow: var(--glow-purple), 0 8px 32px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.chart-card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 500;
}

/* Activity List */
.activity-list {
    max-height: 300px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.activity-item:hover {
    background: rgba(88, 166, 255, 0.1);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.activity-info h4 {
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.activity-info p {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Library Section */
.library-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-input, .platform-filter {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.8rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.search-input {
    flex: 1;
    min-width: 200px;
}

.search-input:focus, .platform-filter:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.2);
}

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

.game-card {
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 1.5rem;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

.game-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(45deg, var(--rgb-cyan), var(--rgb-purple), var(--rgb-green));
    background-size: 300% 300%;
    border-radius: 18px;
    z-index: -1;
    opacity: 0;
    animation: gameCardBorder 3s ease-in-out infinite;
    transition: opacity 0.3s ease;
}

.game-card:hover {
    transform: translateY(-8px) rotateY(5deg) scale(1.03);
    border-color: transparent;
    box-shadow: 
        0 0 30px rgba(0, 255, 128, 0.4),
        0 15px 50px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.game-card:hover::before {
    opacity: 1;
}

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

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

.game-title {
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: bold;
}

.platform-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    color: white;
}

.platform-badge.steam { background: var(--steam-color); }
.platform-badge.playstation { background: var(--playstation-color); }
.platform-badge.xbox { background: var(--xbox-color); }
.platform-badge.nintendo { background: var(--nintendo-color); }
.platform-badge.epic { background: var(--epic-color); }

.game-stats {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.playtime {
    color: var(--accent-color);
    font-weight: bold;
}

/* Achievements Section */
.achievements-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.achievement-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.achievement-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.achievement-card:hover {
    border-color: var(--success-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.achievement-card h3 {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.achievement-number {
    font-size: 2rem;
    color: var(--success-color);
    font-weight: 600;
}

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

.achievement-item {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.achievement-item:hover {
    border-color: var(--success-color);
    background: rgba(35, 134, 54, 0.1);
}

.achievement-icon {
    width: 50px;
    height: 50px;
    background: var(--success-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.achievement-details h4 {
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.achievement-details p {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.achievement-progress {
    margin-top: 0.5rem;
    background: var(--border-color);
    height: 4px;
    border-radius: 2px;
    overflow: hidden;
}

.achievement-progress-bar {
    height: 100%;
    background: var(--success-color);
    transition: width 0.3s ease;
    border-radius: 2px;
}

/* Social Section */
.social-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

.friends-list {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
}

.friends-list h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 500;
}

.friend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.friend-item:hover {
    background: rgba(88, 166, 255, 0.1);
}

.friend-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.friend-avatar {
    width: 40px;
    height: 40px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-bg);
    font-weight: bold;
}

.friend-name {
    color: var(--text-primary);
}

.friend-hours {
    color: var(--accent-color);
    font-weight: bold;
}

.comparison-chart {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
}

.comparison-chart h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 500;
}

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

@keyframes logoGlow {
    0%, 100% { 
        color: var(--rgb-cyan);
        filter: drop-shadow(0 0 20px var(--rgb-cyan));
        transform: rotate(0deg);
    }
    25% { 
        color: var(--rgb-red);
        filter: drop-shadow(0 0 20px var(--rgb-red));
        transform: rotate(90deg);
    }
    50% { 
        color: var(--rgb-green);
        filter: drop-shadow(0 0 20px var(--rgb-green));
        transform: rotate(180deg);
    }
    75% { 
        color: var(--rgb-blue);
        filter: drop-shadow(0 0 20px var(--rgb-blue));
        transform: rotate(270deg);
    }
}

@keyframes rgbShift {
    0%, 100% { 
        background: 
            radial-gradient(circle at 15% 85%, rgba(255, 0, 64, 0.15) 0%, transparent 40%),
            radial-gradient(circle at 85% 15%, rgba(0, 255, 128, 0.15) 0%, transparent 40%),
            radial-gradient(circle at 50% 50%, rgba(0, 128, 255, 0.1) 0%, transparent 50%);
    }
    33% {
        background: 
            radial-gradient(circle at 85% 15%, rgba(255, 0, 64, 0.15) 0%, transparent 40%),
            radial-gradient(circle at 15% 85%, rgba(0, 255, 128, 0.15) 0%, transparent 40%),
            radial-gradient(circle at 50% 50%, rgba(128, 0, 255, 0.1) 0%, transparent 50%);
    }
    66% {
        background: 
            radial-gradient(circle at 50% 15%, rgba(255, 0, 64, 0.15) 0%, transparent 40%),
            radial-gradient(circle at 50% 85%, rgba(0, 255, 128, 0.15) 0%, transparent 40%),
            radial-gradient(circle at 50% 50%, rgba(255, 255, 0, 0.1) 0%, transparent 50%);
    }
}

@keyframes circuitFlow {
    0% { background-position: 0 0, 0 0; }
    100% { background-position: 50px 50px, 30px 30px; }
}

@keyframes rgbBorder {
    0%, 100% { background-position: 0% 50%; }
    25% { background-position: 100% 0%; }
    50% { background-position: 100% 100%; }
    75% { background-position: 0% 100%; }
}

@keyframes heroRgbBorder {
    0%, 100% { background-position: 0% 50%; }
    20% { background-position: 100% 0%; }
    40% { background-position: 100% 100%; }
    60% { background-position: 0% 100%; }
    80% { background-position: 50% 50%; }
}

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

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

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

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

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

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}



/* Loading States */
.skeleton {
    background: linear-gradient(90deg, var(--card-bg) 25%, rgba(255,255,255,0.1) 50%, var(--card-bg) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

.floating-action {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 64px;
    height: 64px;
    background: linear-gradient(45deg, var(--rgb-green), var(--rgb-cyan));
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #000;
    font-size: 1.6rem;
    cursor: pointer;
    box-shadow: 
        0 0 30px rgba(0, 255, 128, 0.5),
        0 10px 30px rgba(0, 0, 0, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    animation: floatingPulse 4s ease-in-out infinite;
    backdrop-filter: blur(10px);
}

@keyframes floatingPulse {
    0%, 100% { 
        transform: scale(1) rotate(0deg);
        box-shadow: 
            0 0 30px rgba(0, 255, 128, 0.5),
            0 10px 30px rgba(0, 0, 0, 0.4);
    }
    50% { 
        transform: scale(1.1) rotate(180deg);
        box-shadow: 
            0 0 50px rgba(0, 255, 128, 0.8),
            0 15px 40px rgba(0, 0, 0, 0.6);
    }
}

.floating-action:hover {
    transform: scale(1.2) rotate(360deg);
    box-shadow: 
        0 0 60px rgba(0, 255, 128, 0.8),
        0 20px 50px rgba(0, 0, 0, 0.6),
        inset 0 2px 0 rgba(255, 255, 255, 0.5);
    background: linear-gradient(45deg, var(--rgb-cyan), var(--rgb-green));
}

.progress-ring {
    width: 60px;
    height: 60px;
    transform: rotate(-90deg);
}

.progress-ring-circle {
    fill: none;
    stroke: var(--accent-cyan);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 188.5;
    stroke-dashoffset: 188.5;
    transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(var(--glow-cyan));
}

.achievement-unlock {
    animation: achievementPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes achievementPop {
    0% { transform: scale(0) rotate(180deg); opacity: 0; }
    50% { transform: scale(1.2) rotate(90deg); opacity: 0.8; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.milestone-celebration {
    position: relative;
    overflow: hidden;
}

.milestone-celebration::after {
    content: '🎉';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    animation: celebrate 1s ease-out;
}

@keyframes celebrate {
    0% { transform: translateX(-50%) translateY(0) scale(0); opacity: 0; }
    50% { transform: translateX(-50%) translateY(-30px) scale(1.5); opacity: 1; }
    100% { transform: translateX(-50%) translateY(-60px) scale(1); opacity: 0; }
}

/* Enhanced Accessibility */
.stat-card:focus {
    outline: 2px solid var(--rgb-cyan);
    outline-offset: 2px;
}

.nav-btn:focus {
    outline: 2px solid var(--rgb-cyan);
    outline-offset: 2px;
}

.floating-action:focus {
    outline: 2px solid var(--rgb-green);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --text-primary: #ffffff;
        --text-secondary: #ffffff;
        --border-color: rgba(255, 255, 255, 0.5);
    }
    
    .stat-card {
        border: 2px solid #ffffff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .particle {
        display: none;
    }
    
    .loading-particle {
        display: none;
    }
}

/* Hero Gaming Metric */
.hero-metric {
    margin-bottom: 3rem;
}

.hero-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    max-width: 600px;
    margin: 0 auto;
    transition: all 0.4s ease;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    border-radius: 32px;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(0, 255, 255, 0.6);
    border-radius: 50%;
    animation: particleFloat var(--duration) ease-in-out infinite;
    animation-delay: var(--delay);
}

.particle:nth-child(1) { top: 20%; left: 15%; }
.particle:nth-child(2) { top: 70%; left: 85%; background: rgba(139, 92, 246, 0.6); }

@keyframes particleFloat {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.7; }
    50% { transform: translateY(-20px) scale(1.2); opacity: 1; }
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 3rem;
    position: relative;
    z-index: 2;
}

.metric-icon-hero {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-ring-hero {
    width: 120px;
    height: 120px;
    transform: rotate(-90deg);
}

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

.progress-ring-circle {
    fill: none;
    stroke: var(--rgb-cyan);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 220;
    stroke-dashoffset: 220;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 0 10px var(--rgb-cyan));
    animation: ringPulse 3s ease-in-out infinite;
}

@keyframes ringPulse {
    0%, 100% { stroke-width: 6; }
    50% { stroke-width: 8; }
}

.icon-center {
    position: absolute;
    font-size: 2.5rem;
    color: var(--rgb-cyan);
    animation: iconSpin 8s linear infinite;
    filter: drop-shadow(0 0 20px var(--rgb-cyan));
}

@keyframes iconSpin {
    0% { transform: rotate(0deg); color: var(--rgb-cyan); }
    25% { transform: rotate(90deg); color: var(--rgb-red); }
    50% { transform: rotate(180deg); color: var(--rgb-green); }
    75% { transform: rotate(270deg); color: var(--rgb-purple); }
    100% { transform: rotate(360deg); color: var(--rgb-cyan); }
}

.metric-info-hero {
    flex: 1;
}

.metric-label {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.metric-info-hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
}

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

.metric-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}





.total-hours-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--rgb-red), var(--rgb-green), var(--rgb-blue), var(--rgb-purple), var(--rgb-cyan));
    background-size: 500% 500%;
    border-radius: 24px;
    z-index: -1;
    animation: heroRgbBorder 6s ease-in-out infinite;
}

.total-hours-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(0, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: 24px;
    animation: heroPulse 4s ease-in-out infinite;
}

.total-hours-card:hover {
    transform: translateY(-12px) rotateX(8deg) scale(1.05);
    border-color: transparent;
    box-shadow: 
        0 0 60px rgba(0, 255, 255, 0.6),
        0 30px 80px rgba(0, 0, 0, 0.8),
        inset 0 2px 0 rgba(255, 255, 255, 0.2);
}

.total-hours-card:hover::after {
    opacity: 1;
}

.metric-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.metric-icon i {
    position: absolute;
    font-size: 1.5rem;
    color: var(--accent-cyan);
    z-index: 2;
}

.metric-info h2 {
    font-size: 4rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    text-shadow: 
        0 0 20px rgba(0, 255, 255, 0.5),
        0 0 40px rgba(0, 255, 255, 0.3),
        0 0 60px rgba(0, 255, 255, 0.1);
    background: linear-gradient(45deg, #ffffff, #00ffff, #ffffff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: heroTextGlow 3s ease-in-out infinite;
    transition: all 0.4s ease;
}

.total-hours-card:hover .metric-info h2 {
    transform: scale(1.1);
    animation-duration: 1s;
}

.streak-counter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    color: var(--accent-lime);
    font-weight: 600;
}

.streak-counter i {
    animation: flicker 2s ease-in-out infinite;
}

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

/* Gaming Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-container {
    text-align: center;
    position: relative;
    z-index: 2;
}

.loading-logo {
    font-size: 4rem;
    color: var(--rgb-cyan);
    margin-bottom: 2rem;
    animation: loadingLogoSpin 3s ease-in-out infinite;
    filter: drop-shadow(0 0 30px var(--rgb-cyan));
}

@keyframes loadingLogoSpin {
    0%, 100% { transform: rotate(0deg) scale(1); color: var(--rgb-cyan); }
    25% { transform: rotate(90deg) scale(1.1); color: var(--rgb-red); }
    50% { transform: rotate(180deg) scale(1); color: var(--rgb-green); }
    75% { transform: rotate(270deg) scale(1.1); color: var(--rgb-purple); }
}

.loading-rings {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
}

.ring {
    position: absolute;
    border: 3px solid transparent;
    border-radius: 50%;
    animation: ringRotate 2s linear infinite;
}

.ring-1 {
    width: 120px;
    height: 120px;
    border-top-color: var(--rgb-cyan);
    animation-duration: 1.5s;
    filter: drop-shadow(0 0 10px var(--rgb-cyan));
}

.ring-2 {
    width: 90px;
    height: 90px;
    top: 15px;
    left: 15px;
    border-right-color: var(--rgb-purple);
    animation-duration: 2s;
    animation-direction: reverse;
    filter: drop-shadow(0 0 10px var(--rgb-purple));
}

.ring-3 {
    width: 60px;
    height: 60px;
    top: 30px;
    left: 30px;
    border-bottom-color: var(--rgb-green);
    animation-duration: 1s;
    filter: drop-shadow(0 0 10px var(--rgb-green));
}

@keyframes ringRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: var(--text-primary);
}

.loading-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, var(--rgb-cyan), var(--rgb-purple));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: loadingTextGlow 2s ease-in-out infinite;
}

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

.loading-subtitle {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.loading-progress {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--rgb-cyan), var(--rgb-purple), var(--rgb-green));
    background-size: 200% 100%;
    border-radius: 2px;
    width: 0%;
    animation: progressFill 3s ease-in-out, progressGlow 1.5s ease-in-out infinite;
    filter: drop-shadow(0 0 10px var(--rgb-cyan));
}

@keyframes progressFill {
    0% { width: 0%; }
    100% { width: 100%; }
}

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

.loading-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.loading-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--rgb-cyan);
    border-radius: 50%;
    animation: particleDrift 4s ease-in-out infinite;
    animation-delay: var(--delay);
    box-shadow: 0 0 15px var(--rgb-cyan);
}

.loading-particle:nth-child(1) { top: 20%; left: 10%; }
.loading-particle:nth-child(2) { top: 60%; left: 80%; background: var(--rgb-purple); box-shadow: 0 0 15px var(--rgb-purple); }
.loading-particle:nth-child(3) { top: 80%; left: 30%; background: var(--rgb-green); box-shadow: 0 0 15px var(--rgb-green); }
.loading-particle:nth-child(4) { top: 40%; left: 70%; background: var(--rgb-red); box-shadow: 0 0 15px var(--rgb-red); }
.loading-particle:nth-child(5) { top: 70%; left: 20%; background: var(--rgb-yellow); box-shadow: 0 0 15px var(--rgb-yellow); }

@keyframes particleDrift {
    0%, 100% { transform: translateY(0) translateX(0) scale(1); opacity: 0.7; }
    25% { transform: translateY(-30px) translateX(20px) scale(1.2); opacity: 1; }
    50% { transform: translateY(-10px) translateX(-15px) scale(0.8); opacity: 0.8; }
    75% { transform: translateY(-40px) translateX(10px) scale(1.1); opacity: 0.9; }
}

/* Mobile Navigation */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        padding: 0 1rem;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 280px;
        flex-direction: column;
        background: var(--secondary-bg);
        backdrop-filter: blur(20px);
        padding: 2rem 1rem;
        transition: right 0.3s ease;
        z-index: 1000;
        gap: 1rem;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-btn {
        width: 100%;
        justify-content: flex-start;
        padding: 1rem;
        font-size: 1.1rem;
        min-height: 44px;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .chart-container {
        grid-template-columns: 1fr;
    }
    
    .social-container {
        grid-template-columns: 1fr;
    }
    
    .library-controls {
        flex-direction: column;
    }
    
    .search-input {
        min-width: unset;
    }
    
    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .metric-info-hero h1 {
        font-size: 2.5rem;
    }
    
    .chart-container {
        grid-template-columns: 1fr;
    }
    
    .stats-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        min-height: 44px;
        padding: 1rem;
    }
    
    .chart-card {
        height: 300px;
        padding: 1rem;
    }
    
    .chart-card canvas {
        max-height: 200px !important;
    }
    
    .floating-action {
        width: 56px;
        height: 56px;
        bottom: 1rem;
        right: 1rem;
    }
}

@media (max-width: 480px) {
    .stats-row {
        grid-template-columns: 1fr;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .achievements-list {
        grid-template-columns: 1fr;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

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

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

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