/* Custom Glassmorphism */
.glass-card {
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.02),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* OTP Input Specific Styling */
.otp-input {
    caret-color: #f97316;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.otp-input:focus {
    transform: translateY(-2px);
    background: rgba(30, 41, 59, 0.6);
    box-shadow: 
        0 0 0 4px rgba(249, 115, 22, 0.1),
        0 10px 25px -5px rgba(249, 115, 22, 0.2);
}

.otp-input.filled {
    border-color: rgba(249, 115, 22, 0.5);
    background: rgba(249, 115, 22, 0.05);
    color: #facc15;
    text-shadow: 0 0 10px rgba(250, 204, 21, 0.3);
}

/* Hide number spinners */
.otp-input::-webkit-outer-spin-button,
.otp-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.otp-input[type=number] {
    -moz-appearance: textfield;
}

/* View Transitions */
.view-section {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.view-section.hidden {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

.view-section:not(.hidden) {
    opacity: 1;
    transform: translateY(0);
    animation: fade-in 0.5s ease-out;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #020617;
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #f97316;
}

/* Selection Color */
::selection {
    background: rgba(249, 115, 22, 0.3);
    color: #ffedd5;
}

/* Background Gradient Animation */
@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.animated-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 15s ease infinite;
}

/* Input Autofill Styling */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus {
    -webkit-text-fill-color: #facc15;
    -webkit-box-shadow: 0 0 0px 1000px #0f172a inset;
    transition: background-color 5000s ease-in-out 0s;
    border-color: #f97316;
}

/* Loading State */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(249, 115, 22, 0.3);
    border-top-color: #f97316;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Mobile Optimizations */
@media (max-width: 640px) {
    .glass-card {
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }
    
    .otp-input {
        width: 3rem;
        height: 3.5rem;
        font-size: 1.25rem;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}