﻿
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    overflow: hidden;
    width: 100%;
    max-width: 400px;
    position: relative;
}

.auth-header {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

    .auth-header h1 {
        font-size: 1.8em;
        margin-bottom: 8px;
    }

    .auth-header p {
        opacity: 0.9;
        font-size: 0.95em;
    }

.auth-content {
    padding: 40px 30px;
}

.auth-tabs {
    display: flex;
    margin-bottom: 30px;
    background: #f8f9fa;
    border-radius: 25px;
    padding: 4px;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #666;
}

    .tab-btn.active {
        background: #4CAF50;
        color: white;
        box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
    }

.auth-form {
    display: none;
}

    .auth-form.active {
        display: block;
    }

.form-group {
    margin-bottom: 20px;
}

    .form-group label {
        display: block;
        margin-bottom: 8px;
        font-weight: 500;
        color: #333;
        font-size: 0.9em;
    }

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: #fff;
}

    .form-input:focus {
        outline: none;
        border-color: #4CAF50;
        box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
    }

    .form-input.error {
        border-color: #f44336;
        box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.1);
    }

.error-message {
    color: #f44336;
    font-size: 0.85em;
    margin-top: 5px;
    display: none;
}

    .error-message.show {
        display: block;
    }

.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

    .submit-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(76, 175, 80, 0.3);
    }

    .submit-btn:disabled {
        background: #ccc;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }

.password-strength {
    margin-top: 8px;
    font-size: 0.8em;
}

.strength-bar {
    width: 100%;
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    margin-top: 5px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-weak {
    background: #f44336;
    width: 33%;
}

.strength-medium {
    background: #ff9800;
    width: 66%;
}

.strength-strong {
    background: #4CAF50;
    width: 100%;
}

.loading {
    display: none;
    text-align: center;
    padding: 20px;
}

.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.success-check {
    display: none;
    text-align: center;
    padding: 30px;
    color: #4CAF50;
}

.check-icon {
    font-size: 3em;
    margin-bottom: 15px;
    animation: checkPop 0.6s ease-out;
}

@keyframes checkPop {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

@media (max-width: 480px) {
    .auth-container {
        margin: 10px;
        max-width: none;
    }

    .auth-header {
        padding: 30px 20px;
    }

        .auth-header h1 {
            font-size: 1.5em;
        }

    .auth-content {
        padding: 30px 20px;
    }

    .tab-btn {
        padding: 10px 15px;
        font-size: 0.9em;
    }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.4);
    display: none;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.5em;
    z-index: 9999;
}
.spinner {
    width: 50px;
    height: 50px;
    border: 6px solid #f3f3f3;
    border-top: 6px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}