:root {
    --bg: #0a0a0a;
    --surface: rgba(20, 20, 20, 0.82);
    --surface-strong: rgba(20, 20, 20, 0.92);
    --surface2: rgba(32, 32, 32, 0.8);
    --border: rgba(255, 255, 255, 0.12);
    --gold: #1ea7ff;
    --gold-light: #5cc2ff;
    --gold-dim: #0a6ad4;
    --text: #ffffff;
    --text-muted: #b9c9dc;
    --red: #e05f5f;
    --green: #62c28f;
    --radius: 18px;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    background-image: url('../bg.avif');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    isolation: isolate;
}

body::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(0, 0, 00, 0.82), rgba(0, 0, 0, 0.62)), radial-gradient(circle at top, rgba(30, 167, 255, 0.18), transparent 55%);
    z-index: -1;
}

.wrap {
    width: 100%;
    max-width: 560px;
    position: relative;
    z-index: 1;
}

.logo-area {
    text-align: center;
    margin-bottom: 2.75rem;
}

.logo-area h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.9rem, 4.4vw, 2.6rem);
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.02em;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.logo-area p {
    color: var(--text-muted);
    font-size: 0.98rem;
    margin-top: 0.6rem;
    font-weight: 300;
}

.card {
    background: var(--surface);
    border: 1px solid rgba(30, 167, 255, 0.18);
    border-radius: var(--radius);
    padding: 2.2rem 2rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.stars-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.stars-row {
    display: flex;
    gap: 0.55rem;
    margin-bottom: 0.6rem;
}

.stars-row label {
    cursor: pointer;
    font-size: 2.1rem;
    color: rgba(255, 255, 255, 0.22);
    transition: color 0.18s ease, transform 0.18s ease;
    user-select: none;
    line-height: 1;
}

.stars-row label:hover, .stars-row label:focus, .stars-row label.active {
    color: #ffd700;
    transform: translateY(-2px) scale(1.1);
    text-shadow: 0 6px 18px rgba(255, 215, 0, 0.45);
}

.stars-row input {
    display: none;
}

.star-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    min-height: 1.2em;
    transition: color 0.2s;
}

.star-hint.filled {
    color: var(--gold-light);
}

/* Input */
.field {
    margin-top: 1.5rem;
}

.field label {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.55rem;
}

.field input, .field textarea {
    width: 100%;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-family: 'Poppins', sans-serif;
    font-size: 0.98rem;
    padding: 0.85rem 1.1rem;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    resize: vertical;
}

.field input::placeholder, .field textarea::placeholder {
    color: var(--text-muted);
}

.field input:focus, .field textarea:focus {
    outline: none;
    border-color: var(--gold-dim);
    box-shadow: 0 0 0 3px rgba(30, 167, 255, 0.25);
    background: rgba(32, 32, 32, 0.92);
}

.field textarea {
    min-height: 100px;
}

.btn-submit {
    width: 100%;
    margin-top: 1.9rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--gold), var(--gold-dim));
    color: #081018;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.12em;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4);
    text-transform: uppercase;
}

.btn-submit:hover {
    opacity: 0.95;
    transform: translateY(-2px);
    box-shadow: 0 20px 36px rgba(0, 0, 0, 0.45);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s;
}

.modal-overlay.show {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: var(--surface-strong);
    border: 1px solid rgba(30, 167, 255, 0.22);
    border-radius: 22px;
    padding: 2.6rem 2.2rem;
    text-align: center;
    max-width: 400px;
    width: 100%;
    transform: translateY(24px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(30, 167, 255, 0.25);
    backdrop-filter: blur(14px);
}

.modal-overlay.show .modal {
    transform: translateY(0) scale(1);
}

.modal h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.6rem;
}

.modal p {
    color: var(--text-muted);
    font-size: 0.97rem;
    line-height: 1.65;
    margin-bottom: 1.6rem;
}

.modal-btns {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-google {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.9rem;
    background: #fff;
    color: #202124;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: none;
    transition: box-shadow 0.15s, transform 0.08s;
    letter-spacing: 0.04em;
    text-transform: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.btn-google:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.12);
}

.btn-google svg {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    display: block;
}

.btn-close {
    padding: 0.8rem;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 12px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    transition: border-color 0.2s, color 0.2s;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.btn-close:hover {
    border-color: var(--text-muted);
    color: var(--text);
}

.error-msg {
    color: var(--red);
    font-size: 0.86rem;
    margin-top: 0.9rem;
    text-align: center;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 0, 0, 0.3);
    border-top-color: #1a1510;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

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

.card {
    animation: fadeUp 0.5s ease both;
}

.card:nth-child(1) {
    animation-delay: 0.05s;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 640px) {
    body {
        padding: 2.5rem 1rem;
    }
    .card {
        padding: 1.9rem 1.6rem;
    }
}
