/* =================================================================
   FreeGames44 - Ana Stylesheet
   Professional Gaming Theme
   ================================================================= */

/* ---------------------------------------------------------------
   1. CSS Değişkenleri (Custom Properties)
   --------------------------------------------------------------- */
:root {
    /* Backgrounds */
    --bg-primary:    #f0ede8;
    --bg-secondary:  #e8e4de;
    --bg-card:       #faf8f5;
    --bg-card-hover: #fafafa;
    --border:        #e2e8f0;
    --border-light:  #f1f5f9;

    /* Text */
    --text-primary:   #0f172a;
    --text-secondary: #475569;
    --text-muted:     #94a3b8;

    /* Accent */
    --accent:         #6d28d9;
    --accent-hover:   #5b21b6;
    --accent-light:   #ede9fe;
    --accent-cyan:    #0e7490;
    --accent-orange:  #c2410c;
    --accent-green:   #15803d;
    --accent-red:     #dc2626;
    --accent-yellow:  #b45309;

    --nav-bg:         #ffffff;
    --hero-bg:        #0f172a;

    --card-radius:    10px;
    --card-radius-sm: 6px;
    --card-radius-lg: 14px;
    --transition:     0.18s ease;
    --transition-slow:0.32s ease;

    --shadow-xs:   0 1px 2px rgba(0,0,0,0.05);
    --shadow-sm:   0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --shadow:      0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.04);
    --shadow-md:   0 8px 16px rgba(0,0,0,0.09), 0 3px 6px rgba(0,0,0,0.04);
    --shadow-lg:   0 16px 32px rgba(0,0,0,0.12), 0 6px 12px rgba(0,0,0,0.05);
    --shadow-card: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);

    --gradient-accent: linear-gradient(135deg, #6d28d9, #0e7490);
    --gradient-green:  linear-gradient(135deg, #16a34a, #059669);
    --gradient-card:   linear-gradient(180deg, transparent 45%, rgba(15,23,42,0.75) 100%);

    /* Header yüksekliği - JS tarafından güncellenir */
    --header-height: 100px;
}

/* ---------------------------------------------------------------
   2. Reset & Base
   --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; overflow-x: clip; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.65;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: clip;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); text-decoration: none; }

img { max-width: 100%; height: auto; display: block; }

ul, ol { list-style: none; }

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

/* ---------------------------------------------------------------
   3. Layout Helpers
   --------------------------------------------------------------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.site-body {
    padding: 24px 0 48px;
}

/* ---------------------------------------------------------------
   4. Header
   --------------------------------------------------------------- */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 60px;
}

/* Logo */
.site-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    white-space: nowrap;
    flex-shrink: 0;
}
.site-logo:hover { color: var(--accent); }
.logo-icon { font-size: 1.4rem; }
.logo-text  {
    background: linear-gradient(135deg, #6d28d9 0%, #0e7490 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    letter-spacing: -0.03em;
}

/* Header Search */
.header-search {
    display: flex;
    flex: 1;
    max-width: 440px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.header-search:focus-within {
    background: #fff;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(109,40,217,0.08);
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    padding: 0 14px;
    font-size: 0.9rem;
}
.search-input::placeholder { color: var(--text-muted); }

.search-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0 14px;
    cursor: pointer;
    transition: color var(--transition);
    display: flex;
    align-items: center;
}
.search-btn:hover { color: var(--accent); }

/* Menu Toggle - Sadece mobilde görünür */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    padding: 8px 10px;
    margin-left: auto;
    transition: border-color var(--transition), background var(--transition);
}
.menu-toggle:hover {
    border-color: var(--accent);
    background: var(--accent-light);
}
.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.25s ease;
    transform-origin: center;
}
.menu-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------------------------------------------------------
   5. Category Navigation
   --------------------------------------------------------------- */
.category-nav {
    border-top: 1px solid var(--border);
}

.cat-nav-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    padding: 0 4px;
    scrollbar-width: none;
}
.cat-nav-list::-webkit-scrollbar { display: none; }

.cat-nav-list li a {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-secondary);
    font-size: 0.83rem;
    font-weight: 600;
    padding: 11px 12px;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all var(--transition);
    letter-spacing: 0.01em;
}
.cat-nav-list li a:hover {
    color: var(--accent);
    border-bottom-color: var(--border);
}
.cat-nav-list li a.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.cat-count {
    background: var(--bg-secondary);
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
    font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------
   6. Advertisement Zones
   --------------------------------------------------------------- */
.ad-zone { padding: 12px 0; text-align: center; }
.ad-placeholder {
    background: #f8fafc;
    border: 1.5px dashed var(--border);
    border-radius: var(--card-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 90px;
    color: var(--text-muted);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}
.ad-placeholder--vertical { min-height: 250px; }

/* ---------------------------------------------------------------
   7. Breadcrumb
   --------------------------------------------------------------- */
.breadcrumb {
    margin-bottom: 16px;
}
.breadcrumb-list,
.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
    list-style: none;
    padding: 0;
}
.breadcrumb li + li::before {
    content: '›';
    margin-right: 6px;
    color: var(--text-muted);
}
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--accent); }

/* ---------------------------------------------------------------
   8. Sections
   --------------------------------------------------------------- */
.section { margin-bottom: 48px; }

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}
.title-icon { font-size: 1.1rem; }

/* ---------------------------------------------------------------
   9. Game Cards
   --------------------------------------------------------------- */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}

.games-grid--featured {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.games-grid--4 {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.game-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    position: relative;
    box-shadow: var(--shadow-card);
}
.game-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

.card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}
.card-link:hover { color: inherit; }

.card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
    background: var(--bg-secondary);
}
.card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-card);
    pointer-events: none;
    opacity: 0.7;
    transition: opacity var(--transition);
}
.game-card:hover .card-image::after { opacity: 0.5; }
.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.game-card:hover .card-image img {
    transform: scale(1.07);
}

.card-category {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(15,23,42,0.72);
    color: #f8fafc;
    font-size: 0.67rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    backdrop-filter: blur(6px);
}

.badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-featured { background: #f59e0b; color: #fff; border-radius: 4px; font-size: 0.65rem; }
.badge-default   { background: rgba(15,23,42,0.7); color: #94a3b8; border-radius: 4px; }

.card-body {
    padding: 14px 16px 16px;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--transition);
}
.game-card:hover .card-title { color: var(--accent); }

.card-excerpt {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ---------------------------------------------------------------
   10. Hero Section
   --------------------------------------------------------------- */
.hero {
    background: var(--hero-bg);
    padding: 72px 20px 80px;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 55% 90% at 15% 60%, rgba(109,40,217,0.22) 0%, transparent 60%),
        radial-gradient(ellipse 45% 70% at 85% 30%, rgba(14,116,144,0.18) 0%, transparent 55%);
    pointer-events: none;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: rgba(255,255,255,0.08);
}

.hero-content { position: relative; max-width: 640px; margin: 0 auto; }

.hero-title {
    font-size: clamp(1.9rem, 4.5vw, 3rem);
    font-weight: 800;
    margin-bottom: 12px;
    color: #f8fafc;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.hero-subtitle {
    font-size: 1rem;
    color: rgba(248,250,252,0.6);
    margin-bottom: 28px;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.hero-search {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    background: #ffffff;
    border: none;
    border-radius: 8px;
    overflow: hidden;
    padding: 4px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.3), 0 1px 4px rgba(0,0,0,0.1);
    transition: box-shadow var(--transition);
}
.hero-search:focus-within {
    box-shadow: 0 4px 32px rgba(0,0,0,0.35), 0 0 0 2px rgba(109,40,217,0.4);
}
.hero-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    padding: 9px 16px;
    font-size: 0.9rem;
}
.hero-search-input::placeholder { color: #94a3b8; }
.hero-search .btn { border-radius: 6px; padding: 9px 20px; font-size: 0.875rem; }

/* ---------------------------------------------------------------
   11. Category Cards
   --------------------------------------------------------------- */
.section-categories { margin-bottom: 48px; }

.category-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
}

.category-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--card-radius);
    padding: 24px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    transition: all var(--transition);
    box-shadow: var(--shadow-card);
}
.category-card:hover {
    border-color: var(--accent);
    background: var(--bg-card);
    color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(124,58,237,0.18);
}
.cat-icon { font-size: 2.2rem; }
.cat-name  { font-size: 0.9rem; font-weight: 700; color: var(--text-primary); }
.cat-count { font-size: 0.75rem; color: var(--text-muted); }

/* ---------------------------------------------------------------
   12. Buttons
   --------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary  { background: #6d28d9; color: #fff; box-shadow: 0 1px 3px rgba(109,40,217,0.3); }
.btn-primary:hover  { background: #5b21b6; color: #fff; box-shadow: 0 4px 12px rgba(109,40,217,0.3); }

.btn-outline  {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-play {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    padding: 14px 52px;
    box-shadow: 0 4px 16px rgba(22,163,74,0.35);
    letter-spacing: 0.02em;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}
.btn-play:hover {
    background: linear-gradient(135deg, #15803d 0%, #166534 100%);
    color: #fff;
    box-shadow: 0 8px 24px rgba(22,163,74,0.45);
    transform: translateY(-2px);
}
.btn-play:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(22,163,74,0.25);
}

.btn-danger { background: var(--accent-red); color: #fff; }
.btn-danger:hover { background: #da3633; color: #fff; }

.btn-sm  { padding: 5px 12px; font-size: 0.8rem; }
.btn-lg  { padding: 14px 36px; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* ---------------------------------------------------------------
   13. Game Detail Page
   --------------------------------------------------------------- */
.game-detail-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 32px;
    align-items: start;
}

.game-article {
    min-width: 0;   /* CSS Grid: grid item'ların içerikten küçük olmasını engeller */
    width: 100%;
    overflow: hidden;
}

.game-media {
    width: 100%;
    overflow: hidden;
    margin-bottom: 4px;
}

.game-header {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    padding: 24px 28px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.game-category-badge a {
    display: inline-block;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 4px;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 12px;
    transition: all var(--transition);
}
.game-category-badge a:hover {
    background: #ddd6fe;
    color: var(--accent-hover);
}

.game-title {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    margin-bottom: 10px;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.game-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.game-thumbnail {
    border-radius: var(--card-radius);
    overflow: hidden;
    margin: 0 auto;
    background: var(--bg-secondary);
    width: 100%;
    max-width: 560px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}
.game-thumbnail img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    transition: transform var(--transition-slow);
}
.game-thumbnail:hover img { transform: scale(1.03); }

.play-cta {
    margin: 16px 0 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.play-cta--bottom { margin-top: 32px; }

.play-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 0.01em;
}

.game-section {
    margin-bottom: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    padding: 22px 24px;
    box-shadow: var(--shadow-sm);
}

.game-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    border-left: 3px solid var(--accent);
    padding-left: 12px;
    margin-bottom: 16px;
    margin-top: 0;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.game-content,
.game-how-to-play,
.game-tips {
    color: var(--text-secondary);
    line-height: 1.8;
}

.game-content h2,
.game-how-to-play h2,
.game-tips h2 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin: 20px 0 10px;
}

.game-content p,
.game-how-to-play p,
.game-tips p { margin-bottom: 12px; }

.game-content ol,
.game-content ul,
.game-how-to-play ol,
.game-how-to-play ul,
.game-tips ol,
.game-tips ul {
    list-style: revert;
    padding-left: 24px;
    margin-bottom: 12px;
}

.game-content li,
.game-how-to-play li,
.game-tips li { margin-bottom: 6px; }

/* Oyun Sidebar */
.game-sidebar {
    position: sticky;
    top: calc(var(--header-height, 100px) + 16px);
    min-width: 0;
    align-self: start;
}
.game-sidebar::-webkit-scrollbar { display: none; }

.info-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    overflow: hidden;
    margin-top: 16px;
    box-shadow: var(--shadow-sm);
}

.info-box-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-primary);
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
}

.info-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0;
    padding: 6px 16px;
}
.info-list dt {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 9px 0;
    padding-right: 14px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.info-list dd {
    font-size: 0.875rem;
    color: var(--text-primary);
    padding: 9px 0;
    border-bottom: 1px solid var(--border-light);
    font-weight: 500;
}
.info-list dt:last-of-type,
.info-list dd:last-of-type { border-bottom: none; }

.info-store-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 7px 0;
}

.info-store-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    text-decoration: none;
    transition: all var(--transition);
    line-height: 1;
}
.info-store-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
.info-store-btn--gplay {
    background: #e8f5e9;
    color: #1a6b2a;
    border: 1px solid #a5d6a7;
}
.info-store-btn--gplay:hover {
    background: #c8e6c9;
    color: #1a6b2a;
}
.info-store-btn--apple {
    background: #111;
    color: #fff;
    border: 1px solid #333;
}
.info-store-btn--apple:hover {
    background: #2a2a2a;
    color: #fff;
}

/* Related Games */
.related-games { margin-top: 40px; }

.related-games-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--card-radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.related-games-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-left: 12px;
    border-left: 3px solid var(--accent);
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.games-grid--related {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}

/* ---------------------------------------------------------------
   14. Page Header (Category / Search)
   --------------------------------------------------------------- */
.page-header {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.page-title {
    font-size: 1.65rem;
    margin-bottom: 8px;
    font-weight: 800;
    letter-spacing: -0.025em;
}
.page-title em { color: var(--accent); font-style: normal; }

.page-desc  { color: var(--text-secondary); margin-bottom: 8px; }

.result-count {
    display: inline-block;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 4px;
}

/* ---------------------------------------------------------------
   15. Search Page Form
   --------------------------------------------------------------- */
.search-page-form { margin-bottom: 28px; }

.search-bar-large {
    display: flex;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    max-width: 600px;
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.search-bar-large:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(109,40,217,0.08);
}

.search-input-lg {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    padding: 12px 18px;
    font-size: 1rem;
}
.search-input-lg::placeholder { color: var(--text-muted); }

/* ---------------------------------------------------------------
   16. Pagination
   --------------------------------------------------------------- */
.pagination { margin-top: 32px; }

.pagination-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition);
}
.page-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--bg-card-hover); }
.page-btn.active {
    background: #6d28d9;
    border-color: #6d28d9;
    color: #fff;
    font-weight: 700;
    box-shadow: none;
}
.page-ellipsis { color: var(--text-muted); padding: 0 8px; line-height: 36px; }

/* ---------------------------------------------------------------
   17. Footer
   --------------------------------------------------------------- */
.site-footer {
    background: #0f172a;
    border-top: 1px solid #1e293b;
    padding: 52px 0 0;
    margin-top: 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 32px;
}

.footer-logo { font-size: 1.1rem; margin-bottom: 12px; }

.footer-desc {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.7;
}

.footer-heading {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #475569;
    margin-bottom: 14px;
}

.footer-links li { margin-bottom: 8px; }
.footer-links a {
    font-size: 0.875rem;
    color: #475569;
    transition: color var(--transition);
}
.footer-links a:hover { color: #a78bfa; }
.link-count { font-size: 0.75rem; color: var(--text-muted); }

.footer-bottom {
    border-top: 1px solid #1e293b;
    padding: 18px 0;
    text-align: center;
    font-size: 0.8rem;
    color: #475569;
}
.footer-bottom a { color: #475569; }
.footer-bottom a:hover { color: #a78bfa; }

/* ---------------------------------------------------------------
   18. Empty State
   --------------------------------------------------------------- */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}
.empty-icon { font-size: 4rem; display: block; margin-bottom: 16px; }
.empty-state h2 { font-size: 1.4rem; margin-bottom: 8px; }
.empty-state p  { color: var(--text-secondary); margin-bottom: 20px; }

/* ---------------------------------------------------------------
   19. Error Page
   --------------------------------------------------------------- */
.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: 40px 20px;
}
.error-code  { font-size: 6rem; font-weight: 900; color: var(--accent); line-height: 1; }
.error-title { font-size: 1.6rem; margin: 12px 0; }
.error-desc  { color: var(--text-secondary); margin-bottom: 28px; }
.error-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------------------------------------------------------------
   20. Alerts
   --------------------------------------------------------------- */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.alert ul { list-style: disc; margin-left: 16px; margin-top: 4px; }
.mt-1 { margin-top: 4px; }

.alert-success { background: rgba(22,163,74,0.08);  border: 1px solid rgba(22,163,74,0.3);  color: #15803d; }
.alert-danger  { background: rgba(220,38,38,0.08);  border: 1px solid rgba(220,38,38,0.3);  color: #b91c1c; }
.alert-warning { background: rgba(217,119,6,0.08); border: 1px solid rgba(217,119,6,0.3); color: #b45309; }

.alert-dismissible { position: relative; padding-right: 40px; }
.alert-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 1.1rem;
    opacity: 0.7;
}
.alert-close:hover { opacity: 1; }

/* ---------------------------------------------------------------
   21. Rating Widget (sidebar – Play Store style)
   --------------------------------------------------------------- */
.rating-widget {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    padding: 0;
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.rating-widget-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-primary);
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
    margin: 0;
}

.rating-widget-body {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 18px 16px;
}

.rating-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 64px;
    flex-shrink: 0;
}

.rating-score {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.rating-stars-row {
    display: flex;
    gap: 2px;
    margin-bottom: 6px;
}

.rating-star { font-size: 0.9rem; }
.rating-star.filled { color: #f0b429; }
.rating-star.half   { color: #f0b429; opacity: 0.6; }
.rating-star.empty  { color: var(--text-muted); }

.rating-reviews {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.3;
}

.rating-bars {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.rating-bar-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.bar-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    min-width: 10px;
    text-align: right;
    flex-shrink: 0;
}

.bar-track {
    flex: 1;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: #6d28d9;
    border-radius: 4px;
    transition: width 0.6s ease;
}

.game-meta time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.game-meta time + .game-meta-rating::before {
    content: '·';
    margin-right: 4px;
    opacity: 0.5;
}

/* Inline meta rating (header area) */
.game-meta-rating {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.meta-stars {
    color: #f0b429;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

/* ---------------------------------------------------------------
   22. Play Store Badge & App Store Badge
   --------------------------------------------------------------- */
.store-badges-wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 28px 0 8px;
}

.playstore-badge-wrap {
    margin: 0;
    display: flex;
    justify-content: center;
}

.playstore-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    padding: 10px 20px 10px 14px;
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.playstore-badge:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--text-primary);
}

.ps-badge-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.ps-badge-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.ps-badge-text small {
    font-size: 0.65rem;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 500;
}

.ps-badge-text strong {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.01em;
}

/* App Store Badge */
.appstore-badge-wrap {
    margin: 0;
    display: flex;
    justify-content: center;
}

.appstore-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #000;
    border: 1px solid #333;
    border-radius: var(--card-radius);
    padding: 10px 20px 10px 14px;
    text-decoration: none;
    color: #fff;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.appstore-badge:hover {
    background: #1a1a1a;
    border-color: #555;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: #fff;
}

.as-badge-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.as-badge-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.as-badge-text small {
    font-size: 0.65rem;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    font-weight: 500;
}

.as-badge-text strong {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.01em;
}

/* ---------------------------------------------------------------
   23. Screenshots Carousel
   --------------------------------------------------------------- */
.screenshot-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    overflow: hidden;
}

.screenshot-track {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 2px 8px;
    flex: 1;
}
.screenshot-track::-webkit-scrollbar { display: none; }

.screenshot-thumb {
    flex: 0 0 auto;
    width: 140px;
    display: block;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    aspect-ratio: 9/16;
    scroll-snap-align: start;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.screenshot-thumb:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--accent);
}

.screenshot-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: var(--bg-secondary);
}

.ss-nav {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition), border-color var(--transition);
    user-select: none;
}
.ss-nav:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 2px 8px rgba(109,40,217,0.2);
}

/* ---------------------------------------------------------------
   24. Game Tags
   --------------------------------------------------------------- */
.game-tags-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.game-tag {
    display: inline-block;
    padding: 3px 11px;
    border-radius: 4px;
    font-size: 0.76rem;
    font-weight: 600;
    background: var(--accent-light);
    border: none;
    color: var(--accent);
    letter-spacing: 0.02em;
    white-space: nowrap;
    transition: background var(--transition), color var(--transition);
}
.game-tag:hover { background: #ddd6fe; color: var(--accent-hover); }

/* ---------------------------------------------------------------
   25. Homepage Bottom Card
   --------------------------------------------------------------- */
.homepage-bottom-card {
    margin: 40px 0 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--card-radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.hbc-inner {
    padding: 32px 40px;
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 0.95rem;
}

.hbc-inner h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
    letter-spacing: -0.02em;
}

.hbc-inner p  { margin-bottom: 12px; }
.hbc-inner p:last-child { margin-bottom: 0; }
.hbc-inner ul, .hbc-inner ol { list-style: revert; padding-left: 24px; margin-bottom: 12px; }
.hbc-inner li { margin-bottom: 5px; }
.hbc-inner a  { color: var(--accent); }
.hbc-inner a:hover { color: var(--accent-hover); }
@media (max-width: 900px) {
    .game-detail-layout { grid-template-columns: 1fr; }
    .game-sidebar {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        align-items: start;
        min-width: 0;
        max-height: none;
        overflow-y: visible;
    }
    .game-sidebar .ad-zone   { grid-column: 1 / -1; }
    .game-sidebar .info-box  { margin-top: 0; }
    .game-thumbnail { max-width: 100%; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .games-grid--related { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
    /* Header */
    .header-inner { flex-wrap: wrap; height: auto; padding: 10px 0; gap: 10px; }
    .menu-toggle  { display: flex; }

    .category-nav {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        border-top-width: 0;
    }
    .category-nav.open {
        max-height: 500px;
        border-top-width: 1px;
        padding-bottom: 4px;
    }
    .cat-nav-list { flex-direction: column; align-items: flex-start; gap: 0; padding: 4px 0; }
    .cat-nav-list li { width: 100%; }
    .cat-nav-list li a { padding: 10px 12px; border-bottom: 1px solid var(--border-light); border-left: none; }
    .cat-nav-list li a.active { border-left: 3px solid var(--accent); border-bottom-color: transparent; }

    /* Grids */
    .games-grid--featured { grid-template-columns: 1fr; }
    .category-cards       { grid-template-columns: repeat(2, 1fr); }
    .games-grid--4        { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .footer-grid          { grid-template-columns: 1fr; gap: 24px; }
    .hero { padding: 40px 20px; }

    /* Game detail */
    .game-detail-layout   { gap: 20px; }
    .game-article         { overflow: hidden; min-width: 0; }
    .game-header          { padding: 14px 16px; margin-bottom: 14px; }
    .game-title           { font-size: clamp(1.2rem, 5vw, 1.6rem); }
    .game-meta            { font-size: 0.79rem; gap: 6px; flex-wrap: wrap; }
    .game-meta-rating     { font-size: 0.79rem; }
    .game-sidebar         { grid-template-columns: 1fr; }
    .game-section         { padding: 16px; margin-bottom: 16px; }
    .game-thumbnail       { max-width: 100%; border-radius: 8px; }
    .game-media           { overflow: hidden; }
    .play-cta             { align-items: stretch; margin: 14px 0 20px; }
    .btn-play             { width: 100%; justify-content: center; font-size: 1rem; padding: 14px 20px; }
    .play-hint            { text-align: center; }
    .screenshot-thumb     { width: 100px; }
    .related-games-card { padding: 16px; }
    .games-grid--related  { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .ad-placeholder       { min-height: 70px; font-size: 0.65rem; }
    .ad-placeholder--vertical { min-height: 150px; }
    .playstore-badge-wrap, .appstore-badge-wrap { margin: 0; }
    .related-games        { margin-top: 32px; }
    .info-box             { margin-top: 0; }
    .rating-widget        { padding: 14px 12px; }
    .rating-score         { font-size: 2rem; }
}

@media (max-width: 480px) {
    .container  { padding: 0 14px; }
    .site-body  { padding: 14px 0 28px; }

    /* Grids */
    .games-grid   { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .category-cards { grid-template-columns: repeat(2, 1fr); }
    .games-grid--4  { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .games-grid--related { grid-template-columns: repeat(2, 1fr); gap: 8px; }

    /* Game detail small phones */
    .game-header  { padding: 12px 14px; border-radius: 8px; }
    .game-title   { font-size: clamp(1.1rem, 5vw, 1.4rem); }
    .game-section { padding: 14px; border-radius: 8px; margin-bottom: 12px; }
    .game-meta    { font-size: 0.75rem; }
    .btn-play     { font-size: 0.95rem; padding: 13px 16px; }
    .info-list dt, .info-list dd { font-size: 0.78rem; padding: 7px 0; }
    .info-list dt { padding-right: 10px; }
    .screenshot-thumb { width: 88px; }
    .rating-score { font-size: 1.8rem; }
    .breadcrumb-list, .breadcrumb ol { font-size: 0.74rem; }
}
