/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800;900&display=swap');

:root {
    --bg-color: #0b0f19; /* Deeper Dark Blue */
    --surface-color: rgba(20, 27, 45, 0.75); /* Darker surface with opacity */
    --surface-hover: rgba(30, 41, 59, 0.95);
    --primary-color: #3b82f6; /* Blue 500 */
    --primary-hover: #2563eb;
    --accent-color: #8b5cf6; /* Violet 500 */
    --accent-hover: #7c3aed;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(16px);
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 15px 30px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -5px rgba(0, 0, 0, 0.3);
    --shadow-neon: 0 0 20px rgba(59, 130, 246, 0.6);
    --shadow-neon-accent: 0 0 20px rgba(139, 92, 246, 0.6);
    
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    --transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color); 
}
::-webkit-scrollbar-thumb {
    background: var(--surface-hover); 
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color); 
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.1), transparent 30%),
        radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.1), transparent 30%);
    background-attachment: fixed;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(11, 15, 25, 0.85);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 28px;
    font-weight: 900;
    background: linear-gradient(270deg, #ff0040, #ff7f00, #ff0040, #00ffea, #8b5cf6, #ff0040);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    animation: rgbRunning 8s ease infinite;
    text-transform: uppercase;
}

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

.search-bar {
    position: relative;
    width: 100%;
    max-width: 450px;
    margin: 0 30px;
}

.search-bar input {
    width: 100%;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    outline: none;
    transition: var(--transition);
}

.search-bar input:focus {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow-neon);
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-muted);
    transition: var(--transition);
    position: relative;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-main);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: var(--primary-color);
    transition: var(--transition);
    border-radius: 2px;
}

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

/* Hero Section Premium */
.premium-hero {
    margin: 50px 0;
    border-radius: var(--radius-lg);
    background-color: var(--bg-color);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 60px 50px;
    text-align: left;
    border: none;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
    position: relative;
    animation: fadeInUp 0.8s ease-out;
}

.hero-content {
    width: 60%;
    z-index: 2;
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.5);
    border-radius: 20px;
    color: #60a5fa;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #60a5fa;
    border-radius: 50%;
    margin-right: 8px;
    box-shadow: 0 0 10px #60a5fa;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(96, 165, 250, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(96, 165, 250, 0); }
    100% { box-shadow: 0 0 0 0 rgba(96, 165, 250, 0); }
}

.hero-title {
    font-size: 52px;
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.1;
    text-shadow: 0 4px 15px rgba(0,0,0,0.9);
    color: #ffffff;
}

.hero-desc {
    font-size: 18px;
    color: #cbd5e1;
    max-width: 90%;
    margin-bottom: 35px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.9);
    line-height: 1.7;
    font-weight: 400;
}

.hero-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

.hero-btn {
    padding: 16px 40px;
    font-size: 18px;
    border-radius: 50px;
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.4);
}

.hero-rating {
    color: #94a3b8;
    font-size: 15px;
    font-weight: 600;
    background: rgba(0,0,0,0.3);
    padding: 10px 15px;
    border-radius: var(--radius-md);
    backdrop-filter: blur(5px);
}

.hero-image-wrapper {
    width: 35%;
    z-index: 2;
    position: relative;
    display: flex;
    justify-content: flex-end;
    animation: heroFloat 6s ease-in-out infinite alternate;
}

.hero-floating-img {
    width: 100%;
    max-width: 350px;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px rgba(0,0,0,0.7);
    border: 2px solid rgba(255,255,255,0.15);
    transform: perspective(1000px) rotateY(-15deg);
}

@keyframes heroFloat {
    from { transform: translateY(-10px); }
    to { transform: translateY(10px); }
}

.btn-primary {
    display: inline-block;
    padding: 14px 36px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    border-radius: var(--radius-full);
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-neon-accent);
}

/* Section Titles */
.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 60px 0 30px 0;
}

.section-title h2 {
    font-size: 28px;
    font-weight: 800;
    position: relative;
    padding-left: 20px;
}

.section-title h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 15%;
    height: 70%;
    width: 6px;
    background: linear-gradient(to bottom, var(--primary-color), var(--accent-color));
    border-radius: var(--radius-full);
}

/* Game Grid */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
}

/* Game Card */
.game-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-md);
    animation: fadeInUp 0.5s ease-out backwards;
}

/* Stagger card animations */
.game-grid .game-card:nth-child(1) { animation-delay: 0.1s; }
.game-grid .game-card:nth-child(2) { animation-delay: 0.2s; }
.game-grid .game-card:nth-child(3) { animation-delay: 0.3s; }
.game-grid .game-card:nth-child(4) { animation-delay: 0.4s; }
.game-grid .game-card:nth-child(5) { animation-delay: 0.5s; }
.game-grid .game-card:nth-child(6) { animation-delay: 0.6s; }

.game-card:hover {
    transform: translateY(-8px);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: var(--shadow-lg), var(--shadow-neon);
    background: var(--surface-hover);
}

.game-thumb-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #1e293b;
}

.game-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.game-card:hover .game-thumb {
    transform: scale(1.1);
}

/* Hover Play Icon Overlay */
.game-card::after {
    content: '▶';
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    font-size: 30px;
    color: white;
    background: rgba(59, 130, 246, 0.9);
    width: 60px;
    height: 60px;
    line-height: 60px;
    text-align: center;
    border-radius: 50%;
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.8);
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.game-card:hover::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    top: 40%;
}

.game-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
    background: linear-gradient(to top, var(--surface-color) 80%, transparent);
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.rgb-text {
    background: linear-gradient(
        to right,
        #ff0000,
        #ff7f00,
        #ffff00,
        #00ff00,
        #0000ff,
        #4b0082,
        #8b00ff,
        #ff0000
    );
    background-size: 200% auto;
    color: #000;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rgb-running 3s linear infinite;
}

@keyframes rgb-running {
    to {
        background-position: 200% center;
    }
}

.game-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: auto;
    font-weight: 600;
}

/* Categories Badge */
.category-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    border: 1px solid var(--border-color);
    z-index: 10;
    box-shadow: var(--shadow-sm);
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Footer */
footer {
    margin-top: 100px;
    padding: 60px 0 40px;
    background: var(--surface-color);
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    backdrop-filter: var(--glass-blur);
}

footer p {
    margin-bottom: 12px;
    font-size: 15px;
}

.footer-links a {
    color: var(--text-muted);
    margin: 0 15px;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-wrapper {
        flex-wrap: wrap;
        gap: 15px;
    }
    .search-bar {
        order: 3;
        max-width: 100%;
        margin: 0;
    }
    .premium-hero {
        flex-direction: column;
        text-align: center;
        padding: 40px 20px;
    }
    .hero-content {
        width: 100%;
        max-width: 100%;
        margin-bottom: 40px;
    }
    .hero-title {
        font-size: 36px;
    }
    .hero-desc {
        max-width: 100%;
        font-size: 16px;
    }
    .hero-actions {
        justify-content: center;
        flex-direction: column;
        gap: 15px;
    }
    .hero-btn {
        width: 100%;
        max-width: 300px;
    }
    .hero-image-wrapper {
        width: 100%;
        justify-content: center;
    }
    .hero-floating-img {
        max-width: 80%;
    }
    .game-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
    .game-card::after {
        display: none; /* Disable hover icon on mobile */
    }
}
