:root {
    --bg: #081021;
    --bg-soft: #101b36;
    --surface: #132346;
    --surface-alt: #1a2f59;
    --line: rgba(164, 198, 255, 0.2);
    --text: #f3f7ff;
    --muted: #bad0f4;
    --brand: #27d4a6;
    --brand-2: #58a6ff;
    --accent: #ffd56e;
    --radius: 16px;
    --shadow: 0 22px 50px rgba(2, 8, 24, 0.35);
}

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

html,
body {
    min-height: 100%;
}

body {
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(1000px 400px at 8% -5%, rgba(88, 166, 255, 0.4), transparent 60%),
        radial-gradient(900px 500px at 100% 0%, rgba(39, 212, 166, 0.2), transparent 62%),
        var(--bg);
}

a {
    color: inherit;
}

.container {
    width: min(1160px, 92vw);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(8, 16, 33, 0.85);
    backdrop-filter: blur(10px);
}

.header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.logo {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    width: 44px;
    height: 44px;
}

.logo h1 {
    font-size: 1.18rem;
    letter-spacing: 0.4px;
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

nav a {
    text-decoration: none;
    color: var(--muted);
    padding: 9px 14px;
    border-radius: 999px;
    transition: 0.22s ease;
    font-weight: 700;
}

nav a:hover,
nav a.active {
    color: var(--text);
    background: rgba(88, 166, 255, 0.22);
}

main {
    padding: 30px 0 44px;
}

.section-title {
    margin-bottom: 14px;
    font-size: 1.35rem;
}

.hero-banner {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.hero-copy,
.hero-note,
.featured-card,
.game-details,
.game-reviews,
.content-page,
.contact-form,
.contact-info,
.legal-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: linear-gradient(160deg, var(--surface), var(--bg-soft));
}

.hero-copy,
.hero-note {
    padding: 22px;
}

.hero-copy h2 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.hero-copy p,
.hero-note p {
    color: var(--muted);
}

.feature-list {
    margin-top: 12px;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feature-list li {
    color: var(--muted);
}

.featured-card {
    overflow: hidden;
    display: grid;
    grid-template-columns: 260px 1fr;
}

.featured-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-content {
    padding: 22px;
}

.featured-content h2 {
    margin-bottom: 10px;
}

.author,
.popularity {
    color: var(--muted);
    margin-bottom: 7px;
}

.rating {
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 8px;
}

.description {
    color: var(--text);
    opacity: 0.95;
    margin-bottom: 14px;
}

.play-button {
    border: none;
    border-radius: 12px;
    background: linear-gradient(130deg, var(--brand), var(--brand-2));
    color: #061726;
    padding: 11px 18px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.22s ease, filter 0.22s ease;
}

.play-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-top: 12px;
}

.game-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(160deg, #162a54, #111f3f);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.game-card:hover {
    transform: translateY(-4px);
    border-color: rgba(88, 166, 255, 0.75);
}

.game-card img {
    width: 100%;
    height: 128px;
    object-fit: cover;
}

.card-content {
    padding: 11px;
}

.card-content h3 {
    font-size: 0.98rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 6px;
}

.card-content .popularity {
    font-size: 0.86rem;
    margin-bottom: 0;
}

.category-tabs {
    margin-bottom: 8px;
}

.categories-scroll-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-tab {
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    padding: 8px 14px;
    cursor: pointer;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.03);
}

.category-tab.active,
.category-tab:hover {
    color: var(--text);
    border-color: rgba(39, 212, 166, 0.7);
    background: rgba(39, 212, 166, 0.16);
}

.pagination {
    margin-top: 18px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.pagination button {
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    padding: 7px 11px;
    cursor: pointer;
}

.pagination button.active,
.pagination button:hover {
    border-color: rgba(88, 166, 255, 0.7);
    background: rgba(88, 166, 255, 0.2);
}

.game-details,
.game-reviews,
.content-page {
    padding: 20px;
}

.game-reviews {
    margin-top: 16px;
}

.game-details-header {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 20px;
}

.game-details-header img {
    width: 100%;
    min-height: 160px;
    border-radius: 12px;
    object-fit: cover;
}

.play-button-container {
    margin: 18px 0;
    text-align: center;
}

.review-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.03);
    margin-bottom: 10px;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.review-header img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
}

.review-date {
    color: var(--muted);
    font-size: 0.85rem;
}

.review-comment {
    color: #d7e2ff;
}

.pc-only {
    display: block;
}

.mobile-only {
    display: none;
}

.mobile-play-button {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 30;
}

.mobile-play-button .play-button {
    width: 100%;
}

.game-container {
    position: fixed;
    inset: 0;
    background: #050a14;
}

#game-frame {
    border: 0;
    width: 100%;
    height: 100%;
}

.back-button-container {
    position: fixed;
    left: 14px;
    top: 14px;
    z-index: 60;
}

.back-button {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 0;
    cursor: pointer;
    background: rgba(39, 212, 166, 0.9);
    color: #052017;
    font-size: 1.15rem;
    font-weight: 800;
}

.game-error {
    width: min(600px, 92vw);
    margin: 12vh auto;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface);
    text-align: center;
    padding: 22px;
}

.game-error h2 {
    margin-bottom: 10px;
}

.site-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 22px 0;
    margin-top: 30px;
}

.footer-content {
    width: min(1160px, 92vw);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    color: var(--muted);
}

.footer-links {
    display: flex;
    gap: 14px;
}

.footer-links a {
    color: var(--muted);
    text-decoration: none;
}

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

.content-page h2,
.content-page h3,
.contact-info h2,
.contact-info h3,
.legal-card h2,
.legal-card h3 {
    margin: 14px 0 8px;
}

.content-page p,
.content-page li,
.contact-info p,
.contact-form p,
.legal-card p,
.legal-card li {
    color: #d7dff8;
    line-height: 1.65;
}

.content-page ul,
.legal-card ul {
    margin-left: 18px;
    margin-bottom: 8px;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 18px;
}

.contact-form,
.contact-info,
.legal-card {
    padding: 20px;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
}

.form-group textarea {
    min-height: 140px;
    resize: vertical;
}

.notice {
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.92rem;
}

.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 90;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: linear-gradient(160deg, rgba(13, 27, 53, 0.96), rgba(12, 24, 46, 0.96));
    box-shadow: var(--shadow);
    padding: 14px 16px;
}

.cookie-banner__text strong {
    display: block;
    margin-bottom: 4px;
}

.cookie-banner__text p {
    color: var(--muted);
    margin-bottom: 4px;
}

.cookie-banner__text a {
    color: var(--brand);
    font-weight: 700;
    text-decoration: none;
}

.cookie-banner__actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.cookie-btn {
    border: 0;
    border-radius: 10px;
    padding: 10px 12px;
    cursor: pointer;
    font-weight: 800;
    color: #052017;
    background: linear-gradient(130deg, var(--brand), var(--brand-2));
}

.cookie-btn--ghost {
    color: var(--text);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
}

.loading-spinner {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--brand);
    margin: 20px auto;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
