/* Header Authentication Styles - Gorgeous Modal Design */

/* User Menu Dropdown */
.user-menu {
    position: relative;
}

.user-dropdown-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: color 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.user-dropdown-toggle:hover {
    color: var(--primary-color);
}

.user-dropdown-toggle .fas.fa-user-circle {
    font-size: 18px;
    color: var(--primary-color);
}

.user-dropdown-toggle .fas.fa-chevron-down {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.user-dropdown-toggle.active .fas.fa-chevron-down {
    transform: rotate(180deg);
}

.username {
    font-weight: 500;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Dropdown menu */
.user-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    background-color: #fff;
    border: 1px solid rgba(255, 105, 180, 0.2);
    border-radius: 8px;
    padding: 0.5rem 0;
    min-width: 180px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    animation: dropdown-fade 0.3s ease;
    transform-origin: top center;
    z-index: 1001;
}

.user-dropdown-menu li {
    list-style: none;
    margin: 0;
}

.user-dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.75rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 14px;
}

.user-dropdown-menu .dropdown-item:hover {
    background-color: rgba(255, 105, 180, 0.1);
    color: var(--primary-color);
}

.user-dropdown-menu .dropdown-item.logout:hover {
    color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
}

.user-dropdown-menu .dropdown-item i {
    width: 16px;
    text-align: center;
}

.user-dropdown-menu .dropdown-divider {
    height: 1px;
    background-color: rgba(255, 105, 180, 0.2);
    margin: 8px 0;
}

/* Elegant Auth Buttons */
nav ul li a.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid transparent;
}

nav ul li a.btn-secondary {
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

nav ul li a.btn-secondary:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--text-color);
    text-decoration: none;
}

nav ul li a.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
}

nav ul li a.btn-primary:hover {
    background-color: #ff45a0;
    color: white;
    text-decoration: none;
}

/* Gorgeous Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    z-index: 1001;
    display: none;
    animation: modalBackdropFadeIn 0.3s ease;
}

@keyframes modalBackdropFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    position: relative;
    background-color: white;
    margin: 5% auto;
    padding: 3rem;
    width: 90%;
    max-width: 450px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(255, 105, 180, 0.2);
    border: 1px solid rgba(255, 105, 180, 0.1);
    animation: modalSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 24px;
    cursor: pointer;
    color: var(--light-text);
    transition: all 0.3s ease;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 105, 180, 0.05);
}

.close-modal:hover {
    color: var(--primary-color);
    background: rgba(255, 105, 180, 0.15);
    transform: rotate(90deg);
}

/* Modal Header */
.modal-content h2 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.8rem;
    text-align: center;
    position: relative;
    margin-top: 2rem; /* Add space between icon and title */
}

.modal-content h2::before {
    content: '';
    position: absolute;
    top: -3.5rem; /* Move icon further up */
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,105,180,0.1), rgba(255,105,180,0.05));
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Add icons to modal titles */
#login-modal h2::before {
    content: '💖';
    font-size: 1.5rem;
    line-height: 60px;
    text-align: center;
}

#signup-modal h2::before {
    content: '🎵';
    font-size: 1.5rem;
    line-height: 60px;
    text-align: center;
}

.modal-content p {
    margin-bottom: 2rem;
    color: var(--light-text);
    text-align: center;
    font-size: 15px;
    line-height: 1.5;
}

.highlight-text {
    color: var(--primary-color) !important;
    font-weight: 600;
    font-style: italic;
}

/* Beautiful Form Styles */
.modal .form-group {
    margin-bottom: 1.5rem;
}

.modal .form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-color);
    font-size: 14px;
}

.modal .input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.modal .input-icon {
    position: absolute;
    left: 1rem;
    color: var(--light-text);
    z-index: 2;
    font-size: 14px;
}

.modal .form-group input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    font-family: inherit;
    transition: all 0.3s ease;
    background-color: #fafafa;
    color: var(--text-color);
    font-size: 14px;
    box-sizing: border-box;
}

.modal .form-group input::placeholder {
    color: var(--light-text);
    opacity: 0.7;
}

.modal .form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(255, 105, 180, 0.1);
    transform: translateY(-1px);
}

/* Gorgeous Modal Button */
.modal .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #ff45a0);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    font-size: 16px;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

/* Modal Links */
.modal-links {
    margin-top: 2rem;
    text-align: center;
}

.modal-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.modal-links a:hover {
    background: rgba(255, 105, 180, 0.1);
    transform: translateY(-1px);
    text-decoration: none;
    color: #ff45a0;
}

.modal-links p {
    margin: 15px 0 0 0;
    color: var(--light-text);
    font-size: 14px;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(255,105,180,0.05), rgba(255,105,180,0.02));
    border-radius: 8px;
    border: 1px solid rgba(255, 105, 180, 0.1);
}

/* Error handling */
.error-message {
    color: #e74c3c;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background-color: rgba(231, 76, 60, 0.1);
    border-radius: 8px;
    border-left: 3px solid #e74c3c;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.error-message::before {
    content: '⚠️';
    font-size: 14px;
}

/* Modal Footer Enhancement */
.modal-content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), #ff45a0, var(--primary-color));
    border-radius: 0 0 20px 20px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .username {
        display: none;
    }
    
    .user-dropdown-toggle {
        padding: 6px 8px;
    }
    
    .modal-content {
        margin: 10% auto;
        padding: 2rem;
        width: 95%;
    }
    
    nav ul li a.btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .modal-content h2 {
        font-size: 1.5rem;
        margin-top: 1.5rem; /* Adjust for mobile */
    }
    
    .modal-content h2::before {
        width: 50px;
        height: 50px;
        top: -3rem; /* Adjust icon position for mobile */
    }
}

@media (max-width: 480px) {
    nav ul li a.btn {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .modal-content {
        margin: 15% auto;
        padding: 1.5rem;
        width: 95%;
    }
    
    .modal .form-group input {
        padding: 0.875rem 0.875rem 0.875rem 2.75rem;
    }
    
    .modal .btn-primary {
        padding: 0.875rem;
        font-size: 14px;
    }
    
    .modal-content h2 {
        margin-top: 1rem;
    }
    
    .modal-content h2::before {
        top: -2.5rem;
    }
}