/* Auth Modal Styles */
.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 15, 26, 0.9);
    backdrop-filter: blur(16px) saturate(180%);
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
    from { 
        opacity: 0;
        backdrop-filter: blur(15px);
    }
    to { 
        opacity: 1;
        backdrop-filter: blur(16px) saturate(180%);
    }
}

.auth-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-modal-content {
    position: relative;
    background: linear-gradient(135deg, rgba(19, 24, 36, 0.98), rgba(28, 35, 51, 0.98));
    padding: 3rem 3.5rem;
    border-radius: 20px;
    max-width: 480px;
    width: 90%;
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 
                0 0 40px rgba(59, 130, 246, 0.1);
    animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.auth-modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: radial-gradient(circle at 50% 0%, rgba(139, 92, 246, 0.15), transparent 70%);
    pointer-events: none;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.auth-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 10;
    font-weight: 300;
    line-height: 1;
}

.auth-close:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.auth-logo {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-logo svg {
    stroke: url(#gradient);
    margin: 0 auto 1rem;
    filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.5));
}

.auth-modal-content h2 {
    color: white;
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-teal), var(--accent-violet));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1.2rem;
    stroke: rgba(255, 255, 255, 0.5);
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1;
}

.input-group input {
    padding-left: 3.5rem !important;
}

.input-group:focus-within .input-icon {
    stroke: var(--accent-teal);
    transform: scale(1.1);
}

.auth-form input {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(59, 130, 246, 0.05);
    border: 1.5px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.auth-form input:focus {
    outline: none;
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.08);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.auth-form input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.auth-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
    position: relative;
    overflow: hidden;
}

.auth-btn svg {
    stroke: white;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.auth-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.auth-btn:hover::before {
    width: 300px;
    height: 300px;
}

.auth-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

.auth-btn:hover:not(:disabled) svg {
    transform: translateX(3px);
}

.auth-btn:active:not(:disabled) {
    transform: translateY(-1px);
}

.auth-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.auth-btn-guest {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.auth-btn-guest::before {
    background: rgba(255, 255, 255, 0.1);
}

.auth-btn-guest:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.15);
}

.auth-btn-guest:hover svg {
    transform: scale(1.1);
}

.auth-switch {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.5rem;
}

.auth-switch a {
    color: var(--accent-teal);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.auth-switch a:hover {
    color: var(--accent-violet);
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 2rem 0;
    color: rgba(255, 255, 255, 0.5);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.auth-divider span {
    padding: 0 1rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.auth-error {
    color: #ff4444;
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    min-height: 20px;
}

/* Download Modal Styles */
.download-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.download-option {
    text-align: center;
    padding: 2rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 2px solid rgba(139, 92, 246, 0.2);
    transition: all 0.3s ease;
}

.download-option:hover {
    border-color: var(--accent-violet);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
}

.download-option:hover .download-icon {
    stroke: var(--accent-teal);
    transform: scale(1.1);
}

.download-icon {
    margin: 0 auto 1.5rem;
    color: white;
    stroke: white;
    transition: all 0.3s ease;
}

.download-option h3 {
    color: white;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.download-option p {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

/* User button styles */
.btn-icon {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.btn-icon svg {
    stroke: white;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.btn-icon:hover svg {
    stroke: var(--accent-teal);
}

.search-icon {
    stroke: rgba(255, 255, 255, 0.7);
    transition: all 0.2s ease;
}

.search-input:focus + .search-icon {
    stroke: var(--accent-teal);
}

/* User logged in state */
.user-logged-in {
    background: linear-gradient(135deg, var(--accent-teal), var(--accent-violet));
    border-radius: 50%;
}

/* === Mobile Responsive === */
@media (max-width: 480px) {
    .auth-modal-content {
        padding: 2rem 1.5rem;
        width: 95%;
        max-width: 100%;
        border-radius: 16px;
    }
    
    .auth-logo svg {
        width: 40px;
        height: 40px;
    }
    
    .auth-modal-content h2 {
        font-size: 1.4rem;
        margin-bottom: 1.5rem;
    }
    
    .auth-close {
        width: 36px;
        height: 36px;
        font-size: 1.5rem;
        top: 0.8rem;
        right: 0.8rem;
    }
    
    .auth-form {
        gap: 1rem;
    }
    
    .auth-form input {
        padding: 0.9rem 1rem;
        font-size: 0.95rem;
    }
    
    .input-group input {
        padding-left: 3rem !important;
    }
    
    .input-icon {
        left: 1rem;
        width: 18px;
        height: 18px;
    }
    
    .auth-btn {
        padding: 0.9rem 1.5rem;
        font-size: 0.95rem;
        gap: 0.6rem;
    }
    
    .auth-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .auth-switch {
        font-size: 0.9rem;
    }
    
    .auth-divider {
        margin: 1.5rem 0;
    }
    
    .auth-divider span {
        font-size: 0.75rem;
    }
    
    .auth-error {
        font-size: 0.85rem;
        padding: 0.6rem;
    }
    
    .download-options {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .download-option {
        padding: 1.5rem 1rem;
    }
    
    .download-icon {
        width: 48px;
        height: 48px;
    }
    
    .download-option h3 {
        font-size: 1.1rem;
    }
}

@media (max-width: 360px) {
    .auth-modal-content {
        padding: 1.5rem 1rem;
    }
    
    .auth-modal-content h2 {
        font-size: 1.2rem;
    }
    
    .auth-form input {
        padding: 0.8rem 0.9rem;
        font-size: 0.9rem;
    }
    
    .auth-btn {
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
    }
}
