/* Professional Minimal Auth Page */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    min-height: 100vh;
    line-height: 1.6;
}

/* Local theme variables to match site (fallbacks if global variables aren't loaded) */
:root {
    --primary-cyan: #00fff9;
    --primary-magenta: #ff0080;
    --dark-bg: #0a0a0a;
    --gray-800: #1a1a1a;
    --gray-700: #2a2a2a;
    --gray-600: #3a3a3a;
    --gray-200: #cccccc;
    --white: #ffffff;
}

/* Split screen layout */
.auth-page-container {
    display: flex;
    min-height: 100vh;
}

/* LEFT SIDE - Branding */
.auth-branding-side {
        flex: 1;
        /* Minimal cyberpunk: dark gradient with subtle glows */
        background:
            radial-gradient(900px 500px at 20% 20%, rgba(0,255,249,0.07), transparent 55%),
            radial-gradient(700px 400px at 80% 70%, rgba(255,0,128,0.05), transparent 60%),
            linear-gradient(135deg, #0a0a0a 0%, #0e0e0e 100%);
        padding: 4rem;
        display: flex;
        flex-direction: column;
        justify-content: center; /* center vertically for balance */
        align-items: center;
        position: relative;
        color: var(--white);
        border-right: 1px solid rgba(0,255,249,0.18);
}

.auth-branding-side::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    /* faint scanlines overlay */
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0,255,249,0.03) 2px,
        rgba(0,255,249,0.03) 4px
    );
}

.branding-content {
    position: relative;
    z-index: 1;
    max-width: 500px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.brand-logo {
    margin-bottom: 1rem;
}

.brand-logo h1 {
        font-family: 'Orbitron', monospace;
        font-size: 3.2rem;
        font-weight: 900;
        margin-bottom: 1rem;
        letter-spacing: 2px;
        color: var(--primary-cyan);
        text-shadow:
            0 0 12px rgba(0,255,249,0.35),
            0 0 2px rgba(255,255,255,0.35);
        line-height: 1;
}

.brand-logo .tagline {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    opacity: 0.95;
    letter-spacing: 1px;
    line-height: 1.3;
    color: var(--primary-magenta);
}

.brand-logo .subtitle {
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.85;
    line-height: 1.7;
    max-width: 420px;
    margin: 0.25rem auto 0;
    color: #b6eaff;
}

/* Why Sign In Button */
.why-signin-button {
    margin-top: 2rem;
    padding: 0.85rem 1.25rem;
    background: transparent;
    border: 1.5px solid rgba(0,255,249,0.5);
    border-radius: 10px;
    color: var(--white);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 0 0 rgba(0,0,0,0);
}

.why-signin-button:hover {
    background: rgba(0,255,249,0.08);
    border-color: var(--primary-cyan);
    transform: translateY(-1px);
    box-shadow: 0 0 18px rgba(0,255,249,0.18);
}

/* Benefits Popup Modal */
.benefits-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

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

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

.benefits-popup {
    background: #111418;
    border: 1.5px solid rgba(0,255,249,0.35);
    border-radius: 14px;
    padding: 2rem;
    max-width: 520px;
    width: 92%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0,255,249,0.12);
    animation: slideUp 0.4s ease;
    position: relative;
}

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

.popup-header {
    text-align: center;
    margin-bottom: 2rem;
}

.popup-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.popup-header p {
    font-size: 1rem;
    color: #9ca3af;
}

.popup-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.popup-close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.popup-benefits {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.popup-benefit-item {
    display: flex;
    align-items: flex-start;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.popup-benefit-item:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.benefit-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: linear-gradient(135deg, rgba(0,255,249,0.18) 0%, rgba(255,0,128,0.18) 100%);
    border: 1px solid rgba(0,255,249,0.35);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    box-shadow: 0 4px 12px rgba(0,255,249,0.18);
}

.benefit-icon svg {
    width: 24px;
    height: 24px;
    fill: #ffffff;
}

.benefit-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.4rem;
}

.benefit-content p {
    font-size: 0.95rem;
    color: #9ca3af;
    line-height: 1.5;
}

.brand-features {
    display: none;
}

/* Hide old features section - using popup now */
.features-header,
.feature-item,
.feature-icon,
.feature-content {
    display: none;
}

.feature-text h3 {
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.feature-text p {
    font-size: 0.95rem;
    opacity: 0.9;
    line-height: 1.5;
    font-weight: 300;
}

.feature-text p {
    font-size: 0.95rem;
    opacity: 0.85;
}

/* RIGHT SIDE - Form */
.auth-form-side {
    flex: 1;
    background: #0a0a0a;
    padding: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-container {
    width: 100%;
    max-width: 420px;
}

.form-header {
    margin-bottom: 2.5rem;
}

.form-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.form-header p {
    font-size: 1rem;
    color: #9ca3af;
}

/* Tabs */
.auth-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: #1a1a1a;
    padding: 0.35rem;
    border-radius: 10px;
}

.auth-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: #9ca3af;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 8px;
}

.auth-tab.active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(0,255,249,0.18) 0%, rgba(255,0,128,0.18) 100%);
    box-shadow: 0 4px 12px rgba(0, 255, 249, 0.2);
    border: 1px solid rgba(0,255,249,0.35);
}

.auth-tab:hover:not(.active) {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

/* Forms */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #d1d5db;
    font-size: 0.875rem;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: #1a1a1a;
    border: 1.5px solid #2a2a2a;
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    background: #0a0a0a;
}

.form-group input::placeholder {
    color: #6b7280;
}

/* Buttons */
.auth-button {
    width: 100%;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.auth-button:active {
    transform: scale(0.98);
}

.auth-button.primary {
    background: #667eea;
    color: #ffffff;
    margin-bottom: 0.75rem;
}

.auth-button.primary:hover {
    background: #5568d3;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.auth-button.secondary {
    background: transparent;
    border: 1.5px solid #2a2a2a;
    color: #d1d5db;
    margin-bottom: 1.5rem;
}

.auth-button.secondary:hover {
    background: #1a1a1a;
    border-color: #3a3a3a;
}

.auth-button.google {
    background: #ffffff;
    color: #3c4043;
    margin-bottom: 0.75rem;
    border: 1.5px solid #d1d5db;
}

.auth-button.google:hover {
    background: #f9fafb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.auth-button.github {
    background: #24292e;
    color: #ffffff;
    margin-bottom: 1.5rem;
}

.auth-button.github:hover {
    background: #1b1f23;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.auth-button.guest {
    background: transparent;
    border: 1.5px solid #2a2a2a;
    color: #9ca3af;
}

.auth-button.guest:hover {
    background: #1a1a1a;
    border-color: #3a3a3a;
    color: #d1d5db;
}

.button-icon {
    width: 18px;
    height: 18px;
}

.button-icon svg {
    width: 100%;
    height: 100%;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.75rem 0;
    color: #6b7280;
    font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #2a2a2a;
}

.auth-divider span {
    padding: 0 1rem;
}

/* Messages */
.auth-message {
    padding: 0.875rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    border: 1px solid;
}

.auth-message.success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.auth-message.error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.auth-message.hidden {
    display: none;
}

/* Footer */
.auth-footer {
    margin-top: 2rem;
    text-align: center;
}

.guest-note {
    color: #9ca3af;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.back-home {
    text-align: center;
    margin-top: 2rem;
}

.back-home a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.back-home a:hover {
    color: #667eea;
}

/* Responsive */
@media (max-width: 1024px) {
    .auth-page-container {
        flex-direction: column;
    }

    .auth-branding-side {
        padding: 3rem 2rem;
        min-height: 40vh;
    }

    .brand-logo h1 {
        font-size: 2.5rem;
    }

    .brand-features {
        display: none;
    }

    .auth-form-side {
        padding: 3rem 2rem;
    }
}

@media (max-width: 768px) {
    .auth-branding-side {
        padding: 2rem 1.5rem;
    }

    .brand-logo h1 {
        font-size: 2rem;
    }

    .auth-form-side {
        padding: 2rem 1.5rem;
    }

    .form-header h2 {
        font-size: 1.75rem;
    }
}

/* Loading state */
.auth-button.loading {
    opacity: 0.7;
    pointer-events: none;
}

.auth-button.loading::after {
    content: '';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: translateY(-50%) rotate(360deg); }
}
