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

:root {
    --bg-gradient-start: #667eea;
    --bg-gradient-end: #764ba2;
    --container-bg: rgba(255, 255, 255, 0.95);
    --text-primary: #333;
    --text-secondary: #666;
    --text-muted: #999;
    --input-bg: #f8f9fa;
    --input-border: #e0e0e0;
    --input-focus-border: #667eea;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --icon-color: #667eea;
    --icon-hover: #764ba2;
    --alert-error-bg: #fee;
    --alert-error-color: #c33;
    --success-color: #4caf50;
    --error-color: #f44336;
    --warning-color: #ff9800;
    --success-bg: #efe;
    --success-color-text: #3c3;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.5s ease;
}

body.dark-mode {
    --bg-gradient-start: #1a1a2e;
    --bg-gradient-end: #16213e;
    --container-bg: rgba(30, 30, 46, 0.95);
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-muted: #707070;
    --input-bg: #2a2a3e;
    --input-border: #3a3a4e;
    --shadow-color: rgba(0, 0, 0, 0.6);
    --icon-color: #667eea;
    --icon-hover: #8b9bff;
    --alert-error-bg: #4a1a1a;
    --alert-error-color: #ff6b6b;
    --success-color: #69db7c;
    --error-color: #ff6b6b;
}

body::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: rotate 20s linear infinite;
}

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

.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: var(--container-bg);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--icon-color);
    box-shadow: 0 5px 20px var(--shadow-color);
    transition: all 0.3s ease;
    z-index: 1000;
    animation: fadeIn 0.8s ease-out;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 8px 30px var(--shadow-color);
    color: var(--icon-hover);
}

.back-button {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: var(--container-bg);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--icon-color);
    box-shadow: 0 5px 20px var(--shadow-color);
    transition: all 0.3s ease;
    z-index: 1000;
    text-decoration: none;
}

.back-button:hover {
    transform: scale(1.1) translateX(-5px);
}

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: float 15s infinite;
}

body.dark-mode .particle {
    background: rgba(102, 126, 234, 0.3);
}

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) translateX(100px); opacity: 0; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Login styles */
.login-container {
    position: relative;
    z-index: 10;
    background: var(--container-bg);
    padding: 50px 40px;
    border-radius: 20px;
    box-shadow: 0 25px 50px var(--shadow-color);
    width: 100%;
    max-width: 450px;
    animation: slideIn 0.6s ease-out;
    backdrop-filter: blur(10px);
    transition: all 0.5s ease;
}

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

.logo-container {
    text-align: center;
    margin-bottom: 35px;
    animation: fadeIn 0.8s ease-out 0.2s both;
}

.logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.logo i {
    font-size: 35px;
    color: white;
}

.logo-container h1 {
    color: var(--text-primary);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
    transition: color 0.3s ease;
}

.logo-container p {
    color: var(--text-secondary);
    font-size: 14px;
    transition: color 0.3s ease;
}

.form-group {
    margin-bottom: 25px;
    animation: fadeIn 0.8s ease-out 0.4s both;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
    transition: color 0.3s ease;
}

.input-wrapper {
    position: relative;
    transition: transform 0.3s ease;
}

.input-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--icon-color);
    font-size: 18px;
    transition: all 0.3s ease;
    pointer-events: none;
}

.form-control {
    width: 100%;
    padding: 15px 15px 15px 50px;
    border: 2px solid var(--input-border);
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: var(--input-bg);
    color: var(--text-primary);
    font-family: inherit;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--input-focus-border, #667eea);
    background: var(--container-bg);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 14px;
    animation: fadeIn 0.8s ease-out 0.6s both;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--icon-color);
}

.forgot-password {
    color: var(--icon-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.forgot-password:hover {
    color: var(--icon-hover);
    text-decoration: underline;
}

.btn-login {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    animation: fadeIn 0.8s ease-out 0.8s both;
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.5);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    animation: slideDown 0.5s ease-out;
}

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

.alert-error {
    background: var(--alert-error-bg);
    color: var(--alert-error-color);
    border-left: 4px solid var(--alert-error-color);
}

.alert-error i {
    margin-right: 8px;
}

.alert-success {
    background: var(--success-bg);
    color: var(--success-color-text);
    border-left: 4px solid var(--success-color);
}

.business-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--input-border);
    animation: fadeIn 0.8s ease-out 1s both;
}

.business-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--business-icon-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--icon-color);
    font-size: 20px;
    transition: all 0.3s ease;
}

body.dark-mode .business-icon {
    background: var(--business-icon-bg);
}

body.dark-mode .back-to-site {
    background: #2a2a3e;
    border-color: #3a3a4e;
    color: #8b9bff;
}
body.dark-mode .back-to-site:hover {
    border-color: #8b9bff;
    color: #aebbff;
    box-shadow: 0 4px 16px rgba(102,126,234,0.2);
}

.business-icon:hover {
    transform: translateY(-5px) scale(1.1);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

.footer-text {
    text-align: center;
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 13px;
    animation: fadeIn 0.8s ease-out 1.2s both;
    transition: color 0.3s ease;
}

/* Recovery styles */
.recovery-container {
    position: relative;
    z-index: 10;
    background: var(--container-bg);
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 25px 50px var(--shadow-color);
    width: 100%;
    max-width: 500px;
    animation: slideIn 0.6s ease-out;
    backdrop-filter: blur(10px);
    transition: all 0.5s ease;
    overflow: hidden;
    box-sizing: border-box;
}

.progress-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    position: relative;
}

.step-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--input-bg);
    border: 3px solid var(--input-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 20px;
    transition: all 0.3s ease;
}

.progress-step.active .step-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
    animation: pulse 2s ease-in-out infinite;
}

.progress-step.completed .step-icon {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.progress-step span {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    margin-top: 4px;
}

.progress-line {
    flex: 1;
    height: 3px;
    background: var(--input-border);
    margin: 0 10px;
    position: relative;
    top: -20px;
    transition: all 0.5s ease;
}

.progress-line.active {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.logo {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.logo i {
    font-size: 30px;
    color: white;
}

.logo-container h1 {
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.logo-container p {
    color: var(--text-secondary);
    font-size: 13px;
}

.step-info {
    background: rgba(102, 126, 234, 0.1);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 25px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.step-info i {
    color: var(--icon-color);
    font-size: 20px;
    margin-top: 2px;
    flex-shrink: 0;
}

.step-info p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    font-weight: normal;
}

.step-info strong {
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 15px 15px 15px 50px;
    border: 2px solid var(--input-border);
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: var(--input-bg);
    color: var(--text-primary);
    box-sizing: border-box;
}

.input-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--icon-color);
    font-size: 18px;
    pointer-events: none;
}

.code-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.code-input {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    border: 2px solid var(--input-border);
    border-radius: 10px;
    background: var(--input-bg);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.code-input:focus {
    outline: none;
    border-color: var(--icon-color);
    background: var(--container-bg);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
    transform: scale(1.05);
}

.resend-code {
    text-align: center;
    margin: 20px 0;
}

.resend-code p {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 5px 0;
}

.resend-code a {
    color: var(--icon-color);
    text-decoration: none;
    font-weight: 600;
}

.resend-code a:hover {
    text-decoration: underline;
}

.timer {
    font-weight: 600;
    color: var(--warning-color);
}

.btn-submit {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.5);
}

.success-message {
    text-align: center;
    padding: 20px 0;
}

.success-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    animation: successPop 0.6s ease-out;
}

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

.success-icon i {
    font-size: 50px;
    color: white;
}

.success-message h2 {
    color: var(--text-primary);
    font-size: 26px;
    margin-bottom: 10px;
}

.success-message p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 25px;
}

.security-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--input-border);
}

.security-info i {
    color: var(--success-color);
    font-size: 18px;
}

.security-info p {
    color: var(--text-muted);
    font-size: 12px;
}

@media (max-width: 480px) {
    .recovery-container {
        padding: 30px 20px;
    }

    .progress-step span {
        font-size: 10px;
    }

    .step-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .code-input {
        width: 45px;
        height: 55px;
        font-size: 20px;
    }

    .theme-toggle, .back-button {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

.back-to-site {
    position: fixed;
    top: 18px;
    left: 18px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #667eea;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    transition: all 0.25s;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.back-to-site:hover {
    border-color: #667eea;
    color: #764ba2;
    box-shadow: 0 4px 16px rgba(102,126,234,0.15);
    transform: translateX(-2px);
}
