/* ═══════════════════════════════════════════════════════════════
   GameZone — Main Stylesheet
   ═══════════════════════════════════════════════════════════════ */

/* ── CSS Variables ── */
:root {
    --dark:        #02060f;
    --card:        #0d1117;
    --card-hover:  #111827;
    --border:      rgba(255,255,255,0.08);
    --text:        #e4e4e4;
    --text-muted:  rgba(255,255,255,0.45);
    --accent:      #6366f1;
    --accent2:     #e94560;
    --gradient:    linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #e94560 100%);
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }
body {
    background: var(--dark);
    color: var(--text);
    font-family: 'Play', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
}
a { color: var(--accent); }
a:hover { color: #a78bfa; }
img { max-width: 100%; height: auto; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--dark); }
::-webkit-scrollbar-thumb { background: rgba(99,102,241,.5); border-radius: 3px; }

/* ── Gradient text ── */
.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Buttons ── */
.btn-glow { box-shadow: 0 0 20px rgba(99,102,241,0.4); }
.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
}
.btn-primary:hover {
    background: #5558e8;
    border-color: #5558e8;
}

/* ════════════════════════════════════════════
   HEADER / NAVBAR
   ════════════════════════════════════════════ */
.header-top {
    background: rgba(2,6,23,0.95);
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}
.header-contacts { color: var(--text-muted); }
.social-link {
    color: var(--text-muted);
    font-size: 16px;
    margin-left: 12px;
    text-decoration: none;
    transition: color .2s;
}
.social-link:hover { color: var(--accent); }

.main-nav {
    background: rgba(2,6,23,0.97);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.navbar-brand {
    font-family: 'Russo One', sans-serif;
    font-size: 22px;
    color: #fff !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.brand-icon { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.brand-text { color: #fff; }

.main-nav .nav-link {
    color: rgba(255,255,255,0.7) !important;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 14px !important;
    border-radius: 6px;
    transition: all .2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.main-nav .nav-link:hover,
.main-nav .nav-link.active {
    color: #fff !important;
    background: rgba(99,102,241,0.15);
}

/* Search in nav */
.search-wrap { position: relative; }
.search-wrap .form-control {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    color: #fff;
    border-radius: 20px;
    padding: 7px 16px;
    font-size: 13px;
    min-width: 200px;
}
.search-wrap .form-control:focus {
    background: rgba(255,255,255,0.1);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.2);
    outline: none;
}
.search-wrap .btn {
    background: none;
    border: none;
    color: var(--text-muted);
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
}

/* User avatar (navbar) */
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--card);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(99,102,241,.5);
    flex-shrink: 0;
}
.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Avatar 80×80 on profile page */
.avatar-lg {
    width: 80px !important;
    height: 80px !important;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(99,102,241,.6);
}
.user-name { font-size: 14px; font-weight: 500; color: rgba(255,255,255,.85); }
.user-dropdown { display: flex; align-items: center; gap: 8px; }

/* ════════════════════════════════════════════
   GLOBAL PAGE ELEMENTS
   ════════════════════════════════════════════ */
.main-content { min-height: calc(100vh - 200px); }

/* Breadcrumb */
.breadcrumb-item + .breadcrumb-item::before { color: var(--text-muted); }
.breadcrumb-item.active { color: var(--text-muted); }
.breadcrumb-item a { color: var(--accent); text-decoration: none; }

/* Cards */
.content-card, .sidebar-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}
.sidebar-card h4 {
    font-family: 'Russo One', sans-serif;
    font-size: 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Info table */
.info-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.info-table th, .info-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); }
.info-table th { color: var(--text-muted); width: 40%; font-weight: 500; }
.info-table td { color: var(--text); }

/* Pagination */
.pagination .page-link {
    background: var(--card);
    border-color: var(--border);
    color: var(--text-muted);
}
.pagination .page-link:hover { background: var(--card-hover); color: #fff; }
.pagination .page-item.active .page-link {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* ════════════════════════════════════════════
   GAME PAGE
   ════════════════════════════════════════════ */
.game-hero {
    background-size: cover;
    background-position: center;
    padding: 60px 0 0;
}
.game-cover-main {
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,.5);
    width: 280px;
    height: 280px;
    object-fit: cover;
    display: block;
}
.game-title-main {
    font-family: 'Russo One', sans-serif;
    font-size: 36px;
    line-height: 1.2;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,.5);
}
.game-title-en { color: rgba(255,255,255,.5); font-size: 18px; }
.game-meta-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin: 12px 0;
    color: rgba(255,255,255,.7);
    font-size: 14px;
}
.game-meta-row span { display: flex; align-items: center; gap: 6px; }
.game-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.platform-tag, .genre-tag-sm {
    background: rgba(99,102,241,.2);
    border: 1px solid rgba(99,102,241,.3);
    color: rgba(255,255,255,.8);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.game-description { line-height: 1.8; color: var(--text-muted); }

/* Screenshots grid */
.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.screenshots-grid a { border-radius: 8px; overflow: hidden; display: block; }
.screenshots-grid img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    transition: transform .3s;
}
.screenshots-grid a:hover img { transform: scale(1.05); }

/* Rating buttons */
.rating-buttons { display: flex; gap: 5px; flex-wrap: wrap; justify-content: center; }
.rate-btn {
    width: 36px; height: 36px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text-muted);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    display: flex; align-items: center; justify-content: center;
}
.rate-btn:hover, .rate-btn.hover { background: rgba(99,102,241,.3); border-color: var(--accent); color: #fff; }
.rate-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Rating display */
.rating-display { text-align: center; margin-bottom: 10px; }
.rating-big {
    font-family: 'Russo One', sans-serif;
    font-size: 48px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.rating-max { font-size: 24px; color: var(--text-muted); }
.rating-count { text-align: center; color: var(--text-muted); margin-bottom: 20px; }
.your-rating { border-top: 1px solid var(--border); padding-top: 15px; }

/* Comments */
.comment-item { display: flex; gap: 15px; padding: 15px 0; border-bottom: 1px solid var(--border); }
.comment-item:last-child { border-bottom: none; }
.comment-avatar { width: 50px; height: 50px; border-radius: 50%; overflow: hidden; background: var(--card-hover); display: flex; align-items: center; justify-content: center; font-size: 24px; color: var(--text-muted); flex-shrink: 0; }
.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-meta span { color: var(--text-muted); font-size: 13px; margin-left: 10px; }
.comment-text { margin-top: 6px; line-height: 1.6; }
.comment-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99,102,241,.2); }
.comments-list .comment-item:last-child { border-bottom: none; }

/* ════════════════════════════════════════════
   CATALOGUE / LISTS (games, news, etc.)
   ════════════════════════════════════════════ */
.page-hero {
    background: linear-gradient(135deg, #0f1623 0%, #1a1040 100%);
    padding: 48px 0;
    border-bottom: 1px solid var(--border);
}
.page-hero h1 { font-family: 'Russo One', sans-serif; font-size: 32px; margin: 0; }

/* Filter bar */
.filter-bar {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}
.filter-bar .form-select, .filter-bar .form-control {
    background: rgba(255,255,255,.05);
    border: 1px solid var(--border);
    color: #fff;
    font-size: 13px;
    border-radius: 8px;
}
.filter-bar .form-select:focus, .filter-bar .form-control:focus {
    border-color: var(--accent);
    box-shadow: none;
    background: rgba(255,255,255,.08);
}

/* ════════════════════════════════════════════
   CONTENT PAGES (news, reviews, videos, etc.)
   ════════════════════════════════════════════ */
.article-cover {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 24px;
}
.article-content {
    line-height: 1.85;
    color: rgba(255,255,255,.82);
    font-size: 16px;
}
.article-content h2, .article-content h3 {
    font-family: 'Russo One', sans-serif;
    color: #e4e4e4;
    margin-top: 32px;
    margin-bottom: 16px;
}
.article-content p { margin-bottom: 16px; }
.article-content img { border-radius: 8px; margin: 16px 0; }
.article-content a { color: var(--accent); }
.article-content blockquote {
    border-left: 3px solid var(--accent);
    padding: 12px 20px;
    margin: 20px 0;
    background: rgba(99,102,241,.08);
    border-radius: 0 8px 8px 0;
    color: rgba(255,255,255,.7);
    font-style: italic;
}

/* Cheat codes */
.cheat-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 8px;
}
.cheat-item code {
    background: rgba(99,102,241,.15);
    border: 1px solid rgba(99,102,241,.25);
    color: #a78bfa;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
    display: block;
    margin-top: 6px;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}
.copy-btn { cursor: pointer; }

/* Trainer item */
.trainer-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.trainer-item:last-child { border-bottom: none; }
.trainer-info { flex: 1; }
.trainer-info .version {
    background: rgba(99,102,241,.2);
    color: #a78bfa;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 8px;
}

/* ════════════════════════════════════════════
   PROFILE PAGE
   ════════════════════════════════════════════ */
.profile-header {
    background: linear-gradient(135deg, #0f1623, #1a1040);
    padding: 40px;
    border-radius: 16px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
    display: flex;
    gap: 24px;
    align-items: center;
}
.profile-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}
.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(99,102,241,.6);
    display: block;
}
.profile-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--card);
    border: 3px solid rgba(99,102,241,.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: var(--text-muted);
}
.profile-name {
    font-family: 'Russo One', sans-serif;
    font-size: 26px;
    margin: 0 0 6px;
}
.profile-role {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 3px 12px;
    border-radius: 12px;
    background: rgba(99,102,241,.25);
    color: #a78bfa;
    font-family: 'Russo One', sans-serif;
}

/* ════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════ */
.site-footer {
    background: var(--dark);
    border-top: 1px solid var(--border);
}
.footer-main { padding: 60px 0 40px; }
.footer-logo {
    font-family: 'Russo One', sans-serif;
    font-size: 24px;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}
.footer-desc { color: var(--text-muted); font-size: 14px; line-height: 1.7; margin-bottom: 20px; }
.footer-title { font-family: 'Russo One', sans-serif; font-size: 14px; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 16px; color: rgba(255,255,255,.6); }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 14px; transition: color .2s; }
.footer-links a:hover { color: #fff; }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a {
    width: 38px; height: 38px;
    border-radius: 8px;
    background: rgba(255,255,255,.06);
    border: 1px solid var(--border);
    color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    text-decoration: none;
    transition: all .2s;
}
.footer-social a:hover { background: rgba(99,102,241,.25); color: #fff; border-color: rgba(99,102,241,.4); }
.footer-bottom {
    padding: 20px 0;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 13px;
}
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { color: var(--text-muted); text-decoration: none; transition: color .2s; }
.footer-bottom-links a:hover { color: #fff; }

/* ════════════════════════════════════════════
   AUTH PAGES
   ════════════════════════════════════════════ */
.auth-page { min-height: 80vh; display: flex; align-items: center; justify-content: center; padding: 40px 0; }
.auth-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 440px;
}
.auth-card h2 { font-family: 'Russo One', sans-serif; font-size: 28px; margin-bottom: 8px; }
.auth-card .form-control {
    background: rgba(255,255,255,.05);
    border: 1px solid var(--border);
    color: #fff;
    border-radius: 8px;
    padding: 12px 16px;
}
.auth-card .form-control:focus {
    background: rgba(255,255,255,.08);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99,102,241,.2);
}

/* ════════════════════════════════════════════
   GAME PAGE — Sysreq, Videos
   ════════════════════════════════════════════ */
.sysreq-content { color: rgba(255,255,255,.7); }
.sysreq-content h2, .sysreq-content h3 {
    color: #e4e4e4;
    margin-top: 1.5rem;
    margin-bottom: .75rem;
    font-family: 'Russo One', sans-serif;
    font-size: 1.05rem;
    padding-bottom: .4rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
}
.sysreq-content table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.sysreq-content td, .sysreq-content th {
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,.1);
}
.sysreq-content th { background: rgba(99,102,241,.15); color: #e4e4e4; text-align: left; }
.sysreq-content td:first-child { color: rgba(255,255,255,.5); width: 40%; }
.sysreq-content pre {
    background: #0d1117;
    color: #cdd6f4;
    padding: 14px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 13px;
}

.video-list-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.video-list-item:last-child { border-bottom: none; }
.video-list-item img {
    width: 120px;
    height: 68px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

/* ════════════════════════════════════════════
   FORM CONTROLS (public)
   ════════════════════════════════════════════ */
.form-control, .form-select {
    background: rgba(255,255,255,.05);
    border: 1px solid var(--border);
    color: #fff;
    border-radius: 8px;
}
.form-control:focus, .form-select:focus {
    background: rgba(255,255,255,.08);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99,102,241,.2);
    color: #fff;
    outline: none;
}
.form-control::placeholder { color: rgba(255,255,255,.3); }
.form-select option { background: #0d1117; color: #e4e4e4; }

/* ════════════════════════════════════════════
   SEARCH DROPDOWN
   ════════════════════════════════════════════ */
.search-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #111827;
    border: 1px solid rgba(99,102,241,.3);
    border-radius: 10px;
    box-shadow: 0 16px 40px rgba(0,0,0,.5);
    z-index: 2000;
    display: none;
    max-height: 320px;
    overflow-y: auto;
}
.search-item {
    display: block;
    padding: 10px 16px;
    color: #e4e4e4;
    border-bottom: 1px solid rgba(255,255,255,.06);
    text-decoration: none;
    font-size: 13px;
}
.search-item:hover { background: rgba(99,102,241,.15); color: #fff; }
.search-item small { display: block; font-size: 11px; color: rgba(255,255,255,.4); margin-top: 2px; }

/* ════════════════════════════════════════════
   ALERTS / FLASH
   ════════════════════════════════════════════ */
.alert-info { background: rgba(99,102,241,.15); border-color: rgba(99,102,241,.3); color: rgba(255,255,255,.8); }
.alert-success { background: rgba(74,222,128,.1); border-color: rgba(74,222,128,.25); color: rgba(255,255,255,.8); }
.alert-danger { background: rgba(248,113,113,.1); border-color: rgba(248,113,113,.25); color: rgba(255,255,255,.8); }
.alert-warning { background: rgba(250,204,21,.1); border-color: rgba(250,204,21,.25); color: rgba(255,255,255,.8); }

/* ════════════════════════════════════════════
   LIGHTBOX
   ════════════════════════════════════════════ */
.lightbox {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.92);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999; cursor: pointer;
}
.lightbox-content { position: relative; max-width: 92vw; max-height: 92vh; }
.lightbox-content img { max-width: 100%; max-height: 90vh; border-radius: 10px; }
.lightbox-close {
    position: absolute; top: -44px; right: 0;
    background: none; border: none; color: #fff; font-size: 36px; cursor: pointer; line-height: 1;
}

/* ════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════ */
@media (max-width: 992px) {
    .game-title-main { font-size: 26px; }
    .game-cover-main { width: 180px; height: 180px; }
    .profile-header { flex-direction: column; text-align: center; padding: 24px; }
    .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
    .footer-bottom-links { justify-content: center; }
}
@media (max-width: 768px) {
    .main-nav { padding: 8px 0; }
    .screenshots-grid { grid-template-columns: repeat(2, 1fr); }
    .game-hero { padding: 30px 0 0; }
    .game-cover-main { width: 120px; height: 120px; }
}
