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

:root {
    --bg: #050506;
    --surface: #111827;
    --surface-light: #1f2937;
    --accent: #00A7E1;
    --accent-glow: rgba(0, 167, 225, 0.35);
    --accent-soft: rgba(0, 167, 225, 0.15);
    --text: #eaeaea;
    --text-dim: #9ca3af;
    --success: #10b981;
    --error: #ef4444;
    --radius: 16px;
    --radius-sm: 12px;
}

html,
body {
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-tap-highlight-color: transparent;
}

/* ─── Layout ─── */
.app {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    max-width: 480px;
    margin: 0 auto;
    padding: 0 1.2rem;
}

/* ─── Header ─── */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 0 0.6rem;
    flex-shrink: 0;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), #007bb5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.icon-btn {
    font-size: 1.4rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.icon-btn:hover {
    background: var(--surface-light);
}

/* ─── Main ─── */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem 0 2rem;
}

/* ─── Intro ─── */
.intro {
    text-align: center;
    padding: 1.5rem 1rem;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
    animation: fadeIn 0.5s ease-out;
}

.intro-icon {
    display: block;
    font-size: 2.5rem;
    margin-bottom: 0.6rem;
    filter: drop-shadow(0 4px 12px rgba(0, 167, 225, 0.3));
}

.intro p {
    font-size: 0.95rem;
    color: var(--text-dim);
    line-height: 1.6;
}

.intro strong {
    color: var(--text);
}

/* ─── Form ─── */
form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    animation: fadeIn 0.6s ease-out 0.1s backwards;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
}

.optional {
    font-weight: 400;
    color: var(--text-dim);
    font-size: 0.75rem;
}

.required {
    color: var(--accent);
    font-weight: 700;
}

input,
textarea {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: var(--text);
    transition: border-color 0.25s, box-shadow 0.25s;
    outline: none;
    width: 100%;
    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    color: var(--text-dim);
    opacity: 0.6;
}

input:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

input.invalid,
textarea.invalid {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

textarea {
    min-height: 120px;
}

/* ─── Submit Button ─── */
.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--accent), #007bb5);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
    box-shadow: 0 4px 15px var(--accent-glow);
    margin-top: 0.4rem;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--accent-glow);
}

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

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

/* Spinner */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* ─── Status Message ─── */
.status-message {
    text-align: center;
    padding: 1rem 1.2rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    animation: fadeIn 0.4s ease-out;
}

.status-message.success {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.status-message.error {
    background: rgba(239, 68, 68, 0.12);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

/* ─── Footer ─── */
footer {
    flex-shrink: 0;
    padding: 1rem 0 1.5rem;
}

.app-footer {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-dim);
    line-height: 1.5;
}

.app-footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

/* ─── Animations ─── */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}