@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700;900&family=Lato:wght@400;700&display=swap');

/* =========================================
   Frozen Tundra / Ice Kingdom Theme
   ========================================= */
:root {
    /* Palette - Light & Cool */
    --bg-base: #e0f2fe;       /* Light Ice Blue */
    --bg-secondary: #f0f9ff;  /* Alice Blue */
    --bg-card: #ffffff;       /* White Snow */
    
    --neon-pink: #0ea5e9;     /* Sky Blue (Primary) - replaces pink */
    --neon-green: #1e40af;    /* Dark Blue (Secondary) - replaces green */
    --neon-blue: #06b6d4;     /* Cyan (Accent) */
    --neon-purple: #3b82f6;   /* Royal Blue */
    
    --text-main: #0f172a;     /* Dark Slate Text - High Contrast */
    --text-muted: #475569;    /* Slate Grey */
    
    /* Fonts */
    --font-main: 'Lato', sans-serif;
    --font-graffiti: 'Cinzel', serif; /* Majestic Font */
}

html {
    overflow-x: hidden;
    width: 100%;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-base);
    color: var(--text-main);
    overflow-x: hidden;
    width: 100%;
    min-height: 100vh;
    padding-top: 0px;
    
    /* Icy Texture Background */
    background-image: 
        linear-gradient(180deg, rgba(255,255,255,0.4) 0%, rgba(224, 242, 254, 0) 100%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%230ea5e9' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-attachment: fixed;
}

/* Container */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

/* =========================================
   Navbar - Ice Style
   ========================================= */
.navbar {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95); /* White Frost */
    backdrop-filter: blur(10px);
    border-bottom: 3px solid var(--neon-blue); /* Cyan Border */
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.2);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
}

.logo h1 {
    font-family: var(--font-graffiti);
    font-weight: 700;
    font-size: 2.2rem;
    color: var(--neon-green);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 
        0 0 5px rgba(6, 182, 212, 0.3),
        1px 1px 0px #fff;
}

.logo a {
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    transition: 0.3s;
    font-size: 1rem;
    padding: 5px 10px;
    font-family: var(--font-graffiti);
}

.nav-links a:hover {
    color: var(--neon-pink);
    text-shadow: 0 0 8px rgba(14, 165, 233, 0.4);
}

/* Icy Underline */
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-pink));
    transition: 0.3s;
    transform: translateX(-50%);
    box-shadow: 0 0 5px var(--neon-blue);
}

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

/* Hamburger */
.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger .bar {
    display: block;
    width: 35px;
    height: 3px;
    margin: 6px auto;
    background-color: var(--neon-green);
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* =========================================
   Headings & Categories
   ========================================= */
.article-categories {
    margin: 3rem 0;
}

.category {
    margin-bottom: 7rem;
    position: relative;
}

.category h3 {
    font-family: var(--font-graffiti);
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--neon-green);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--neon-blue);
}

.category h3::after {
    content: '❄️';
    position: absolute;
    top: -10px;
    right: -35px;
    font-size: 1.5rem;
    color: var(--neon-blue);
}

/* =========================================
   Radial Layout for First Category (#category-stocks)
   ========================================= */
#category-stocks .games-grid {
    display: block;
    position: relative;
    height: 700px;
    width: 100%;
    margin-top: 50px;
}

/* Center Card (1st item) */
#category-stocks .games-grid .game-card:nth-child(1) {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 400px;
    height: 520px;
    transform: translate(-50%, -50%) scale(1);
    z-index: 20;
    border: 4px solid var(--neon-blue);
    box-shadow: 0 0 40px rgba(6, 182, 212, 0.3);
    border-radius: 12px;
    background: #fff;
}

#category-stocks .games-grid .game-card:nth-child(1) .game-card-content h4 {
    font-size: 1.5rem;
    color: var(--neon-green);
}

/* Surrounding Cards (2-7) */
#category-stocks .games-grid .game-card:not(:nth-child(1)) {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 240px;
    height: 320px;
    margin-top: -160px; 
    margin-left: -120px; 
    z-index: 10;
    opacity: 0.95;
    transition: all 0.5s ease-out;
    border: 2px solid var(--neon-purple);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
}

/* Calculate positions for 6 cards (60deg steps) */
#category-stocks .games-grid .game-card:nth-child(2) { transform: rotate(0deg) translate(0, -380px) rotate(0deg); }
#category-stocks .games-grid .game-card:nth-child(3) { transform: rotate(60deg) translate(0, -380px) rotate(-60deg); }
#category-stocks .games-grid .game-card:nth-child(4) { transform: rotate(120deg) translate(0, -380px) rotate(-120deg); }
#category-stocks .games-grid .game-card:nth-child(5) { transform: rotate(180deg) translate(0, -380px) rotate(-180deg); }
#category-stocks .games-grid .game-card:nth-child(6) { transform: rotate(240deg) translate(0, -380px) rotate(-240deg); }
#category-stocks .games-grid .game-card:nth-child(7) { transform: rotate(300deg) translate(0, -380px) rotate(-300deg); }


/* Hover Single Surrounding Card - Float */
#category-stocks .games-grid .game-card:not(:nth-child(1)):hover {
    z-index: 30;
    border-color: var(--neon-pink);
    box-shadow: 
        0 0 20px rgba(14, 165, 233, 0.4),
        0 0 40px rgba(255, 255, 255, 0.8);
}

/* Maintain transform on hover but scale up */
#category-stocks .games-grid .game-card:nth-child(2):hover { transform: rotate(0deg) translate(0, -320px) rotate(0deg) scale(1.15); }
#category-stocks .games-grid .game-card:nth-child(3):hover { transform: rotate(60deg) translate(0, -320px) rotate(-60deg) scale(1.15); }
#category-stocks .games-grid .game-card:nth-child(4):hover { transform: rotate(120deg) translate(0, -320px) rotate(-120deg) scale(1.15); }
#category-stocks .games-grid .game-card:nth-child(5):hover { transform: rotate(180deg) translate(0, -320px) rotate(-180deg) scale(1.15); }
#category-stocks .games-grid .game-card:nth-child(6):hover { transform: rotate(240deg) translate(0, -320px) rotate(-240deg) scale(1.15); }
#category-stocks .games-grid .game-card:nth-child(7):hover { transform: rotate(300deg) translate(0, -320px) rotate(-300deg) scale(1.15); }


/* =========================================
   Standard Grid for Other Categories
   ========================================= */
.games-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    padding: 10px;
}

/* =========================================
   Card Styles - Ice Block Style
   ========================================= */
.game-card {
    background: var(--bg-card);
    border: 1px solid #cbd5e1; /* Light Grey Border */
    display: flex;
    flex-direction: column;
    text-decoration: none;
    overflow: hidden;
    position: relative;
    transition: 0.3s;
    box-shadow: 0 10px 25px rgba(148, 163, 184, 0.2);
    border-radius: 12px;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(14, 165, 233, 0.25);
    border-color: var(--neon-pink);
}

.card-img-wrapper {
    height: 220px;
    width: 100%;
    overflow: hidden;
    position: relative;
    border-bottom: 2px solid var(--neon-blue);
}

#category-stocks .game-card:nth-child(1) .card-img-wrapper {
    height: 380px;
}

.game-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
    filter: brightness(1.05) contrast(1.05); /* Clean look */
}

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

.game-card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--bg-card);
    position: relative;
}

.game-card h4 {
    font-family: var(--font-graffiti);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--neon-green);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

/* Frosty Divider */
.card-scanline {
    width: 100%;
    height: 3px;
    background: #e2e8f0;
    margin-top: auto;
    position: relative;
    overflow: hidden;
    margin-top: 15px;
    border-radius: 2px;
}

.card-scanline::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: var(--neon-blue);
    animation: ice-shimmer 2s ease-in-out infinite;
    box-shadow: 0 0 8px var(--neon-blue);
}

@keyframes ice-shimmer {
    0% { left: -100%; opacity: 0; }
    50% { opacity: 0.8; }
    100% { left: 200%; opacity: 0; }
}

/* =========================================
   Footer
   ========================================= */
.footer {
    background: #ffffff;
    border-top: 4px solid var(--neon-blue);
    padding: 4rem 0;
    text-align: center;
    margin-top: 6rem;
    box-shadow: 0 -10px 40px rgba(148, 163, 184, 0.1);
}

.footer-content p {
    font-family: var(--font-main);
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: var(--text-main);
    margin: 0 15px;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.9rem;
    transition: 0.3s;
    padding: 5px 10px;
    border-bottom: 1px solid transparent;
}

.footer-links a:hover {
    color: var(--neon-pink);
    border-bottom: 1px solid var(--neon-pink);
}

/* =========================================
   Ads
   ========================================= */
#adv1, #adv2, #adv3 {
    margin: 40px auto;
    max-width: 100%;
    border: 1px solid #cbd5e1;
    padding: 20px;
    background: rgba(255,255,255,0.6);
    border-radius: 8px;
}

/* =========================================
   Responsive Design
   ========================================= */
@media (max-width: 1200px) {
    #category-stocks .games-grid {
        height: 600px;
    }
    #category-stocks .games-grid .game-card:not(:nth-child(1)) {
        transform: scale(0.8);
    }
}

@media (max-width: 1024px) {
    #category-stocks .games-grid {
        display: grid;
        height: auto;
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
        margin-top: 0;
    }

    #category-stocks .games-grid .game-card:nth-child(1) {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        width: 100%;
        height: 400px;
        grid-column: span 2; 
        margin-bottom: 20px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }

    #category-stocks .games-grid .game-card:not(:nth-child(1)) {
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
        height: 300px;
        margin: 0;
        transform: none !important;
        opacity: 1;
        border: 1px solid #cbd5e1;
    }
    
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .navbar .container {
        padding: 0 1rem;
    }
    
    .hamburger {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 90px;
        right: -100%;
        height: calc(100vh - 90px);
        width: 100%;
        background: #ffffff;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        border-top: 2px solid var(--neon-blue);
        transition: 0.4s;
        box-shadow: -5px 0 15px rgba(0,0,0,0.05);
    }

    .nav-links.active {
        right: 0;
    }

    .games-grid, #category-stocks .games-grid {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
        gap: 25px;
        padding: 10px;
        height: auto;
    }
    
    #category-stocks .games-grid .game-card:nth-child(1) {
        grid-column: span 1;
        height: 350px;
        width: 100%;
        margin: 0 0 15px 0;
    }

    #category-stocks .games-grid .game-card:not(:nth-child(1)) {
        width: 100%;
        height: 250px;
    }

    .game-card {
        height: 280px;
    }
}

/* =========================================
   Detail & Auxiliary Pages
   ========================================= */
.game-detail, .auxiliary-page {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 3rem;
    margin: 3rem 0;
    box-shadow: 0 5px 25px rgba(148, 163, 184, 0.15);
    position: relative;
    border-radius: 12px;
}

.game-detail::after, .auxiliary-page::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 1px dashed var(--neon-blue);
    pointer-events: none;
    border-radius: 8px;
}

.game-detail-image {
    width: 100%;
    margin: 2rem 0;
    border: 4px solid #fff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    background: #f1f5f9;
    border-radius: 8px;
}

.game-detail-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.game-detail-info p, .auxiliary-page p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-main);
    text-align: left;
    margin-bottom: 1.5rem;
}

.game-detail h2, .auxiliary-page h2 {
    color: var(--neon-green);
    font-family: var(--font-graffiti);
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 0px #e2e8f0;
    display: inline-block;
    border-bottom: 2px solid var(--neon-blue);
}

.auxiliary-page h3 {
    color: var(--neon-pink);
    font-size: 1.8rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    font-weight: 700;
    display: inline-block;
}

.play-button {
    background: linear-gradient(135deg, var(--neon-green), var(--neon-pink));
    border: none;
    color: #fff;
    padding: 15px 40px;
    text-transform: uppercase;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    font-size: 1.2rem;
    box-shadow: 0 5px 15px rgba(14, 165, 233, 0.3);
    border-radius: 30px;
    font-family: var(--font-graffiti);
}

.play-button:hover {
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-blue));
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.5);
}

/* Play Button & Iframe Overlay */
.play-btn-container {
    text-align: center;
    padding: 30px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    margin-top: 2rem;
    border-radius: 12px;
}

.play-btn {
    background: var(--neon-pink);
    color: #fff;
    font-family: var(--font-graffiti);
    font-size: 1.5rem;
    padding: 15px 50px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: 900;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4);
    border-radius: 6px;
}

.play-btn:hover {
    background: var(--neon-green);
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.4);
    transform: scale(1.05);
}

.game-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.game-overlay-content {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
}

#game-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
}

.close-game-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #fff;
    border: none;
    color: var(--neon-green);
    padding: 10px 20px;
    font-family: var(--font-main);
    font-weight: bold;
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.3s;
    z-index: 10000;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.close-game-btn:hover {
    background: var(--neon-pink);
    color: #fff;
}
