@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

:root {
    --primary: #00ff88;
    --secondary: #00d4ff;
    --danger: #ff0066;
    --warning: #ffaa00;
    --success: #00ff88;
    --dark: #0a0e27;
    --darker: #050714;
    --light: #ffffff;
    --gray: #8892b0;
    --purple: #9c88ff;
}

body {
    font-family: 'Kanit', 'Inter', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #0a0e27 0%, #050714 100%);
    color: var(--light);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Cyber Grid Background */
.cyber-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 255, 136, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 136, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Floating particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--primary);
    border-radius: 50%;
    animation: float 15s linear infinite;
    opacity: 0.6;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}
/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    background: linear-gradient(135deg, #00C851 0%, #007E33 100%);
}

.toast-error {
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
}

.toast-info {
    background: linear-gradient(135deg, #33b5e5 0%, #0099cc 100%);
}

.toast-warning {
    background: linear-gradient(135deg, #ffbb33 0%, #ff8800 100%);
}
/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    z-index: 1000;
    border-bottom: 2px solid var(--primary);
    box-shadow: 0 4px 30px rgba(0, 255, 136, 0.3);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--light);
    text-decoration: none;
    position: relative;
    transition: all 0.3s;
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

.nav-link:hover {
    color: var(--primary);
    background: rgba(0, 255, 136, 0.1);
    transform: translateY(-2px);
}

/* Forgot Password Container */
.forgot-password-container {
    background: rgba(10, 14, 39, 0.95);
    border: 2px solid var(--primary);
    border-radius: 20px;
    padding: 3rem;
    width: 90%;
    max-width: 500px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(15px);
    box-shadow: 0 20px 60px rgba(0, 255, 136, 0.3);
    z-index: 100;
    animation: slideIn 0.6s ease-out;
}

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

.forgot-password-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(0, 255, 136, 0.1), transparent);
    animation: shimmer 3s linear infinite;
    z-index: -1;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* Step Container */
.step-container {
    animation: fadeIn 0.4s ease-out;
}

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

/* Header */
.forgot-password-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2), rgba(0, 212, 255, 0.1));
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s ease-in-out infinite;
}

.icon-wrapper svg {
    color: var(--primary);
}

.icon-wrapper.success {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.3), rgba(0, 255, 136, 0.1));
    animation: successPulse 0.6s ease-out;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 255, 136, 0.6);
    }
}

@keyframes successPulse {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.forgot-password-title {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.forgot-password-subtitle {
    color: var(--gray);
    font-size: 1rem;
    line-height: 1.6;
}

.highlight-email {
    color: var(--primary);
    font-weight: 600;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--light);
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 255, 136, 0.1);
    border: 2px solid rgba(0, 255, 136, 0.3);
    border-radius: 10px;
    color: var(--light);
    font-size: 1rem;
    transition: all 0.3s;
    outline: none;
}

.form-input:focus {
    border-color: var(--primary);
    background: rgba(0, 255, 136, 0.15);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.form-input::placeholder {
    color: var(--gray);
}

.input-hint {
    font-size: 0.85rem;
    color: var(--gray);
    margin-top: 0.5rem;
}

/* OTP Input */
.otp-input-container {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    margin: 1rem 0;
}

.otp-input {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    background: rgba(0, 255, 136, 0.1);
    border: 2px solid rgba(0, 255, 136, 0.3);
    border-radius: 10px;
    color: var(--light);
    transition: all 0.3s;
    outline: none;
}

.otp-input:focus {
    border-color: var(--primary);
    background: rgba(0, 255, 136, 0.15);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
    transform: scale(1.05);
}

.otp-input.filled {
    border-color: var(--success);
    background: rgba(0, 255, 136, 0.2);
}

.otp-input.error {
    border-color: var(--danger);
    background: rgba(255, 0, 102, 0.1);
    animation: shake 0.5s;
}

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

/* Timer */
.timer-container {
    text-align: center;
    margin: 1.5rem 0;
}

.timer-text {
    color: var(--gray);
    font-size: 0.9rem;
}

.timer-text span {
    color: var(--warning);
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper .form-input {
    padding-right: 3rem;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.toggle-password:hover {
    transform: scale(1.1);
}

.eye-icon {
    color: var(--gray);
    transition: all 0.3s;
}

.toggle-password:hover .eye-icon {
    color: var(--primary);
}

/* Password Strength */
.password-strength {
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.strength-indicator {
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 0.3rem;
}

.strength-bar {
    height: 100%;
    width: 0%;
    transition: all 0.3s;
    border-radius: 2px;
}

.strength-weak {
    width: 33%;
    background: var(--danger);
}

.strength-medium {
    width: 66%;
    background: var(--warning);
}

.strength-strong {
    width: 100%;
    background: var(--success);
}

.password-match {
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.match-success {
    color: var(--success);
}

.match-error {
    color: var(--danger);
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: var(--dark);
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.4);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.submit-btn:active {
    transform: translateY(0);
}

.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--dark);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Resend Container */
.resend-container {
    text-align: center;
    margin: 1.5rem 0;
    color: var(--gray);
}

.resend-btn {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    text-decoration: underline;
}

.resend-btn:hover:not(:disabled) {
    color: var(--secondary);
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.resend-btn:disabled {
    color: var(--gray);
    cursor: not-allowed;
    text-decoration: none;
}

/* Back to Login */
.back-to-login {
    text-align: center;
    margin-top: 1.5rem;
}

.back-to-login a {
    color: var(--gray);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.back-to-login a:hover {
    color: var(--primary);
}

.back-to-login a svg {
    transition: all 0.3s;
}

.back-to-login a:hover svg {
    transform: translateX(-3px);
}

/* Success/Error Messages */
.message {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    text-align: center;
    animation: slideDown 0.3s ease-out;
}

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

.message.success {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
}

.message.error {
    background: rgba(255, 0, 102, 0.1);
    border: 1px solid var(--danger);
    color: var(--danger);
}

/* Responsive Design */
@media (max-width: 768px) {
    .forgot-password-container {
        padding: 2rem;
        margin: 1rem;
    }

    .forgot-password-title {
        font-size: 1.8rem;
    }

    .otp-input-container {
        gap: 0.5rem;
    }

    .otp-input {
        width: 40px;
        height: 50px;
        font-size: 1.2rem;
    }

    nav {
        padding: 0.8rem 1rem;
    }

    .nav-links {
        display: none;
    }
}
