/* Authentication Modals & UI */

/* Modal Base */
.auth-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 3rem;
    max-width: 450px;
    width: 100%;
    border: 1px solid var(--border-subtle);
    position: relative;
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    margin-bottom: 2rem;
}

.modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.modal-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* Form Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group input {
    padding: 0.9rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.auth-button {
    padding: 1rem;
    background: var(--accent-primary);
    color: var(--bg-dark);
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.auth-button:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.3);
}

.form-footer {
    margin-top: 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-footer a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.form-footer a:hover {
    color: var(--text-primary);
}

.error-message {
    color: #ff4444;
    font-size: 0.85rem;
    padding: 0.8rem;
    background: rgba(255, 68, 68, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 68, 68, 0.2);
    display: none;
}

.error-message:not(:empty) {
    display: block;
}

/* Auth Buttons in Header */
.auth-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-login,
.btn-register {
    padding: 0.7rem 1.5rem;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-login {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

.btn-login:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-primary);
}

.btn-register {
    background: var(--accent-primary);
    color: var(--bg-dark);
}

.btn-register:hover {
    background: var(--accent-secondary);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

/* User Menu */
.user-menu {
    display: none;
    position: relative;
    align-items: center;
    gap: 1rem;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-primary);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.user-name {
    font-weight: 500;
    font-size: 0.95rem;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.8rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    min-width: 200px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    padding: 1rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 0.95rem;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent-primary);
}

.dropdown-item:first-child {
    border-radius: 12px 12px 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 12px 12px;
    border-top: 1px solid var(--border-subtle);
    color: #ff6b6b;
}

.dropdown-item:last-child:hover {
    background: rgba(255, 107, 107, 0.1);
    color: #ff4444;
}

/* Notifications */
.notification {
    position: fixed;
    top: 100px;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    color: var(--text-primary);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 2000;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
}

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

.notification-success {
    border-left: 4px solid #4caf50;
}

.notification-error {
    border-left: 4px solid #ff4444;
}

.notification-info {
    border-left: 4px solid var(--accent-primary);
}

/* Auth Required Content */
.auth-required {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-content {
        padding: 2rem;
        max-width: 100%;
    }
    
    .modal-title {
        font-size: 1.6rem;
    }
    
    .user-name {
        display: none;
    }
    
    .notification {
        right: 1rem;
        left: 1rem;
    }
}
