:root {
    --primary: #f43f5e;
    --primary-hover: #e11d48;
    --primary-light: #fff1f2;
    --secondary: #ec4899;
    --surface: #ffffff;
    --on-surface: #4c0519;
    --on-surface-variant: #9f1239;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow: 0 10px 25px -5px rgba(244, 63, 94, 0.1), 0 8px 10px -6px rgba(244, 63, 94, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(244, 63, 94, 0.15), 0 8px 10px -6px rgba(244, 63, 94, 0.15);
    --radius-lg: 2.5rem;
    --radius-md: 1.5rem;
    --transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme='dark'] {
    --primary: #fb7185;
    --primary-hover: #f43f5e;
    --primary-light: #4c0519;
    --secondary: #f472b6;
    --surface: #0f172a; /* Deep Slate */
    --on-surface: #f1f5f9;
    --on-surface-variant: #cbd5e1;
    --glass-bg: rgba(15, 23, 42, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
}

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

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

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

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: clamp(2rem, 10vh, 6rem) 1rem;
    position: relative;
    background: var(--surface);
    background-image: 
        radial-gradient(circle at 10% 10%, rgba(253, 164, 175, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 10%, rgba(244, 63, 94, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 50% 90%, rgba(236, 72, 153, 0.15) 0%, transparent 50%);
    animation: backgroundShift 15s ease-in-out infinite alternate;
}

[data-theme='dark'] .app-container {
    background: #020617; /* Darker Slate */
    background-image: 
        radial-gradient(circle at 10% 10%, rgba(244, 63, 94, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 90% 10%, rgba(236, 72, 153, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 50% 90%, rgba(15, 23, 42, 0.8) 0%, transparent 50%);
}

@keyframes backgroundShift {
    0% { background-position: 0% 0%; }
    100% { background-position: 10% 10%; }
}

.bg-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(244, 63, 94, 0.15), transparent 70%);
    filter: blur(80px);
    pointer-events: none;
    z-index: 2;
}

.app-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://www.transparenttextures.com/patterns/pinstriped-suit.pattern');
    opacity: 0.05;
    pointer-events: none;
    z-index: 1;
}

[data-theme='dark'] .app-container::after {
    opacity: 0.02;
    filter: invert(1);
}

/* Content Wrapper */
.content-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 520px;
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: 4rem;
}

.hero-title {
    font-size: clamp(2.25rem, 8vw, 3.5rem);
    line-height: 1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.hero-subtitle {
    color: var(--on-surface-variant);
    font-size: clamp(1rem, 3vw, 1.25rem);
    font-weight: 600;
    opacity: 0.8;
}

/* Form Card (Hyper-Glassmorphism) */
.form-card {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), inset 0 0 40px rgba(255, 255, 255, 0.5);
    padding: clamp(1.5rem, 6vw, 3rem);
    position: relative;
    margin-bottom: 3rem;
    transition: transform 0.3s ease;
}

.form-card:hover {
    transform: translateY(-5px);
}

/* Progress Bar */
.progress-bar {
    position: relative;
    margin-bottom: 4rem;
    height: 6px;
    background: rgba(244, 63, 94, 0.1);
    border-radius: 999px;
}

.progress-line {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    border-radius: 999px;
    transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 15px rgba(244, 63, 94, 0.4);
}

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

.node {
    width: 36px;
    height: 36px;
    background: white;
    color: var(--on-surface-variant);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    border: 2px solid rgba(244, 63, 94, 0.1);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow);
}

.node.active {
    background: var(--primary);
    color: white;
    transform: scale(1.25);
    border: 4px solid white;
    box-shadow: 0 10px 20px rgba(244, 63, 94, 0.3);
}

/* Step Layouts */
.step-container {
    display: none;
    animation: fadeInSlide 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

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

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

.step-header h2 {
    font-size: clamp(1.5rem, 5vw, 2rem);
    margin-bottom: 0.75rem;
    color: var(--on-surface);
}

.step-header p {
    color: var(--on-surface-variant);
    font-weight: 500;
}

.welcome-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #fff1f2, #ffe4e6);
    border-radius: 35% 65% 70% 30% / 30% 30% 70% 70%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    color: var(--primary);
    box-shadow: inset 0 0 20px rgba(244, 63, 94, 0.1);
    animation: blob 8s infinite alternate;
}

@keyframes blob {
    0% { border-radius: 35% 65% 70% 30% / 30% 30% 70% 70%; }
    100% { border-radius: 65% 35% 30% 70% / 70% 70% 30% 30%; }
}

.welcome-icon .material-symbols-outlined {
    font-size: 3.5rem;
    font-variation-settings: 'FILL' 1;
}

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

.input-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
}

input {
    width: 100%;
    padding: 1.25rem 1.25rem 1.25rem 3.5rem;
    border: 2px solid rgba(244, 63, 94, 0.1);
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-md);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--on-surface);
    transition: all 0.3s;
    outline: none;
}

input:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.1);
}

#otpValue {
    padding: 1.25rem;
    text-align: center;
    font-size: 2.5rem;
    letter-spacing: 0.75rem;
    font-family: 'Outfit', sans-serif;
}

.primary-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    font-size: 1.125rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 20px -5px rgba(244, 63, 94, 0.4);
}

.primary-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 20px 30px -10px rgba(244, 63, 94, 0.5);
}

.primary-btn:active {
    transform: translateY(0) scale(0.98);
}

.text-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 1.5rem;
    transition: opacity 0.2s;
}

.text-btn:hover {
    opacity: 0.7;
}

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

.success-animation .material-symbols-outlined {
    font-size: 6rem;
    font-variation-settings: 'FILL' 1;
    filter: drop-shadow(0 10px 20px rgba(244, 63, 94, 0.3));
}

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

.trust-item {
    padding: 0.75rem 1.25rem;
    background: var(--glass-bg);
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--on-surface-variant);
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--glass-border);
}

.trust-item .material-symbols-outlined {
    color: var(--primary);
    font-size: 1.25rem;
}

/* Toast */
.toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: white;
    color: var(--on-surface);
    padding: 1.25rem 2.5rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    z-index: 1000;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    border-left: 5px solid var(--primary);
}

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

/* Loader */
.loader {
    width: 24px;
    height: 24px;
    border: 4px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

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

@media (max-width: 640px) {
    .app-container { padding: 2rem 1rem; }
    .hero-title { font-size: 2.75rem; }
    .form-card { padding: 1.5rem; border-radius: 2rem; }
    .node { width: 32px; height: 32px; font-size: 0.8rem; }
    .trust-item { font-size: 0.85rem; padding: 0.5rem 1rem; }
}

/* Theme Toggle Styles */
.theme-toggle {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    backdrop-filter: blur(10px);
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    z-index: 100;
}

.theme-toggle:hover {
    transform: rotate(15deg) scale(1.1);
    background: white;
}

[data-theme='dark'] .theme-toggle:hover {
    background: var(--surface);
}

.sun-icon { display: block; }
.moon-icon { display: none; }

[data-theme='dark'] .sun-icon { display: none; }
[data-theme='dark'] .moon-icon { display: block; }

.theme-toggle .material-symbols-outlined {
    font-size: 24px;
    font-variation-settings: 'FILL' 0;
}

/* Dark Mode Input Fixes */
[data-theme='dark'] input {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(255, 255, 255, 0.05);
}

[data-theme='dark'] input:focus {
    background: rgba(30, 41, 59, 0.8);
}
