/* Base Variables */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --background: #f8fafc;
    --surface: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --success: #10b981;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --font-family: 'Outfit', system-ui, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--background);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* Container */
.app-container {
    background: var(--surface);
    width: 100%;
    max-width: 500px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 32px;
    position: relative;
    overflow: hidden;
}

/* Typography */
h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--text-main);
}

.subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    margin-top: -1rem;
}

/* Progress Bar */
.progress-container {
    height: 6px;
    background: var(--border);
    border-radius: 99px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.4s ease;
}

/* Steps */
.step {
    display: none;
    animation: fadeSlideIn 0.4s ease forwards;
}

.step.active {
    display: block;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Option Cards (Grid) */
.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.options-grid.col-3 {
    grid-template-columns: repeat(2, 1fr);
    /* Mobile default */
}

@media (min-width: 400px) {
    .options-grid.col-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

.option-card {
    cursor: pointer;
    position: relative;
}

.option-card input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.2s ease;
    background: var(--surface);
    height: 100%;
}

.option-card:hover .card-content {
    border-color: var(--primary);
    background: #eff6ff;
}

.option-card input:checked+.card-content {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    transform: translateY(-2px);
}

.option-card input:checked+.card-content .icon {
    transform: scale(1.1);
}

.icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.label {
    font-weight: 500;
    text-align: center;
}

/* Inputs */
.input-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-muted);
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-family);
    transition: border-color 0.2s;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Buttons */
.controls {
    display: flex;
    gap: 12px;
    margin-top: 2rem;
}

.btn {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-family);
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-primary:disabled,
.btn-primary.disabled {
    background: var(--primary) !important;
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text-muted);
}

.btn-secondary:hover {
    background: #f1f5f9;
    color: var(--text-main);
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Code Inputs */
.code-inputs {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.code-digit {
    width: 48px !important;
    height: 56px;
    text-align: center;
    font-size: 1.5rem !important;
    padding: 0 !important;
}

.resend-link {
    text-align: center;
    color: var(--primary);
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: underline;
    margin-top: 1rem;
}

/* Success Step */
.success-message {
    text-align: center;
    padding: 2rem 0;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* Smooth auto-fill bg removal hack */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
}