/* OTP Verification Page - Modern Gold/Orange Theme */
.otp-verification-page {
    min-height: 10vh;
    background: linear-gradient(135deg, #f5f5f500 0%, #e8e8e800 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.otp-container {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Add subtle gradient border effect */
.otp-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FFD700, #FFA500);
}

/* Header Section */
.otp-header {
    margin-bottom: 40px;
}

.otp-icon-wrapper {
    position: relative;
    margin: 0 auto 30px;
    width: 80px;
    height: 80px;
}

.otp-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 8px 24px rgba(255, 165, 0, 0.3);
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.otp-icon i {
    font-size: 36px;
    color: #ffffff;
}

/* Email icon using CSS */
.otp-icon::before {
    content: '';
    position: absolute;
    width: 40px;
    height: 28px;
    background: transparent;
    border: 3px solid #ffffff;
    border-radius: 4px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.otp-icon::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 14px solid #ffffff;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -65%);
}

.otp-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px;
    line-height: 1.2;
}

.otp-subtitle {
    font-size: 16px;
    color: #666666;
    margin: 0;
    font-weight: 400;
    line-height: 1.5;
}

.otp-email-display {
    color: #333333;
    font-weight: 600;
}

/* OTP Form */
.otp-form {
    width: 100%;
}

.otp-input-section {
    margin-bottom: 30px;
}

.otp-inputs-wrapper {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.otp-input {
    width: 65px;
    height: 65px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    background: #fafafa;
    transition: all 0.3s ease;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: textfield;
}

.otp-input::-webkit-inner-spin-button,
.otp-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.otp-input::placeholder {
    color: #cccccc;
    font-weight: 400;
}

.otp-input:focus {
    border-color: #FFA500;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255, 165, 0, 0.1);
    transform: scale(1.05);
}

.otp-input.filled {
    border-color: #FFD700;
    background: #fffaf0;
}

.otp-input.success {
    border-color: #4CAF50;
    background: #f1f8f4;
    animation: successPulse 0.6s ease-in-out;
}

.otp-input.error {
    border-color: #f44336;
    background: #ffebee;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes successPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(76, 175, 80, 0.1);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

.otp-input-line {
    display: none; /* Remove the decorative line */
}

.otp-error-message {
    min-height: 24px;
    font-size: 14px;
    font-weight: 500;
    color: #f44336;
    margin-top: 12px;
    transition: all 0.3s ease;
}

.otp-error-message:empty {
    display: none;
}

/* Action Buttons */
.otp-actions {
    margin-bottom: 24px;
}

.otp-verify-button {
    width: 100%;
    max-width: 280px;
    height: 50px;
    background: #e0e0e0;
    color: #999999;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: not-allowed;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: none;
}

.otp-verify-button.active {
    background: linear-gradient(90deg, #FFD700, #FFA500);
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 165, 0, 0.3);
}

.otp-verify-button.active:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 165, 0, 0.4);
}

.otp-verify-button:active {
    transform: translateY(0);
}

.otp-verify-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.otp-verify-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.otp-verify-button.active:hover::before {
    width: 300px;
    height: 300px;
}

.button-text {
    position: relative;
    z-index: 1;
}

.button-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform-origin: center center;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Resend Section */
.otp-resend-section {
    margin-bottom: 0;
}

.resend-question {
    font-size: 14px;
    color: #666666;
    margin: 0;
}

.resend-button {
    background: none;
    color: #FFA500;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    margin-left: 4px;
    text-decoration: none;
    position: relative;
}

.resend-button::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #FFA500;
    transition: width 0.3s ease;
}

.resend-button:not(:disabled):hover {
    color: #FFA500;
    text-decoration: none;
}

.resend-button:not(:disabled):hover::after {
    width: 100%;
}

.resend-button:disabled {
    color: #cccccc;
    cursor: not-allowed;
}

.resend-countdown {
    color: #999999;
    font-weight: 500;
}

/* Resend Modal */
.resend-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.resend-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.resend-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    padding: 40px 30px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease-out;
}

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

.resend-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    background: #f5f5f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 20px;
    color: #666666;
    line-height: 1;
}

.resend-modal-close:hover {
    background: #e8e8e8;
    color: #333333;
}

.resend-modal-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 8px 24px rgba(255, 165, 0, 0.3);
}

.resend-modal-icon i {
    font-size: 28px;
    color: #ffffff;
}

.resend-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 16px;
}

.resend-modal-text {
    font-size: 16px;
    color: #666666;
    margin: 0 0 32px;
    line-height: 1.5;
}

.resend-modal-email {
    font-weight: 600;
    color: #333333;
}

.resend-modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.resend-modal-btn {
    padding: 12px 28px;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    min-width: 120px;
}

.resend-modal-btn-primary {
    background: linear-gradient(90deg, #FFD700, #FFA500);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(255, 165, 0, 0.3);
}

.resend-modal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 165, 0, 0.4);
}

.resend-modal-btn-secondary {
    background: #f5f5f5;
    color: #666666;
    border: 2px solid #e0e0e0;
}

.resend-modal-btn-secondary:hover {
    background: #e8e8e8;
    border-color: #cccccc;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .otp-verification-page {
        padding: 16px;
    }
    
    .otp-container {
        padding: 30px 20px;
        border-radius: 16px;
    }
    
    .otp-icon-wrapper {
        width: 70px;
        height: 70px;
        margin-bottom: 24px;
    }
    
    .otp-icon {
        width: 70px;
        height: 70px;
        border-radius: 18px;
    }
    
    .otp-icon::before {
        width: 35px;
        height: 24px;
    }
    
    .otp-icon::after {
        border-left-width: 17.5px;
        border-right-width: 17.5px;
        border-top-width: 12px;
    }
    
    .otp-title {
        font-size: 24px;
        margin-bottom: 10px;
    }
    
    .otp-subtitle {
        font-size: 15px;
    }
    
    .otp-inputs-wrapper {
        gap: 10px;
    }
    
    .otp-input {
        width: 55px;
        height: 55px;
        font-size: 20px;
        border-radius: 10px;
    }
    
    .otp-verify-button {
        height: 48px;
        font-size: 15px;
        max-width: 100%;
    }
    
    .resend-modal-content {
        padding: 30px 20px;
        border-radius: 16px;
    }
    
    .resend-modal-icon {
        width: 56px;
        height: 56px;
        border-radius: 14px;
    }
    
    .resend-modal-icon i {
        font-size: 24px;
    }
    
    .resend-modal-title {
        font-size: 20px;
    }
    
    .resend-modal-text {
        font-size: 15px;
    }
    
    .resend-modal-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .resend-modal-btn {
        width: 100%;
        padding: 14px 24px;
    }
}

@media (max-width: 480px) {
    .otp-container {
        padding: 24px 16px;
    }
    
    .otp-icon-wrapper {
        width: 60px;
        height: 60px;
        margin-bottom: 20px;
    }
    
    .otp-icon {
        width: 60px;
        height: 60px;
        border-radius: 16px;
    }
    
    .otp-icon::before {
        width: 30px;
        height: 20px;
    }
    
    .otp-icon::after {
        border-left-width: 15px;
        border-right-width: 15px;
        border-top-width: 10px;
    }
    
    .otp-title {
        font-size: 22px;
    }
    
    .otp-subtitle {
        font-size: 14px;
    }
    
    .otp-inputs-wrapper {
        gap: 8px;
    }
    
    .otp-input {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }
    
    .otp-verify-button {
        height: 46px;
        font-size: 14px;
    }
}

@media (max-width: 360px) {
    .otp-inputs-wrapper {
        gap: 6px;
    }
    
    .otp-input {
        width: 45px;
        height: 45px;
        font-size: 16px;
        border-radius: 8px;
    }
}

/* Additional enhancements for better UX */
.otp-container.loaded {
    animation: fadeInUp 0.5s ease-out;
}

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

/* Focus visible for accessibility */
.otp-input:focus-visible,
.otp-verify-button:focus-visible,
.resend-button:focus-visible {
    outline: 2px solid #FFA500;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .otp-input {
        border-width: 3px;
    }
    
    .otp-verify-button {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}