/* User Authentication Styles */

/* Auth Overlay */
.user-auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 10, 20, 0.95), rgba(10, 20, 40, 0.95));
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    animation: fadeIn 0.3s ease-out;
}

.user-auth-overlay.hidden {
    display: none;
}

/* Auth Modal */
.user-auth-modal {
    background: linear-gradient(135deg, rgba(10, 20, 40, 0.98), rgba(20, 30, 50, 0.98));
    border: 3px solid var(--primary-color);
    border-radius: 30px;
    padding: 3rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 0 100px var(--glow-color);
    animation: slideUp 0.5s ease-out;
    position: relative;
}

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

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

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

.auth-logo {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.auth-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* Auth Form */
.user-auth-form {
    margin-bottom: 1.5rem;
}

.auth-form-group {
    margin-bottom: 1.5rem;
}

.auth-form-group label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.auth-form-group input {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 217, 255, 0.05);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.auth-form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(0, 217, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
}

.auth-form-group input::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

.auth-error {
    color: var(--danger-color);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    min-height: 20px;
    text-align: center;
}

.auth-success {
    color: var(--success-color);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-align: center;
}

/* Auth Button */
.auth-btn {
    width: 100%;
    padding: 1.2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 30px var(--glow-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.auth-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 50px var(--primary-color);
}

.auth-btn:active {
    transform: translateY(-1px);
}

.auth-btn-icon {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.auth-btn:hover .auth-btn-icon {
    transform: translateX(5px);
}

/* Social Auth Buttons */
.social-auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.social-auth-btn {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.social-auth-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.social-auth-btn.google {
    border-color: #4285f4;
}

.social-auth-btn.google:hover {
    border-color: #4285f4;
    box-shadow: 0 5px 20px rgba(66, 133, 244, 0.3);
}

.social-auth-btn.facebook {
    border-color: #1877f2;
}

.social-auth-btn.facebook:hover {
    border-color: #1877f2;
    box-shadow: 0 5px 20px rgba(24, 119, 242, 0.3);
}

.social-icon {
       width: 20px;
       height: 20px;
       display: flex;
       align-items: center;
       justify-content: center;
   }
   
   .social-icon svg {
       width: 100%;
       height: 100%;
}

/* Auth Divider */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: var(--text-secondary);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(0, 217, 255, 0.2);
}

.auth-divider span {
    padding: 0 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Auth Toggle */
.auth-toggle {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 217, 255, 0.2);
}

.auth-toggle p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.auth-toggle-link {
    color: var(--primary-color);
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.auth-toggle-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* User Dashboard Panel */
.user-dashboard-panel {
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.1), rgba(123, 47, 247, 0.1));
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 217, 255, 0.2);
}

.user-welcome {
    text-align: center;
    margin-bottom: 2rem;
}

.user-welcome h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.user-welcome p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.user-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.user-stat-card {
    background: rgba(0, 217, 255, 0.05);
    border: 2px solid rgba(0, 217, 255, 0.2);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.user-stat-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 217, 255, 0.3);
}

.user-stat-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.user-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.3rem;
}

.user-stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.user-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.user-action-btn {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.user-action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px var(--primary-color);
}

.user-action-btn.secondary {
    background: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.user-action-btn.secondary:hover {
    background: rgba(0, 217, 255, 0.1);
}

/* User Menu */
.user-menu {
    position: relative;
    display: inline-block;
}

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: rgba(0, 217, 255, 0.1);
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-menu-trigger:hover {
    background: rgba(0, 217, 255, 0.2);
    box-shadow: 0 5px 20px rgba(0, 217, 255, 0.3);
}

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

.user-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: rgba(10, 20, 40, 0.98);
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 1000;
}

.user-menu-dropdown.active {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-menu-item {
    padding: 1rem 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border-bottom: 1px solid rgba(0, 217, 255, 0.1);
}

.user-menu-item:last-child {
    border-bottom: none;
}

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

.user-menu-item.logout {
    color: var(--danger-color);
}

.user-menu-item.logout:hover {
    background: rgba(255, 0, 85, 0.1);
}

/* Auth Buttons in Navigation */
.btn-login,
.btn-signup {
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin-left: 0.5rem;
}

.btn-login {
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-login:hover {
    background: rgba(0, 217, 255, 0.1);
    transform: translateY(-2px);
}

.btn-signup {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: 2px solid var(--primary-color);
}

.btn-signup:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px var(--primary-color);
}

/* Hide auth buttons when user is logged in */
body.authenticated #authButtons {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .user-auth-modal {
        padding: 2rem 1.5rem;
        max-width: 95%;
    }

    .auth-logo {
        font-size: 3rem;
    }

    .auth-title {
        font-size: 1.6rem;
    }

    .social-auth-btn {
        font-size: 0.9rem;
        padding: 0.9rem;
    }

    .social-icon {
        font-size: 1.3rem;
    }

    .user-dashboard-panel {
        padding: 1.5rem;
    }

    .user-welcome h2 {
        font-size: 1.6rem;
    }

    .user-stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .user-actions {
        flex-direction: column;
    }

    .user-action-btn {
        width: 100%;
    }
    
    .btn-login,
    .btn-signup {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        margin-left: 0.3rem;
    }
}