/*
Theme Name: Narrow One Theme
Theme URI: https://narrowone.fun/
Description: Custom standalone theme for Narrow One fan site, featuring a Medieval Dark design.
Author: Narrow One Fan Site
Author URI: https://narrowone.fun/
Version: 1.0.1
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=Cinzel:wght@500;700;900&display=swap');

:root {
    --bg-color: #0f0e11;
    /* Very dark slate, almost black */
    --card-bg: #1a1a1d;
    /* Dark stone */
    --primary-accent: #ffb700;
    /* Golden Arrow / Victory */
    --secondary-accent: #3498db;
    /* Team Blue */
    --tertiary-accent: #e74c3c;
    /* Team Red */
    --text-color: #f0f0f0;
    --text-muted: #a0a0a0;
    --border-color: #333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    background-image:
        radial-gradient(circle at 10% 20%, rgba(52, 152, 219, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(231, 76, 60, 0.05) 0%, transparent 20%);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, #000000, transparent);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    /* For absolute centering of nav */
}

.header-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-btn {
    color: var(--text-color);
    text-decoration: none;
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.nav-btn:hover,
.nav-btn.active {
    color: var(--primary-accent);
    text-shadow: 0 0 10px rgba(255, 183, 0, 0.5);
}

.search-btn {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
}

.search-btn:hover {
    color: var(--primary-accent);
}

.brand-logo {
    max-height: 90px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    /* Subtle glow fitting the medieval theme (goldish) */
    filter: drop-shadow(0 0 15px rgba(255, 183, 0, 0.2));
    transition: transform 0.3s ease;
}

.brand-logo:hover {
    transform: scale(1.02);
}

/* Main Content */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Game Container */
.game-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    /* Medieval border style */
    border: 1px solid var(--border-color);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.7);
    border-radius: 2px;
    overflow: hidden;
    background: #000;
}

/* Game Info / Description */
.game-info {
    width: 100%;
    max-width: 900px;
    background-color: var(--card-bg);
    padding: 2.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    position: relative;
    color: #ccc;
}

.game-info a {
    color: var(--primary-accent);
    text-decoration: none;
    border-bottom: 1px dotted var(--primary-accent);
    transition: color 0.3s ease;
}

.game-info a:hover {
    color: #fff;
    border-bottom-style: solid;
}

.game-info::before {
    /* Decorative top border */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-accent), transparent);
}

.game-info h2,
.game-info h1,
.game-info h3 {
    font-family: 'Cinzel', serif;
    color: var(--primary-accent);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.game-info h1 {
    font-size: 2.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.game-info h2 {
    font-size: 1.8rem;
    margin-top: 2rem;
}

.game-info h3 {
    font-size: 1.4rem;
    color: #e0e0e0;
    margin-top: 1.5rem;
}

.game-info p {
    color: var(--text-color);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.game-info ul,
.game-info ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.game-info li {
    margin-bottom: 0.5rem;
}

/* Image Styling within Description */
.game-info img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid #333;
    margin: 1.5rem 0;
}

/* Tables */
.game-info table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: rgba(0, 0, 0, 0.2);
}

.game-info th,
.game-info td {
    padding: 1rem;
    border: 1px solid #333;
    text-align: left;
}

.game-info th {
    background: rgba(255, 183, 0, 0.05);
    color: var(--primary-accent);
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem 2rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    background: #050505;
    border-top: 1px solid #1a1a1a;
    font-family: 'Cinzel', serif;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
}

.footer-links a:hover {
    color: var(--primary-accent);
}

/* Search Bar */
.search-container {
    display: flex;
    align-items: center;
    background: transparent;
    padding: 0.2rem;
    border-radius: 4px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.search-container.active {
    background: rgba(0, 0, 0, 0.5);
    border-color: #333;
}

.search-container input {
    width: 0;
    opacity: 0;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    outline: none;
}

.search-container.active input {
    width: 200px;
    opacity: 1;
    padding: 0.5rem;
}

/* Games Grid Page */
.page-title {
    font-family: 'Cinzel', serif;
    color: var(--primary-accent);
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.games-grid-container {
    width: 100%;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    width: 100%;
}

.game-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(255, 183, 0, 0.1);
    border-color: var(--primary-accent);
}

.game-card a {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.card-image {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #000;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.game-card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.card-content h3 {
    font-family: 'Cinzel', serif;
    color: var(--primary-accent);
    font-size: 1.2rem;
    margin: 0;
}

.card-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    flex-grow: 1;
}

.play-link {
    margin-top: 1rem;
    align-self: flex-start;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--primary-accent);
    padding-bottom: 2px;
}

/* =========================================
   RESPONSIVE DESIGN (MOBILE & TABLET)
   ========================================= */

@media (max-width: 900px) {
    header {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1rem;
    }

    .header-center {
        position: static;
        transform: none;
    }

    .brand-logo {
        max-height: 70px;
    }

    main {
        padding: 1rem;
    }

    .game-info {
        padding: 1.5rem;
    }
}

@media (max-width: 600px) {

    /* Header Reorganization */
    header {
        flex-direction: column;
        align-items: center;
        padding-bottom: 2rem;
    }

    .header-left,
    .header-center,
    .header-right {
        width: 100%;
        display: flex;
        justify-content: center;
        margin-bottom: 0.5rem;
    }

    .brand-logo {
        max-height: 60px;
    }

    /* Search Bar on Mobile - always visible or wider */
    .search-container.active input {
        width: 100%;
        max-width: 250px;
    }

    /* Game Info Typography */
    .game-info h1 {
        font-size: 1.6rem;
    }

    .game-info h2 {
        font-size: 1.4rem;
    }

    .game-info h3 {
        font-size: 1.2rem;
    }

    .game-info {
        padding: 1rem;
    }

    /* Footer */
    .footer-links {
        gap: 1rem;
        flex-direction: column;
    }

    /* Games Grid */
    .games-grid {
        grid-template-columns: 1fr;
        /* Full width cards on mobile */
    }
}