/* ========================================
   AUTH UI STYLES
   ======================================== */

/* Auth Button in Navbar */
.auth-section {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 15px;
}

.auth-btn {
    background: rgba(255, 191, 0, 0.2);
    border: 2px solid #FFBF00;
    border-radius: 20px;
    color: #fff;
    padding: 6px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.auth-btn:hover {
    background: #FFBF00;
    color: #1a1a2e;
}

.auth-btn i {
    font-size: 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 14px;
}

.user-info .username {
    color: #FFBF00;
    font-weight: 500;
}

.logout-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    color: #fff;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255, 100, 100, 0.3);
    border-color: #ff6464;
}

/* Modal Overlay */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.auth-modal-overlay.active {
    display: flex;
}

/* Modal Container */
.auth-modal {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 16px;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.auth-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.auth-modal-close:hover {
    opacity: 1;
}

.auth-modal h2 {
    color: #fff;
    text-align: center;
    margin-bottom: 25px;
    font-size: 24px;
}

/* Tabs */
.auth-tabs {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-tab {
    flex: 1;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    padding: 12px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.auth-tab:hover {
    color: rgba(255, 255, 255, 0.8);
}

.auth-tab.active {
    color: #FFBF00;
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #FFBF00;
}

/* Forms */
.auth-form {
    display: none;
}

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

.auth-form-group {
    margin-bottom: 20px;
}

.auth-form-group label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
    font-size: 14px;
}

.auth-form-group input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    transition: all 0.3s;
    box-sizing: border-box;
}

.auth-form-group input:focus {
    outline: none;
    border-color: #FFBF00;
    background: rgba(255, 255, 255, 0.08);
}

.auth-form-group input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Field Hints */
.auth-form-group .field-hint {
    display: block;
    color: rgba(255, 255, 255, 0.4);
    font-size: 11px;
    margin-top: 4px;
}

/* Validation States */
.auth-form-group input.valid {
    border-color: #64ff64;
}

.auth-form-group input.invalid {
    border-color: #ff6464;
}

.auth-form-group input.invalid ~ .field-hint {
    color: #ff6464;
}

.auth-form-group input.valid ~ .field-hint {
    color: #64ff64;
}

.auth-submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #FFBF00 0%, #ff9500 100%);
    border: none;
    border-radius: 8px;
    color: #1a1a2e;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 191, 0, 0.4);
}

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

/* Error/Success Messages */
.auth-message {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
}

.auth-message.error {
    display: block;
    background: rgba(255, 100, 100, 0.2);
    border: 1px solid rgba(255, 100, 100, 0.5);
    color: #ff6464;
    white-space: pre-line;
}

.auth-message.success {
    display: block;
    background: rgba(100, 255, 100, 0.2);
    border: 1px solid rgba(100, 255, 100, 0.5);
    color: #64ff64;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .auth-section {
        position: absolute;
        top: 50%;
        right: 120px;
        transform: translateY(-50%);
        margin-left: 0;
    }

    .auth-btn span {
        display: none;
    }

    .user-info .username {
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .auth-modal {
        width: 95%;
        padding: 20px;
    }
}
