:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    --secondary: #10b981;
    --surface: #f8fafc;
    --on-surface: #0f172a;
    --on-surface-variant: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --radius-lg: 1.5rem;
    --radius-md: 1rem;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--surface);
    color: var(--on-surface);
    line-height: 1.5;
    overflow-x: hidden;
}

h1, h2, h3, .logo-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: clamp(1rem, 5vh, 4rem) 1rem;
    background: radial-gradient(circle at top right, #e0e7ff 0%, transparent 40%),
                radial-gradient(circle at bottom left, #f1f5f9 0%, transparent 40%);
}


/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 600px;
}

.hero-title {
    font-size: clamp(2rem, 8vw, 3rem);
    line-height: 1.1;
    margin-bottom: 1rem;
    padding: 0 0.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    color: var(--on-surface-variant);
    font-size: clamp(0.95rem, 3vw, 1.125rem);
    font-weight: 500;
    padding: 0 1rem;
}

/* Form Card (Glassmorphism) */
.form-card {
    width: 100%;
    max-width: 480px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: clamp(1.25rem, 5vw, 2.5rem);
    position: relative;
    z-index: 10;
    margin: 0 auto;
}

/* Progress Bar */
.progress-bar {
    position: relative;
    margin-bottom: 3rem;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
}

.progress-line {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--primary);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-nodes {
    display: flex;
    justify-content: space-between;
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
}

.node {
    width: clamp(28px, 6vw, 32px);
    height: clamp(28px, 6vw, 32px);
    background: #e2e8f0;
    color: var(--on-surface-variant);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    border: 3px solid var(--surface);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.node.active {
    background: var(--primary);
    color: white;
    transform: scale(1.15);
}

/* Step Layouts */
.step-container {
    display: none;
    animation: slideIn 0.4s ease-out;
}

.step-container.active {
    display: block;
}

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

.step-header {
    margin-bottom: 2rem;
}

.step-header h2 {
    font-size: clamp(1.4rem, 5vw, 1.75rem);
    margin-bottom: 0.5rem;
}

.step-header p {
    color: var(--on-surface-variant);
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.bold-phone {
    color: var(--on-surface);
    font-weight: 700;
}

/* Inputs & Buttons */
.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--on-surface-variant);
}

input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    transition: border-color 0.2s;
    outline: none;
}

input:focus {
    border-color: var(--primary);
}

#otpValue {
    padding: 1rem;
    text-align: center;
    font-size: 2rem;
    letter-spacing: 0.5rem;
    font-family: 'Outfit', sans-serif;
}

.primary-btn {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 1.25rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
}

.primary-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3);
}

.primary-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
    filter: brightness(0.95);
}

.primary-btn.success {
    background: var(--secondary);
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.2);
}

.text-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 700;
    cursor: pointer;
    margin-top: 1rem;
}

.step-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Success State Specifics */
.success-animation {
    color: var(--secondary);
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.success-animation .material-symbols-outlined {
    font-size: 5rem;
    font-variation-settings: 'FILL' 1;
}

.link-display {
    background: var(--primary-light);
    border: 2px dashed var(--primary);
    padding: 1rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

code {
    font-weight: 700;
    color: var(--primary);
    font-size: 1rem;
    word-break: break-all;
}

.icon-btn {
    background: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--primary);
    box-shadow: var(--shadow);
}

.redirect-timer {
    font-weight: 600;
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--on-surface-variant);
}

.secondary-btn {
    width: 100%;
    background: white;
    color: var(--on-surface);
    border: 2px solid #e2e8f0;
    padding: 1rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Trust Footer */
.trust-footer {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 4rem;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--on-surface-variant);
    font-weight: 600;
    font-size: 0.875rem;
}

.trust-item .material-symbols-outlined {
    color: var(--secondary);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1e293b;
    color: white;
    padding: 1rem 2rem;
    border-radius: 999px;
    font-weight: 600;
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* Loader */
.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

@media (max-width: 640px) {
    .app-container { padding: 1.5rem 0.75rem; }
    .hero-section { margin-bottom: 2rem; }
    .form-card { border-radius: 1.25rem; }
    .trust-footer { gap: 1.25rem; margin-top: 3rem; }
    .trust-item { font-size: 0.8rem; }
}

@media (max-width: 380px) {
    .form-card { padding: 1rem; }
    .step-header h2 { font-size: 1.25rem; }
    #otpValue { font-size: 1.75rem; letter-spacing: 0.3rem; }
}
