@import url('index.css');

/* Universal Box Sizing */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Login Page Specific Styles */
.auth-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0a0a;
    padding: 100px 20px 20px 20px;
    position: relative;
    overflow: hidden;
}

.auth-container {
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 2;
    box-sizing: border-box;
}

.auth-card {
    background: rgba(26, 26, 26, 0.95);
    border-radius: 2px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(138, 43, 226, 0.3);
    backdrop-filter: blur(20px);
    position: relative;
    z-index: 10;
    width: 100%;
    box-sizing: border-box;
}

/* Tab Navigation */
.auth-tabs {
    display: flex;
    margin-bottom: 30px;
    background: rgba(17, 17, 17, 0.8);
    border-radius: 0px;
    padding: 4px;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 0px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #999;
    z-index: 10;
    position: relative;
    pointer-events: auto;
}

.tab-btn.active {
    background: linear-gradient(135deg, #ff4824 0%, #ff0b4e 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 72, 36, 0.3);
}

/* Auth Header */
.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h2 {
    color: #e0e0e0;
    font-size: 2rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.auth-header p {
    color: #999;
    font-size: 1rem;
}

/* Form Container */
.auth-form-container {
    opacity: 1;
    transform: translateX(0);
    transition: all 0.3s ease;
}

.auth-form-container.hidden {
    display: none;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Form Row for side-by-side inputs */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Form Groups */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.form-group label {
    color: #e0e0e0;
    font-weight: 600;
    font-size: 0.95rem;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #333;
    border-radius: 0px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #111;
    color: #e0e0e0;
    z-index: 10;
    position: relative;
    pointer-events: auto;
    box-sizing: border-box;
}

.form-group input[type="password"] {
    padding-right: 45px;
}

.form-group input:focus {
    outline: none;
    border-color: #ff4824;
    box-shadow: 0 0 0 3px rgba(255, 72, 36, 0.2);
}

.form-group input.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-help {
    color: #999;
    font-size: 0.85rem;
    margin-top: -4px;
}

/* Input Icons */
.input-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
}

.form-group:has(label) .input-icon {
    top: calc(50% + 12px);
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    padding: 4px;
    transition: color 0.3s ease;
    z-index: 15;
    pointer-events: auto;
}

.form-group:has(label) .password-toggle {
    top: calc(50% + 12px);
}

.password-toggle:hover {
    color: #ff4824;
}

.password-toggle .eye-closed {
    display: none;
}

.password-toggle.active .eye-open {
    display: none;
}

.password-toggle.active .eye-closed {
    display: block;
}

/* Checkbox Styles */
.checkbox-group {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: #e0e0e0;
    font-weight: 500;
    font-size: 0.9rem;
    z-index: 15;
    position: relative;
    pointer-events: auto;
}

.checkbox-label * {
    pointer-events: auto;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
    position: relative;
    z-index: 25;
}

.checkmark {
    display: none;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    display: none;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    display: none;
}

/* Forgot Password Link */
.forgot-password {
    color: #ff4824;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #ff0b4e;
    text-decoration: underline;
}

/* Terms Links */
.terms-link, .privacy-link {
    color: #ff4824;
    text-decoration: none;
    font-weight: 500;
}

.terms-link:hover, .privacy-link:hover {
    color: #ff0b4e;
    text-decoration: underline;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: -10px;
    margin-bottom: 10px;
}

.strength-meter {
    width: 100%;
    height: 4px;
    background: #e1e5e9;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 5px;
}

.strength-fill {
    height: 100%;
    width: 0%;
    background: #dc3545;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-fill.weak {
    width: 25%;
    background: #dc3545;
}

.strength-fill.fair {
    width: 50%;
    background: #ffc107;
}

.strength-fill.good {
    width: 75%;
    background: #17a2b8;
}

.strength-fill.strong {
    width: 100%;
    background: #28a745;
}

.strength-text {
    font-size: 0.85rem;
    color: #999;
}

/* Buttons */
.btn {
    padding: 14px 24px;
    border: none;
    border-radius: 0px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.btn-full {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #ff4824 0%, #ff0b4e 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 72, 36, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 72, 36, 0.4);
}

/* Click animation disabled */
/* .btn-primary:active {
    transform: translateY(0);
} */

/* Social Login */
.auth-divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
    color: #999;
    font-size: 0.9rem;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e1e5e9;
    z-index: 1;
}

.auth-divider span {
    background: rgba(26, 26, 26, 0.95);
    padding: 0 15px;
    position: relative;
    z-index: 2;
}

.social-login {
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* When only Discord is available, make it full width */
.social-login .discord-only {
    width: 100%;
    max-width: 100%;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
    border: 2px solid #333;
    border-radius: 0px;
    background: #111;
    color: #e0e0e0;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    z-index: 10;
    position: relative;
    pointer-events: auto;
}

.btn-social:hover {
    border-color: #ff4824;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 72, 36, 0.2);
}

/* Background Animation */
.auth-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 72, 36, 0.05) 0%, rgba(255, 11, 78, 0.05) 100%);
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
}

.bg-circle:nth-child(1) {
    width: 200px;
    height: 200px;
    top: 10%;
    left: -50px;
    animation-delay: 0s;
}

.bg-circle:nth-child(2) {
    width: 300px;
    height: 300px;
    top: 60%;
    right: -100px;
    animation-delay: -10s;
}

.bg-circle:nth-child(3) {
    width: 150px;
    height: 150px;
    bottom: 20%;
    left: 20%;
    animation-delay: -5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) rotate(90deg);
    }
    50% {
        transform: translateY(-10px) rotate(180deg);
    }
    75% {
        transform: translateY(-30px) rotate(270deg);
    }
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.02);
    color: #e0e0e0;
    border-radius: 0px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border-left: 5px solid #28a745;
    z-index: 1000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    max-width: 400px;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification.error {
    border-left-color: #dc3545;
}

.notification.warning {
    border-left-color: #ffc107;
}

.notification-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
}

.notification-message {
    color: #e0e0e0;
    font-weight: 500;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    padding: 0;
    margin-left: 15px;
}

.notification-close:hover {
    color: #e0e0e0;
}

/* Loading States */
.btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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

/* Form Validation */
.form-group.error input {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-group.success input {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.error-message {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 4px;
    font-weight: 500;
}

.success-message {
    color: #28a745;
    font-size: 0.85rem;
    margin-top: 4px;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-section {
        padding: 80px 15px 15px 15px;
    }
    
    .auth-card {
        padding: 30px 25px;
    }
    
    .auth-header h2 {
        font-size: 1.8rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .social-login {
        grid-template-columns: 1fr;
    }
    
    .checkbox-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .auth-container {
        max-width: 100%;
    }
    
    .auth-card {
        padding: 25px 20px;
        margin: 0 10px;
    }
    
    .auth-header h2 {
        font-size: 1.6rem;
    }
    
    .tab-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Focus Management */
.form-group input:focus + .input-icon,
.form-group input:focus + .password-toggle {
    color: #ff4824;
}

/* Smooth Transitions */
* {
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

/* Temporarily hide Discord login functionality */
.discord-only {
    display: none !important;
}

.auth-divider {
    display: none !important;
}
