@import url('https://fonts.googleapis.com/css2?family=Rye&family=Roboto+Slab:wght@400;700&display=swap');

/* =========================================
   Steampunk / Industrial Revolution Theme
   ========================================= */
:root {
    /* Palette */
    --bg-base: #1a1510;       /* Oil Black */
    --bg-paper: #2e2520;      /* Dark Leather */
    --bg-card: #261f1b;       /* Dark Wood */
    
    --steam-gold: #c5a059;    /* Brass/Gold */
    --steam-bronze: #cd7f32;  /* Bronze */
    --steam-copper: #b87333;  /* Copper */
    --steam-rust: #8b4513;    /* Rust/Leather */
    
    --text-main: #e0d0b0;     /* Parchment White */
    --text-muted: #a09080;    /* Faded Ink */
    
    /* Fonts */
    --font-main: 'Roboto Slab', serif;
    --font-display: 'Rye', serif; /* Victorian/Western Style */
}

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;
    
    /* Gear/Mechanical Pattern Background */
    background-image: 
        repeating-linear-gradient(90deg, rgba(197, 160, 89, 0.05) 0px, rgba(197, 160, 89, 0.05) 1px, transparent 1px, transparent 40px),
        repeating-linear-gradient(0deg, rgba(197, 160, 89, 0.05) 0px, rgba(197, 160, 89, 0.05) 1px, transparent 1px, transparent 40px),
        radial-gradient(circle at 50% 50%, rgba(139, 69, 19, 0.1), transparent 80%);
    background-attachment: fixed;
}

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

/* =========================================
   Navbar - Brass Plate Style
   ========================================= */
.navbar {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: linear-gradient(to bottom, #2e2520, #1a1510);
    border-bottom: 4px solid var(--steam-bronze);
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    border-top: 2px solid var(--steam-gold);
}

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

/* Rivets on Navbar */
.navbar::before, .navbar::after {
    content: '';
    position: absolute;
    bottom: 10px;
    width: 10px;
    height: 10px;
    background: radial-gradient(circle, var(--steam-gold) 30%, var(--steam-rust) 100%);
    border-radius: 50%;
    box-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    z-index: 1001;
}
.navbar::before { left: 20px; }
.navbar::after { right: 20px; }

.logo h1 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 2.5rem;
    color: var(--steam-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 
        2px 2px 0px #000,
        -1px -1px 0px var(--steam-rust);
    background: -webkit-linear-gradient(#ffd700, #b87333);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.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: 8px 15px;
    font-family: var(--font-display);
    border: 1px solid transparent;
}

.nav-links a:hover {
    color: var(--steam-gold);
    border: 1px dashed var(--steam-gold);
    background: rgba(0,0,0,0.3);
    box-shadow: inset 0 0 10px rgba(184, 115, 51, 0.2);
}

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

.hamburger .bar {
    display: block;
    width: 35px;
    height: 4px;
    margin: 6px auto;
    background-color: var(--steam-gold);
    transition: all 0.3s ease;
    border: 1px solid #000;
}

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

.category {
    margin-bottom: 7rem;
    position: relative;
    border-left: 4px double var(--steam-bronze);
    padding-left: 20px;
}

.category h3 {
    font-family: var(--font-display);
    font-size: 2.2rem;
    margin-bottom: 3rem;
    color: var(--steam-copper);
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    display: inline-block;
    padding: 10px 20px;
    background: rgba(0,0,0,0.2);
    border: 2px solid var(--steam-rust);
    box-shadow: 3px 3px 0px rgba(0,0,0,0.5);
}

.category h3::after {
    content: '⚙️';
    position: absolute;
    top: -15px;
    right: -25px;
    font-size: 1.5rem;
    color: var(--steam-gold);
    animation: spin-slow 10s linear infinite;
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* =========================================
   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: 5px solid var(--steam-gold);
    box-shadow: 
        0 0 0 2px #000,
        0 10px 30px rgba(0,0,0,0.8);
    background: var(--bg-paper);
}

#category-stocks .games-grid .game-card:nth-child(1) .game-card-content h4 {
    font-size: 1.5rem;
    color: var(--steam-gold);
    border-bottom: 2px solid var(--steam-rust);
    padding-bottom: 10px;
}

/* 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;
    transition: all 0.5s ease-out;
    border: 3px solid var(--steam-bronze);
    background: var(--bg-card);
}

/* 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 */
#category-stocks .games-grid .game-card:not(:nth-child(1)):hover {
    z-index: 30;
    border-color: var(--steam-gold);
    box-shadow: 0 0 20px rgba(197, 160, 89, 0.4);
}

/* 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 - Victorian Frame
   ========================================= */
.game-card {
    background: var(--bg-card);
    border: 2px solid var(--steam-bronze);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    overflow: hidden;
    position: relative;
    transition: 0.3s;
    box-shadow: 5px 5px 10px rgba(0,0,0,0.6);
}

/* Corner Screws */
.game-card::before, .game-card::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: #333;
    border-radius: 50%;
    border: 1px solid var(--steam-muted);
    z-index: 10;
    top: 6px;
}
.game-card::before { left: 6px; }
.game-card::after { right: 6px; }

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 8px 8px 15px rgba(0,0,0,0.7);
    border-color: var(--steam-gold);
}

.card-img-wrapper {
    height: 220px;
    width: 100%;
    overflow: hidden;
    position: relative;
    border-bottom: 2px solid var(--steam-rust);
    padding: 4px;
    background: #111;
}

#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: sepia(0.6) contrast(1.1);
}

.game-card:hover img {
    transform: scale(1.1);
    filter: sepia(0) contrast(1.1); /* Restore color */
}

.game-card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: 
        repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(0,0,0,0.1) 2px, rgba(0,0,0,0.1) 4px);
    position: relative;
}

.game-card h4 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--steam-gold);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.card-scanline {
    width: 100%;
    height: 4px;
    background: var(--steam-rust);
    margin-top: auto;
    position: relative;
    border: 1px solid #000;
}

.card-scanline::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: var(--steam-gold);
    transition: width 0.3s;
}

.game-card:hover .card-scanline::after {
    width: 100%;
}

/* =========================================
   Footer
   ========================================= */
.footer {
    background: var(--bg-paper);
    border-top: 4px solid var(--steam-bronze);
    padding: 4rem 0;
    text-align: center;
    margin-top: 6rem;
    box-shadow: inset 0 10px 20px rgba(0,0,0,0.5);
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: var(--steam-gold);
    border: 4px solid var(--bg-base);
    border-radius: 50%;
}

.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;
    font-family: var(--font-display);
}

.footer-links a:hover {
    color: var(--steam-gold);
    text-shadow: 1px 1px 0 #000;
}

/* =========================================
   Ads
   ========================================= */
#adv1, #adv2, #adv3 {
    margin: 0px auto;
    max-width: 100%;
    border: 4px double var(--steam-bronze);
    padding: 20px;
    background: rgba(0,0,0,0.3);
    border-radius: 4px;
}

/* =========================================
   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.5);
    }

    #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: 2px solid var(--steam-bronze);
    }
    
    .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: 100px;
        right: -100%;
        height: calc(100vh - 100px);
        width: 100%;
        background: var(--bg-paper);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        border-top: 4px solid var(--steam-gold);
        transition: 0.4s;
    }

    .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: var(--bg-paper);
    border: 4px solid var(--steam-bronze);
    padding: 3rem;
    margin: 3rem 0;
    box-shadow: 10px 10px 0px rgba(0,0,0,0.4);
    position: relative;
    border-radius: 2px;
}

/* Rivets on panels */
.game-detail::after, .auxiliary-page::after {
    content: '';
    position: absolute;
    top: 10px; left: 10px; right: 10px; bottom: 10px;
    border: 1px dashed var(--steam-rust);
    pointer-events: none;
}

.game-detail-image {
    width: 100%;
    margin: 2rem 0;
    border: 8px solid var(--bg-base);
    box-shadow: inset 0 0 20px #000;
}

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

.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(--steam-gold);
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 0px #000;
    display: inline-block;
    border-bottom: 3px double var(--steam-bronze);
}

.auxiliary-page h3 {
    color: var(--steam-copper);
    font-size: 1.8rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    font-family: var(--font-display);
}

.play-button {
    background: linear-gradient(180deg, var(--steam-bronze), var(--steam-rust));
    border: 2px solid var(--steam-gold);
    color: #fff;
    padding: 15px 40px;
    text-transform: uppercase;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    font-size: 1.2rem;
    box-shadow: 0 5px 0 #3e2723;
    border-radius: 4px;
    font-family: var(--font-display);
    text-shadow: 1px 1px 0 #000;
}

.play-button:hover {
    background: linear-gradient(180deg, var(--steam-gold), var(--steam-bronze));
    transform: translateY(-2px);
    box-shadow: 0 7px 0 #3e2723;
    color: #000;
    text-shadow: none;
}

.play-button:active {
    transform: translateY(2px);
    box-shadow: 0 3px 0 #3e2723;
}

/* Play Button & Iframe Overlay */
.play-btn-container {
    text-align: center;
    padding: 30px;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--steam-rust);
    margin-top: 2rem;
}

.play-btn {
    background: var(--steam-gold);
    color: #000;
    font-family: var(--font-display);
    font-size: 1.5rem;
    padding: 15px 50px;
    border: 2px solid #000;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: 900;
    transition: all 0.2s ease;
    box-shadow: 5px 5px 0 #000;
}

.play-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 7px 7px 0 #000;
    background: #fff;
}

.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;
}

.game-overlay-content {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
    border: 10px solid var(--steam-bronze);
}

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

.close-game-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--steam-rust);
    border: 2px solid var(--steam-gold);
    color: var(--steam-gold);
    padding: 10px 20px;
    font-family: var(--font-main);
    font-weight: bold;
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.3s;
    z-index: 10000;
    box-shadow: 2px 2px 0 #000;
}

.close-game-btn:hover {
    background: var(--steam-gold);
    color: #000;
}
