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

/* =========================================
   Hardcore FPS / Esports Theme
   ========================================= */
:root {
    /* Palette */
    --bg-dark: #0b0c10;       /* Deep Charcoal */
    --bg-gunmetal: #1f2833;   /* Gunmetal */
    --text-silver: #c5c6c7;   /* Silver Grey */
    --neon-blue: #66fcf1;     /* Energy Blue */
    --deep-blue: #45a29e;     /* Muted Blue */
    --metal-dark: #121212;
    --border-metal: #333;
    
    /* Fonts */
    --font-main: 'Rajdhani', sans-serif;
    --font-display: 'Orbitron', sans-serif; /* Tech/Sci-Fi look */
}

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

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-silver);
    overflow-x: hidden;
    width: 100%;
    min-height: 100vh;
    padding-top: 100px;
    
    /* Tech Grid Background */
    background-image: 
        linear-gradient(rgba(11, 12, 16, 0.95), rgba(11, 12, 16, 0.95)),
        linear-gradient(0deg, transparent 24%, rgba(69, 162, 158, 0.1) 25%, rgba(69, 162, 158, 0.1) 26%, transparent 27%, transparent 74%, rgba(69, 162, 158, 0.1) 75%, rgba(69, 162, 158, 0.1) 76%, transparent 77%, transparent),
        linear-gradient(90deg, transparent 24%, rgba(69, 162, 158, 0.1) 25%, rgba(69, 162, 158, 0.1) 26%, transparent 27%, transparent 74%, rgba(69, 162, 158, 0.1) 75%, rgba(69, 162, 158, 0.1) 76%, transparent 77%, transparent);
    background-size: 50px 50px;
    background-attachment: fixed;
}

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

/* =========================================
   Navbar - Frosted Glass & Metal
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(31, 40, 51, 0.7); /* Gunmetal Transparent */
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(102, 252, 241, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

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

.logo h1 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 900;
    /* Metal Gradient Text */
    background: linear-gradient(to bottom, #fff 0%, #a0a0a0 50%, #fff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 5px rgba(102, 252, 241, 0.5));
}

.logo a {
    text-decoration: none;
}

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

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

.nav-links a:hover {
    color: var(--neon-blue);
    text-shadow: 0 0 10px var(--neon-blue);
}

/* Metallic Underline */
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-blue), transparent);
    transition: 0.3s;
}

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

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

.hamburger .bar {
    display: block;
    width: 30px;
    height: 3px;
    margin: 6px auto;
    background-color: var(--neon-blue);
    transition: all 0.3s ease;
    box-shadow: 0 0 5px var(--neon-blue);
}

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

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

.category h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 3rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-left: 5px solid var(--neon-blue);
    padding-left: 1.5rem;
    background: linear-gradient(90deg, rgba(102, 252, 241, 0.1), transparent);
    display: flex;
    align-items: center;
    text-shadow: 0 0 10px rgba(102, 252, 241, 0.3);
}

/* =========================================
   Radial Layout for First Category (#category-stocks)
   ========================================= */
#category-stocks .games-grid {
    display: block; /* Override Grid */
    position: relative;
    height: 700px; /* Space for radial */
    width: 100%;
    perspective: 1500px;
    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;
    box-shadow: 0 0 50px rgba(102, 252, 241, 0.2);
    border: 2px solid var(--neon-blue);
}

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

/* Surrounding Cards (2-7) */
/* We position them absolutely in center, then rotate/translate them out */
#category-stocks .games-grid .game-card:not(:nth-child(1)) {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 240px;
    height: 320px;
    margin-top: -160px; /* Half height */
    margin-left: -120px; /* Half width */
    z-index: 10;
    opacity: 0.9;
    transition: all 0.5s ease-out;
    border: 1px solid rgba(102, 252, 241, 0.3);
}

/* Calculate positions for 6 cards (60deg steps) */
/* Radius ~ 380px */

#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); }

/* Radial Interaction: Hover Center */
#category-stocks .games-grid:hover .game-card:not(:nth-child(1)) {
    /* Gather slightly */
    /* We can't easily modify the transform per child in a generic rule without vars, 
       but we can reduce the translate distance if we used CSS vars. 
       Let's stick to individual card hover for now as requested "Hover single card -> zoom". */
}

/* Hover Single Surrounding Card */
#category-stocks .games-grid .game-card:not(:nth-child(1)):hover {
    z-index: 30;
    transform: scale(1.3) !important; /* Override the rotation placement temporarily or use a wrapper? 
    Actually, overriding transform breaks the position. 
    Better approach: Add scale to the existing transform. 
    Hardcoding for now since we don't have SCSS or vars for angles easily here without recalc.
    Wait, "Move closer to center" -> reduce translation. */
    border-color: var(--neon-blue);
    box-shadow: 0 0 30px var(--neon-blue);
}

/* Since we hardcoded transforms, we need specific hover states for each to maintain rotation but scale/move */
#category-stocks .games-grid .game-card:nth-child(2):hover { transform: rotate(0deg) translate(0, -320px) rotate(0deg) scale(1.1); }
#category-stocks .games-grid .game-card:nth-child(3):hover { transform: rotate(60deg) translate(0, -320px) rotate(-60deg) scale(1.1); }
#category-stocks .games-grid .game-card:nth-child(4):hover { transform: rotate(120deg) translate(0, -320px) rotate(-120deg) scale(1.1); }
#category-stocks .games-grid .game-card:nth-child(5):hover { transform: rotate(180deg) translate(0, -320px) rotate(-180deg) scale(1.1); }
#category-stocks .games-grid .game-card:nth-child(6):hover { transform: rotate(240deg) translate(0, -320px) rotate(-240deg) scale(1.1); }
#category-stocks .games-grid .game-card:nth-child(7):hover { transform: rotate(300deg) translate(0, -320px) rotate(-300deg) scale(1.1); }


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

/* =========================================
   Card Styles - Hardcore / Metal
   ========================================= */
.game-card {
    background: linear-gradient(145deg, #1a1a1a, #0e0e0e);
    border: 1px solid #333;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    overflow: hidden;
    position: relative;
    transition: 0.3s;
    /* Clip Path for "Tech" corners */
    clip-path: polygon(
        10px 0, 100% 0, 
        100% calc(100% - 10px), calc(100% - 10px) 100%, 
        0 100%, 0 10px
    );
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    border-color: var(--deep-blue);
}

.card-img-wrapper {
    height: 200px;
    width: 100%;
    overflow: hidden;
    position: relative;
}

#category-stocks .game-card:nth-child(1) .card-img-wrapper {
    height: 350px; /* Taller for center card */
}

.game-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
    filter: grayscale(60%) contrast(1.1);
}

.game-card:hover img {
    transform: scale(1.1);
    filter: grayscale(0%) contrast(1.2);
}

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

.game-card h4 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Energy Bar Effect */
.card-scanline {
    width: 100%;
    height: 4px;
    background: #333;
    margin-top: auto;
    position: relative;
    overflow: hidden;
}

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

@keyframes scan {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

/* =========================================
   Footer
   ========================================= */
.footer {
    background: #050505;
    border-top: 2px solid var(--deep-blue);
    padding: 3rem 0;
    text-align: center;
    margin-top: 4rem;
}

.footer-links a {
    color: var(--text-silver);
    margin: 0 15px;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: 0.3s;
}

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

/* =========================================
   Ads
   ========================================= */
#adv1, #adv2, #adv3 {
    margin: 20px auto;
    max-width: 100%;
}

/* =========================================
   Responsive Design
   ========================================= */
@media (max-width: 1200px) {
    #category-stocks .games-grid {
        height: 600px;
    }
    #category-stocks .games-grid .game-card:not(:nth-child(1)) {
        /* Reduce radius for smaller screens */
        /* This is tricky without vars. We might just let them overlap or reduce scale */
        transform: scale(0.8); /* Quick fix to shrink them */
        /* Proper fix would be re-calculating translate */
    }
    
    /* Re-apply transforms with smaller radius (e.g. 280px) if needed, 
       but for now let's rely on scaling or switch to mobile view earlier if it gets too tight. */
}

@media (max-width: 1024px) {
    /* Tablet: Switch Radial to Grid or Fan? */
    /* Let's keep Radial but tighter, or switch to Grid. 
       User said: "Mobile: Ring changes to Up/Down Fan or Center + 2 columns".
       Tablet is somewhere in between. Let's switch to Grid for safety/usability on Tablet portrait. */
    
    #category-stocks .games-grid {
        display: grid;
        height: auto;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        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; /* Full width header */
        margin-bottom: 20px;
    }

    #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; /* Disable radial transforms */
    }
    
    /* Standard Grid */
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Mobile: Center + 2 Columns (User request) */
    
    .navbar .container {
        padding: 0 1rem;
    }
    
    .hamburger {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 80px;
        right: -100%;
        height: calc(100vh - 80px);
        width: 80%;
        background: rgba(11, 12, 16, 0.98);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        border-left: 1px solid var(--neon-blue);
        transition: 0.4s;
    }

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

    /* Force Grid for all */
    .games-grid, #category-stocks .games-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 10px;
        height: auto;
    }
    
    /* Hero Section Mobile Layout */
    #category-stocks .games-grid .game-card:nth-child(1) {
        grid-column: span 2; /* Center Large */
        height: 300px;
        width: 100%;
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        margin: 0 0 15px 0;
    }

    #category-stocks .games-grid .game-card:not(:nth-child(1)) {
        position: relative;
        top: auto;
        left: auto;
        transform: none !important;
        margin: 0;
        width: 100%;
        height: 220px;
    }

    /* Standard Cards Mobile */
    .game-card {
        height: 220px;
    }
    
    .card-img-wrapper {
        height: 120px;
    }
    
    #category-stocks .game-card:nth-child(1) .card-img-wrapper {
        height: 200px;
    }
    
    .game-card h4 {
        font-size: 0.9rem;
    }
}

/* Detail Page & Auxiliary Pages Support */
.game-detail, .auxiliary-page {
    background: rgba(31, 40, 51, 0.9);
    border: 1px solid var(--deep-blue);
    padding: 2rem;
    margin: 2rem 0;
}

/* Detail Page Image Alignment */
.game-detail-image {
    width: 100%;
    margin: 2rem 0;
    border: 1px solid var(--neon-blue);
    box-shadow: 0 0 15px rgba(102, 252, 241, 0.1);
    background: #000;
}

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

.game-detail-info p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #e0e0e0;
    text-align: justify;
}

.game-detail h2, .auxiliary-page h2 {
    color: var(--neon-blue);
}

.play-button {
    background: var(--bg-gunmetal);
    border: 1px solid var(--neon-blue);
    color: #fff;
    padding: 10px 30px;
    text-transform: uppercase;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.play-button:hover {
    background: var(--neon-blue);
    color: #000;
    box-shadow: 0 0 20px var(--neon-blue);
}

.contact-form input, .contact-form textarea {
    background: #000;
    border: 1px solid #333;
    color: #fff;
    padding: 10px;
    width: 100%;
    margin-bottom: 1rem;
}

.contact-form input:focus, .contact-form textarea:focus {
    border-color: var(--neon-blue);
    outline: none;
    box-shadow: 0 0 10px rgba(102, 252, 241, 0.3);
}

.submit-button {
    background: transparent;
    border: 1px solid var(--neon-blue);
    color: var(--neon-blue);
    padding: 10px 30px;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: bold;
    transition: 0.3s;
}

.submit-button:hover {
    background: var(--neon-blue);
    color: #000;
}

/* Play Button & Iframe Overlay */
.play-btn-container {
    text-align: center;
    padding: 20px;
    background: rgba(0,0,0,0.5);
    border-top: 1px solid var(--neon-blue);
}

.play-btn {
    background: var(--neon-blue);
    color: #000;
    font-family: var(--font-display);
    font-size: 1.5rem;
    padding: 15px 50px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(102, 252, 241, 0.4);
    font-weight: 900;
}

.play-btn:hover {
    background: #fff;
    box-shadow: 0 0 30px var(--neon-blue);
    transform: scale(1.05);
}

.game-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    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: #fff; /* Ensure iframe has background if game is transparent */
}

.close-game-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--neon-blue);
    color: var(--neon-blue);
    padding: 10px 20px;
    font-family: var(--font-display);
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.3s;
    z-index: 10000;
}

.close-game-btn:hover {
    background: var(--neon-blue);
    color: #000;
    box-shadow: 0 0 15px var(--neon-blue);
}
