/* Authentication Pages Styles */

.auth-card {
    max-width: 400px;
    width: 100%;
    padding: 1.5rem;
    background: var(--surface);
    border-radius: 1rem;
    border: 1px solid var(--primary);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.3s ease-out;
}

/* Soft glow effect for auth card */
.auth-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 1rem;
    padding: 1px;
    background: linear-gradient(135deg, 
        var(--accent-blue) 0%, 
        var(--accent-purple) 50%, 
        var(--accent-blue) 100%);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: xor;
    opacity: 0.3;
    pointer-events: none;
}

.auth-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: var(--surface-hover);
    border: 1px solid var(--primary);
    border-radius: 0.5rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.auth-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.auth-input::placeholder {
    color: var(--text-tertiary);
}

/* Google Button */
.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    background: var(--surface-hover);
    border: 1px solid var(--primary);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.google-btn:hover {
    background: var(--surface);
    border-color: var(--accent-blue);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.google-btn:active {
    transform: translateY(0);
}

/* Divider */
.divider {
    position: relative;
    text-align: center;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--primary);
}

.divider-text {
    position: relative;
    display: inline-block;
    padding: 0 1rem;
    background: var(--surface);
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading Spinner */
.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Success and Error Messages */
#error-message,
#success-message {
    animation: slideInDown 0.3s ease-out;
}

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

/* Checkbox styling */
input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--accent-blue);
    cursor: pointer;
}

/* Form labels */
label {
    color: var(--text-primary);
}

/* Links in auth forms */
.auth-card a {
    text-decoration: none;
    transition: all 0.2s ease;
}

.auth-card a:hover {
    opacity: 0.8;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .auth-card {
        padding: 1.25rem;
        margin: 1rem;
    }
}

/* Dark mode specific adjustments */
[data-theme="dark"] .auth-card {
    background: rgba(17, 24, 39, 0.95);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .auth-input {
    background: rgba(31, 41, 55, 0.5);
}

[data-theme="dark"] .google-btn {
    background: rgba(31, 41, 55, 0.5);
}

[data-theme="dark"] .google-btn:hover {
    background: rgba(31, 41, 55, 0.8);
}

/* User Profile Dropdown */
.user-dropdown {
    position: relative;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid var(--accent-blue);
    transition: all 0.2s ease;
}

.user-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.user-initial {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-initial:hover {
    transform: scale(1.05);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 200px;
    /* Use near-opaque nav background so content behind doesn't show through */
    background: var(--bg-nav);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--primary);
    border-radius: 0.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 9999;
}

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

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border-left: 3px solid transparent;
}

.dropdown-item:hover,
.dropdown-item:focus-visible {
    /* Stronger, clearer highlight */
    background: var(--bg-surface-hover);
    border-left-color: var(--primary);
    color: var(--text-primary);
    font-weight: 600;
    outline: none;
}

.dropdown-item:first-child {
    border-radius: 0.5rem 0.5rem 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 0.5rem 0.5rem;
}

/* Ensure button dropdown items have same styling as links */
button.dropdown-item {
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    font-family: inherit;
    font-size: inherit;
}

.dropdown-divider {
    height: 1px;
    background: var(--primary);
    margin: 0.25rem 0;
}