@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

body {
    font-family: 'Inter', -apple-system, sans-serif;
    height: 100vh;
    overflow: hidden;
    background: #f0f0ec;
    color: #0a0a0a;
    transition: background 3s ease, color 3s ease;
    cursor: default;
}

body.dark {
    background: #0a0a0a;
    color: #f0f0f0;
}

/* ── FLOATING SQUARES ────────── */
.square {
    position: absolute;
    width: clamp(70px, 12vmin, 120px);
    height: clamp(70px, 12vmin, 120px);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    background: #0a0a0a;
    color: #f0f0ec;
    transition: background 3s ease, color 3s ease;
    user-select: none;
    z-index: 10;
    will-change: left, top, transform;
}

body.dark .square {
    background: #f0f0f0;
    color: #0a0a0a;
}

/* ── RADIO STATUS ───────────── */
.radio-status {
    position: fixed;
    top: 2rem;
    left: 2.5rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    z-index: 20;
    opacity: 0.4;
    transition: opacity 0.5s ease;
}

.radio-status:hover {
    opacity: 1;
}

.radio-status.playing {
    opacity: 0.6;
}

.radio-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.4;
    transition: opacity 0.3s;
}

.radio-status.playing .radio-dot {
    background: #e03030;
    opacity: 1;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.radio-label {
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 400;
}

/* ── LINKS ───────────────────── */
.bottom-links {
    position: fixed;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 2rem;
    z-index: 5;
}

.bottom-links a {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    color: inherit;
    opacity: 0.3;
    transition: opacity 0.3s;
}

.bottom-links a:hover { opacity: 1; }

/* ── MODAL ───────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal-overlay.open { opacity: 1; visibility: visible; }

.modal-content {
    width: 100%;
    max-width: 520px;
    padding: 5rem 2rem 4rem;
    transform: translateY(30px);
    transition: transform 0.4s ease;
    color: #f0f0f0;
}

.modal-overlay.open .modal-content { transform: translateY(0); }

.modal-close {
    position: fixed;
    top: 1.5rem;
    right: 3rem;
    z-index: 310;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    background: none;
    border: none;
    color: #f0f0f0;
    font-family: inherit;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
}

.modal-close.show { opacity: 0.5; visibility: visible; }
.modal-close:hover { opacity: 1; }

.modal-header { margin-bottom: 2.5rem; }
.modal-header h2 { font-size: 1.6rem; font-weight: 300; margin-bottom: 0.8rem; }
.modal-header p { font-size: 0.8rem; opacity: 0.5; line-height: 1.7; }

/* ── FORM ────────────────────── */
.form-group { margin-bottom: 1.6rem; }

.form-group label {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.5;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    color: #f0f0f0;
    font-family: inherit;
    font-size: 0.9rem;
    transition: border-color 0.3s;
    outline: none;
    border-radius: 0;
}

.form-group input:focus,
.form-group textarea:focus { border-bottom-color: rgba(255,255,255,0.6); }

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

.form-group input::placeholder,
.form-group textarea::placeholder { color: #f0f0f0; opacity: 0.25; }

.form-group .hint { font-size: 0.65rem; opacity: 0.3; margin-top: 0.3rem; }

.optional { opacity: 0.3; font-weight: 400; }

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: #f0f0f0;
    color: #0a0a0a;
    border: none;
    border-radius: 0;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity 0.3s;
    margin-top: 2rem;
}

.submit-btn:hover { opacity: 0.8; }

.consent { font-size: 0.65rem; opacity: 0.25; line-height: 1.6; margin-top: 1.5rem; }

.success-message { display: none; text-align: center; padding: 4rem 0; }
.success-message.show { display: block; }
.success-message h3 { font-size: 1.4rem; font-weight: 300; margin-bottom: 0.8rem; }
.success-message p { opacity: 0.5; font-size: 0.8rem; }

body.modal-open .square {
    background: #f0f0f0 !important;
    color: #0a0a0a !important;
    transition: background 0.5s ease, color 0.5s ease;
}

/* ── MOBILE ─────────────────── */
@media (max-width: 640px) {
    body {
        height: 100dvh;
        -webkit-tap-highlight-color: transparent;
    }

    .square {
        width: 55px;
        height: 55px;
    }

    .radio-status {
        top: 1.2rem;
        left: 1.5rem;
    }

    .bottom-links {
        gap: 1.2rem;
        bottom: 1.5rem;
    }

    .bottom-links a {
        font-size: 0.6rem;
    }

    .modal-close {
        right: 1.5rem;
        top: 1.2rem;
        padding: 0.5rem;
    }

    .modal-content {
        padding: 3.5rem 1.5rem 2.5rem;
    }

    .modal-header h2 { font-size: 1.3rem; }
    .modal-header p { font-size: 0.75rem; }

    .form-group input,
    .form-group textarea {
        font-size: 16px;
        -webkit-appearance: none;
    }

    .submit-btn {
        -webkit-appearance: none;
    }
}
