/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ── Base ──────────────────────────────────────────────────────────────────── */
:root {
    --bg-primary: #0a0e17;
    --bg-overlay: rgba(10, 14, 23, 0.85);
    --text-primary: #f5dfbb;
    --text-secondary: #b8a48a;
    --accent: #4a9eff;
    --accent-hover: #6bb3ff;
    --accent-pressed: #3580d4;
    --input-bg: rgba(255, 255, 255, 0.08);
    --input-border: rgba(255, 255, 255, 0.15);
    --input-focus: rgba(74, 158, 255, 0.4);
    --success: #4ade80;
    --error: #f87171;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    /* Background image: replace with your space background */
    background-image: url("../assets/bg.jpg");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--text-primary);
    text-decoration: none;
}

/* ── Header ────────────────────────────────────────────────────────────────── */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    position: relative;
    z-index: 10;
}

.logo-img {
    height: 40px;
    width: auto;
}

.mail-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-primary);
    transition: background 0.2s, border-color 0.2s;
}

.mail-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent);
    color: var(--accent);
}

/* ── Main / Hero ───────────────────────────────────────────────────────────── */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.hero {
    max-width: 560px;
    width: 100%;
}

.hero h1 {
    font-size: 1.6rem;
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.game-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 2rem;
}

.hero h2 {
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* ── Signup Form ───────────────────────────────────────────────────────────── */
.signup-form {
    display: flex;
    gap: 0;
    max-width: 440px;
    margin: 0 auto 1rem;
}

.signup-form input[type="email"] {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-right: none;
    border-radius: 6px 0 0 6px;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}

.signup-form input[type="email"]:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.12);
}

.signup-form input[type="email"]::placeholder {
    color: var(--text-secondary);
}

.signup-form button {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-family: inherit;
    font-weight: 600;
    color: #fff;
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.signup-form button:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.signup-form button:active {
    background: var(--accent-pressed);
    border-color: var(--accent-pressed);
}

.signup-form button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ── Form message ──────────────────────────────────────────────────────────── */
.form-message {
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.form-message.success {
    color: var(--success);
}

.form-message.error {
    color: var(--error);
}

/* ── Privacy ───────────────────────────────────────────────────────────────── */
.privacy-note {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

/* ── Social Links ──────────────────────────────────────────────────────────── */
.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-secondary);
    transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.15s;
}

.social-icon:hover {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--accent);
    transform: translateY(-2px);
}

/* ── Footer ────────────────────────────────────────────────────────────────── */
footer {
    text-align: center;
    padding: 1.5rem 2rem;
    position: relative;
    z-index: 10;
}

.footer-links {
    margin-bottom: 0.5rem;
}

.footer-links a {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s;
}

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

.copyright {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ── Modal (Impressum) ─────────────────────────────────────────────────────── */
.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal[hidden] {
    display: none;
}

.modal-content {
    background: #151a26;
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 2rem;
    max-width: 480px;
    width: 90%;
    position: relative;
    color: var(--text-primary);
    line-height: 1.6;
}

.modal-content h2 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.modal-content p {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.modal-close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text-primary);
}

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    header {
        padding: 1rem;
    }

    .hero h1 {
        font-size: 1.3rem;
    }

    .game-title {
        font-size: 1.6rem;
    }

    .signup-form {
        flex-direction: column;
        gap: 0.5rem;
    }

    .signup-form input[type="email"] {
        border-right: 1px solid var(--input-border);
        border-radius: 6px;
    }

    .signup-form button {
        border-radius: 6px;
    }
}
