/* ===== Variables ===== */
:root {
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-card: rgba(30, 30, 50, 0.8);
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.4);
    --success: #10b981;
    --error: #ef4444;
    --border: rgba(255, 255, 255, 0.1);
    --radius: 12px;
    --transition: all 0.3s ease;
}

/* ===== Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    background-image: 
        radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 100% 100%, rgba(139, 92, 246, 0.1) 0%, transparent 40%);
}

/* ===== Container ===== */
.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== Header ===== */
.header {
    text-align: center;
    margin-bottom: 32px;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ===== Form Card ===== */
.form-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* ===== Form Elements ===== */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23a0a0b0' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 6px;
}

.time-hint {
    margin-top: -16px;
    margin-bottom: 24px;
}

.char-count {
    text-align: right;
}

/* ===== Form Row ===== */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-row .form-group {
    margin-bottom: 8px;
}

/* ===== Submit Button ===== */
.submit-btn {
    width: 100%;
    padding: 16px 24px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    color: white;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 8px;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--accent-glow);
}

.submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ===== Status Message ===== */
.status-message {
    margin-top: 20px;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

.status-message.success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid var(--success);
    color: var(--success);
}

.status-message.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--error);
    color: var(--error);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Footer ===== */
.footer {
    margin-top: auto;
    padding-top: 40px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.footer-link {
    margin-top: 4px;
}

.footer-link a {
    color: var(--accent-light);
    text-decoration: none;
    transition: var(--transition);
}

.footer-link a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* ===== Responsive ===== */
@media (max-width: 520px) {
    .container {
        padding: 24px 16px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .form-card {
        padding: 24px 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}