:root {
    color-scheme: dark;
    color: #7cff7c;
    background: #020402;
    font-family: "Courier New", Courier, monospace;
    font-size: 16px;
    line-height: 1.6;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top left, rgba(20, 255, 20, 0.06), transparent 20%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.96), #040806 60%, #081108 100%);
    color: #b7ffb7;
}

.page-shell {
    padding: 24px;
}

.hero {
    border: 1px solid rgba(32, 255, 32, 0.25);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 28px;
    background: rgba(0, 20, 0, 0.45);
    box-shadow: 0 0 40px rgba(0, 255, 0, 0.08);
}

.hero-content {
    max-width: 960px;
    margin: 0 auto;
}

.terminal-tag {
    color: #6ce96c;
    font-size: 0.95rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin: 0 0 12px 0;
}

h1,
h2,
h3 {
    margin: 0;
    font-weight: 400;
}

h1 {
    font-size: clamp(2.6rem, 4vw, 4rem);
    letter-spacing: 0.1em;
    color: #9cff9c;
}

.hero-text,
.section-description,
.game-card p,
.page-footer p {
    color: #c4f4c4;
}

.hero-text {
    margin-top: 16px;
    max-width: 700px;
}

.games-section {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 18px;
    border: 1px solid rgba(32, 255, 32, 0.25);
    border-radius: 12px;
    padding: 20px 24px;
    background: rgba(0, 20, 0, 0.35);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.05);
    text-align: center;
}

.section-header h2 {
    font-size: 2rem;
    margin-top: 8px;
    color: #b5ffb5;
}

.section-description {
    margin: 8px auto 0;
    max-width: 760px;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.game-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 270px;
    min-width: 260px;
    padding: 22px;
    background: rgba(0, 12, 0, 0.64);
    border: 1px solid rgba(120, 255, 120, 0.2);
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.game-card:hover,
.game-card:focus-visible {
    transform: translateY(-4px);
    border-color: rgba(120, 255, 120, 0.6);
    background: rgba(0, 20, 0, 0.82);
    box-shadow: 0 10px 35px rgba(0, 255, 0, 0.08);
}

.game-card-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 14px;
}

.open-test-badge {
    font-size: 0.85rem;
    padding: 4px 10px;
    color: #7cff7c;
    flex: 0 0 auto;
    text-align: center;
    transition: all 0.2s ease;
}

/* Keep game cards at consistent height regardless of language */
.game-card>p {
    flex: 1;
    margin-bottom: 14px;
}

.game-label {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    background: rgba(12, 50, 12, 0.8);
    border: 1px solid rgba(120, 255, 120, 0.3);
    border-radius: 6px;
    font-size: 0.8rem;
    color: #7cff7c;
}

.back-link {
    display: inline-block;
    color: #7cff7c;
    text-decoration: none;
    margin-bottom: 16px;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: #b7ffb7;
    text-decoration: underline;
}

/* Terminal-style back link: no visited color change */
.back-link:visited {
    color: #7cff7c;
}

.privacy-content {
    max-width: 960px;
    margin: 0 auto;
    text-align: left;
}

.privacy-content .back-link {
    display: inline-block;
    margin-bottom: 24px;
}

/* Terminal green links inside privacy policy content */
.privacy-content a {
    color: #7cff7c;
    text-decoration: none;
}

.privacy-content a:hover {
    color: #b7ffb7;
    text-decoration: underline;
}

.privacy-content a:visited {
    color: #7cff7c;
}

.page-footer {
    text-align: center;
    margin-top: 40px;
    padding: 16px 0;
    border-top: 1px solid rgba(32, 255, 32, 0.2);
}

.game-links {
    margin-top: auto;
    padding-top: 14px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.game-links a {
    font-size: 0.85rem;
    color: #7cff7c;
    text-decoration: none;
    border: 1px solid rgba(120, 255, 120, 0.35);
    padding: 4px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.game-links a:hover {
    background: rgba(120, 255, 120, 0.12);
    border-color: #7cff7c;
    color: #b7ffb7;
}

/* Prevent visited links from changing color (terminal style) */
.game-links a:visited {
    color: #7cff7c;
}

.lang-switch {
    position: absolute;
    top: 20px;
    right: 30px;
    display: flex;
    gap: 4px;
}

.lang-switch button {
    background: transparent;
    border: 1px solid rgba(124, 255, 124, 0.4);
    color: #7cff7c;
    font-family: inherit;
    font-size: 0.75rem;
    padding: 4px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-switch button.active,
.lang-switch button:hover {
    background: rgba(124, 255, 124, 0.15);
    border-color: #7cff7c;
    color: #b7ffb7;
}

/* Mobile responsiveness */
@media (max-width: 650px) {
    .page-shell {
        padding: 16px;
    }

    .hero {
        padding: 20px;
    }

    .lang-switch {
        position: static;
        margin-bottom: 12px;
        justify-content: flex-end;
    }

    .games-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .game-card {
        min-height: auto;
        padding: 18px;
    }

    .section-header {
        padding: 16px;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 400px) {
    h1 {
        font-size: 2.2rem;
    }

    .game-card {
        padding: 16px;
    }
}