/**
 * Synaptic Hub - Landing Page + Login Modal
 */

body { overflow: hidden; position: relative; }

/* ── Neural Canvas ── */
#neural-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
}

.gradient-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(108, 92, 231, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(0, 206, 201, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(108, 92, 231, 0.08) 0%, transparent 40%);
    z-index: 1;
    pointer-events: none;
}

/* ── Content ── */
.content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    text-align: center;
}

/* ── Logo ── */
.logo-container {
    margin-bottom: 2rem;
    animation: fadeInDown 1s ease-out;
}

.logo-svg {
    width: 80px; height: 80px;
    filter: drop-shadow(0 0 30px rgba(108, 92, 231, 0.5));
    animation: pulse-glow 3s ease-in-out infinite;
}

.brand-name {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-top: 1rem;
    background: linear-gradient(135deg, var(--text) 0%, var(--primary-light) 50%, var(--accent) 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 4s ease infinite, fadeInDown 1s ease-out 0.2s both;
}

.tagline {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    font-weight: 300;
    color: var(--text-dim);
    margin-top: 0.5rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    animation: fadeInDown 1s ease-out 0.4s both;
}

/* ── Status Card ── */
.status-card {
    margin-top: 3rem;
    padding: 2rem 3rem;
    background: var(--bg-card);
    border: 1px solid rgba(108, 92, 231, 0.2);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    animation: fadeInUp 1s ease-out 0.6s both;
    position: relative;
    overflow: hidden;
}

.status-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--accent), transparent);
    animation: scan-line 3s linear infinite;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(0, 206, 201, 0.1);
    border: 1px solid rgba(0, 206, 201, 0.3);
    border-radius: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.status-dot {
    width: 8px; height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: blink 2s ease-in-out infinite;
    box-shadow: 0 0 8px var(--accent-glow);
}

.coming-soon {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.description {
    color: var(--text-dim);
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 400px;
    margin-bottom: 1.5rem;
}

/* ── Login Button ── */
.login-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 4px 16px rgba(108, 92, 231, 0.3);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(108, 92, 231, 0.5);
}

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

/* ── Contact ── */
.contact {
    margin-top: 3rem;
    animation: fadeInUp 1s ease-out 0.8s both;
}

.contact a {
    color: var(--primary-light);
    text-decoration: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    padding: 0.6rem 1.5rem;
    border: 1px solid rgba(108, 92, 231, 0.3);
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    display: inline-block;
}

.contact a:hover {
    background: rgba(108, 92, 231, 0.15);
    border-color: var(--primary-light);
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.2);
    transform: translateY(-2px);
}

/* ── Footer ── */
.footer {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    color: var(--text-dim);
    font-size: 0.75rem;
    opacity: 0.5;
    animation: fadeIn 1s ease-out 1.2s both;
}

/* ═══════════════════════════════════════════
   LOGIN MODAL
   ═══════════════════════════════════════════ */

.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 1rem;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.modal-overlay.active .modal-card {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem; right: 1rem;
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    line-height: 1;
}

.modal-close:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

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

.modal-logo {
    width: 48px; height: 48px;
    margin-bottom: 0.75rem;
    filter: drop-shadow(0 0 16px rgba(108, 92, 231, 0.4));
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

/* ── Form ── */
.form-group {
    margin-bottom: 1.25rem;
}

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

.form-group input {
    width: 100%;
    padding: 0.85rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all var(--transition);
    outline: none;
}

.form-group input::placeholder {
    color: var(--text-dim);
}

.form-group input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
    background: rgba(255, 255, 255, 0.08);
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    transition: color var(--transition);
}

.password-toggle:hover {
    color: var(--text);
}

.form-error {
    color: var(--danger);
    font-size: 0.85rem;
    min-height: 1.25rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.submit-btn {
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 48px;
}

.submit-btn:hover:not(:disabled) {
    box-shadow: 0 4px 20px rgba(108, 92, 231, 0.4);
    transform: translateY(-1px);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-loader {
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ── Animations ── */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 0.5; }
}
@keyframes pulse-glow {
    0%, 100% { filter: drop-shadow(0 0 20px rgba(108, 92, 231, 0.4)); }
    50% { filter: drop-shadow(0 0 40px rgba(108, 92, 231, 0.7)); }
}
@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}
@keyframes scan-line {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Mobile ── */
@media (max-width: 600px) {
    .status-card { padding: 1.5rem; }
    .logo-svg { width: 60px; height: 60px; }
    .modal-card { padding: 2rem 1.5rem; }
}
