/* Only custom animations/styles not covered by Tailwind */
.loader {
    width: 18px;
    height: 18px;
    border: 2px solid #FFF;
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Custom transitions for success state */
#successCard {
    animation: slideIn 0.5s ease-out;
}

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

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

/* Mobile App Specific Styles */
.glass-panel {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.primary-gradient {
    background: linear-gradient(135deg, #412ec1 0%, #5a4bda 100%);
}

body {
    -webkit-tap-highlight-color: transparent;
}

@media (max-width: 1023px) {
    body {
        min-height: max(884px, 100dvh);
    }
}

/* --- Added Production Styles --- */

/* Standard Phone Validation */
.phone-progress-container {
    height: 3px;
    background: rgba(65, 46, 193, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 6px;
    transition: all 0.3s ease;
}

.phone-progress-bar {
    height: 100%;
    width: 0%;
    background: #412ec1;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.phone-input-valid {
    border: 2px solid #10b981 !important;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1) !important;
}

.phone-input-invalid {
    border: 2px solid #ef4444 !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1) !important;
}

/* Audio Guide Pill */
.audio-guide-pill {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(65, 46, 193, 0.1);
    padding: 4px;
    border-radius: 30px;
    gap: 4px;
    box-shadow: 0 8px 32px rgba(65, 46, 193, 0.08);
}

.audio-guide-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.audio-guide-pill button {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    transition: all 0.2s ease;
    color: #412ec1;
    text-transform: uppercase;
}

.audio-guide-pill .lang-btn.active {
    background: #412ec1;
    color: white;
    box-shadow: 0 4px 12px rgba(65, 46, 193, 0.4);
}

.audio-play-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important;
    background: white;
    color: #412ec1;
    border: 1px solid rgba(65, 46, 193, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.audio-play-btn.playing {
    background: #10b981;
    color: white;
    border: none;
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* ============================================================
   OTP FLOW — STEPPER & STEP TRANSITIONS
   ============================================================ */

/* Stepper Bar */
.otp-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 1.5rem;
}

.otp-stepper .step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    background: #e9eff3;
    color: #787586;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.otp-stepper .step-dot.active {
    background: #412ec1;
    color: #fff;
    box-shadow: 0 4px 16px rgba(65, 46, 193, 0.35);
    transform: scale(1.15);
}

.otp-stepper .step-dot.completed {
    background: #10b981;
    color: #fff;
}

.otp-stepper .step-line {
    flex: 1;
    height: 3px;
    max-width: 60px;
    background: #e9eff3;
    border-radius: 2px;
    transition: background 0.35s ease;
}

.otp-stepper .step-line.completed {
    background: #10b981;
}

/* Step Content Transitions */
.otp-step {
    animation: stepFadeIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* OTP Input */
.otp-code-input {
    font-family: 'Inter', monospace;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: 0.6em;
    text-align: center;
    padding: 0.875rem 1.25rem;
    border-radius: 0.75rem;
    background: #eff4f8;
    border: 2px solid transparent;
    transition: all 0.25s ease;
    width: 100%;
}

.otp-code-input:focus {
    outline: none;
    border-color: #412ec1;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(65, 46, 193, 0.12);
}

/* Phone Display Chip */
.phone-display-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eff4f8;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    color: #412ec1;
}

.phone-display-chip .material-symbols-outlined {
    font-size: 16px;
}

/* Student ID Badge */
.student-id-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
}

.student-id-badge.existing {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.student-id-badge.new-user {
    background: rgba(254, 148, 0, 0.1);
    color: #d97706;
}

/* Resend Cooldown */
.resend-btn {
    font-size: 12px;
    font-weight: 700;
    color: #412ec1;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 0;
    transition: opacity 0.2s;
}

.resend-btn:disabled {
    color: #787586;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Back Button (in-step) */
.step-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 12px;
    font-weight: 700;
    color: #787586;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 0;
    transition: color 0.2s;
}

.step-back-btn:hover {
    color: #412ec1;
}

.step-back-btn .material-symbols-outlined {
    font-size: 16px;
}

/* Phone progress complete state */
.phone-progress-complete {
    background: #10b981 !important;
}