/* Auth Pages Styling */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-x: hidden;
}

/* Auth Container */
.auth-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Auth Card */
.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    z-index: 10;
    animation: slideInUp 0.6s ease-out;
    max-height: 90vh;
    overflow-y: auto;
    border: 2px solid #2196F3;
}

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

/* Scrollbar styling for auth card */
.auth-card::-webkit-scrollbar {
    width: 8px;
}

.auth-card::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.auth-card::-webkit-scrollbar-thumb {
    background: #2196F3;
    border-radius: 10px;
}

.auth-card::-webkit-scrollbar-thumb:hover {
    background: #1976D2;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
    animation: fadeIn 0.8s ease-out;
}

.auth-header h1 {
    font-size: 2.5em;
    color: #2196F3;
    margin-bottom: 5px;
}

.auth-header p {
    color: #666;
    font-size: 1em;
}

.logo-mark {
    font-size: 3em;
    color: #2196F3;
    margin-bottom: 10px;
}

/* Alert Messages */
.alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    animation: slideInDown 0.4s ease-out;
    font-weight: 500;
}

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

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #f44336;
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

.auth-tab {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    color: #999;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.auth-tab:hover {
    color: #2196F3;
}

.auth-tab.active {
    color: #2196F3;
    border-bottom-color: #2196F3;
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 3px;
    background: #2196F3;
    animation: expandWidth 0.3s ease-out;
}

@keyframes expandWidth {
    from {
        transform: scaleX(0);
        transform-origin: left;
    }
    to {
        transform: scaleX(1);
    }
}

/* Auth Forms */
.auth-form {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.auth-form.active {
    display: block;
}

.auth-form h2 {
    color: #333;
    margin-bottom: 25px;
    font-size: 1.8em;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
    animation: fadeInUp 0.5s ease-out backwards;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 0.95em;
}

.form-group label i {
    color: #2196F3;
    margin-right: 5px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: #f8f9ff;
}

.form-group input:focus {
    outline: none;
    border-color: #2196F3;
    background: white;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
    transform: translateY(-2px);
}

.form-group input::placeholder {
    color: #ccc;
}

/* Buttons */
.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn:hover {
    transform: translateY(-3px);
}

.btn:active {
    transform: translateY(-1px);
}

.btn-primary {
    background: #2196F3;
    color: white;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.6);
}

.btn-google {
    background: white;
    color: #333;
    border: 2px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-google:hover {
    background: #f8f9ff;
    border-color: #2196F3;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.2);
}

.btn-block {
    width: 100%;
    margin-bottom: 15px;
}

/* Divider */
.divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
    color: #ccc;
    font-weight: 600;
}

.divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 35%;
    height: 2px;
    background: #e0e0e0;
}

.divider::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    width: 35%;
    height: 2px;
    background: #e0e0e0;
}

/* Footer */
.auth-footer {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-size: 0.95em;
}

.auth-footer a {
    color: #2196F3;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    cursor: pointer;
}

.auth-footer a:hover {
    color: #1976D2;
    text-decoration: underline;
}

.auth-links {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.auth-links a {
    display: inline-block;
    margin: 0 10px;
    color: #2196F3;
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.3s ease;
}

.auth-links a:hover {
    color: #1976D2;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    .auth-card {
        padding: 25px;
        border-radius: 15px;
    }

    .auth-header h1 {
        font-size: 1.8em;
    }

    .btn {
        padding: 10px 15px;
        font-size: 0.95em;
    }

    .form-group {
        margin-bottom: 15px;
    }
}

/* Password toggle styling */
.password-wrapper {
    position: relative;
    display: block;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: #f0f0f0;
    border: 1px solid #ddd;
    cursor: pointer;
    padding: 8px 10px;
    color: #333;
    font-size: 18px;
    transition: all 0.3s ease;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    height: 36px;
    width: 36px;
}

.password-toggle:hover {
    color: #2196F3;
    background: #fff;
    border-color: #2196F3;
}

.password-toggle:focus {
    outline: 2px solid #2196F3;
    outline-offset: 2px;
}

.password-toggle i {
    pointer-events: none;
    font-size: 18px;
}

/* Adjust input padding to make room for toggle button */
.password-wrapper input {
    padding-right: 55px !important;
}
