/* /login (Components/MarketingPage.cs). First the app-wide rules the page's markup relies on (bootstrap's
   and app.css's .form-control, app.css's .form-group and .grid-overlay, the .stat-* rules of app.css and
   earnings-shared.css), copied in their old order; then the page's own rules, from Login.razor.css (moved
   there from the inline <style> block in Login.razor). Those selectors used to wrap one class in :where()
   so that Blazor's scope attribute left the specificity of that one class; now they are the plain class. */

:root {
    --bs-body-color: #212529;
    --bs-body-bg: #fff;
    --bs-border-width: 1px;
    --bs-border-color: #dee2e6;
    --bs-border-radius: 0.375rem;
    --bs-secondary-color: rgba(33, 37, 41, 0.75);
    --bs-secondary-bg: #e9ecef;
    --bg-surface: #0a0e14;
    --bg-elevated: #0f141c;
    --border: rgba(255, 255, 255, 0.06);
    --radius-md: 6px;
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --text-2xs: 0.625rem;
    --text-sm: 0.75rem;
    --tracking-widest: 0.1em;
    --leading-none: 1;
    --primary-glow: rgba(19, 223, 255, 0.2);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --transition-all: all 200ms var(--ease-out);
    --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
    --landing-text-muted: #5a6b7d;
    --landing-border: rgba(255, 255, 255, 0.06);
    --text-muted: var(--landing-text-muted);
    --border-light: var(--landing-border);
}

/* bootstrap 5.3.3. These two at their own weight (css/marketing.css has them as :where(), for the other pages):
   this page's rules are single classes, which they used to outrank */
[type=button]:not(:disabled), [type=reset]:not(:disabled), [type=submit]:not(:disabled), button:not(:disabled) {
    cursor: pointer;
}

button:focus:not(:focus-visible) {
    outline: 0;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--bs-body-color);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: var(--bs-body-bg);
    background-clip: padding-box;
    border: var(--bs-border-width) solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

@media (prefers-reduced-motion: reduce) {
    .form-control {
        transition: none;
    }
}

.form-control:focus {
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-control::placeholder {
    color: var(--bs-secondary-color);
    opacity: 1;
}

.form-control:disabled {
    background-color: var(--bs-secondary-bg);
    opacity: 1;
}

/* app.css. The link states at their own weight too: the Google button takes the hover colour, as it always has */
a:hover {
    color: var(--primary-hover);
}

a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

.form-control, .form-select {
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    padding: var(--space-2) var(--space-3);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
    transition: var(--transition-all);
}

.form-control:hover {
    border-color: var(--border-medium);
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-elevated);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-control::placeholder {
    color: var(--text-dim);
}

.form-control:disabled {
    background: var(--bg-base);
    color: var(--text-dim);
    cursor: not-allowed;
    opacity: 0.5;
}

.stat-label {
    font-size: var(--text-2xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--tracking-widest);
    color: var(--text-muted);
    margin-bottom: var(--space-1);
}

.stat-value {
    font-family: var(--font-mono);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: var(--tracking-tight);
    line-height: var(--leading-none);
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(var(--border-light) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-light) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.3;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* earnings-shared.css */
.stat-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.stat-value {
    font-weight: 600;
}

/* ---- the page's own rules (Login.razor.css) ---- */
.trading-login-container {
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #0f1419 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 20px;
}

.main-content {
    display: flex;
    gap: 40px;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
    position: relative;
    z-index: 10;
    height: 100%;
    max-height: 700px;
}

/* Enhanced Background Animation */
.bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.35;
    z-index: 1;
}

.chart-line {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, transparent, #13dfff, transparent);
    animation: scan 8s linear infinite;
}

.chart-line:nth-child(1) { top: 15%; animation-delay: 0s; }
.chart-line:nth-child(2) { top: 35%; animation-delay: 1.5s; }
.chart-line:nth-child(3) { top: 55%; animation-delay: 3s; }
.chart-line:nth-child(4) { top: 75%; animation-delay: 4.5s; }
.chart-line:nth-child(5) { top: 90%; animation-delay: 6s; }

.floating-numbers {
    position: absolute;
    width: 100%;
    height: 100%;
}

/* Floating mini charts */
.floating-charts {
    position: absolute;
    width: 100%;
    height: 100%;
}
.mini-chart.chart-3 { bottom: 20%; left: 10%; animation-delay: 4s; }

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 1;
}

.login-card {
    background: rgba(20, 25, 45, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px;
    width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5),
                0 0 80px rgba(19, 223, 255, 0.1);
    position: relative;
    z-index: 10;
    animation: slideUp 0.6s ease-out;
    flex-shrink: 0;
}

/* Reversal Showcase Container */
.reversal-showcase-container {
    flex: 1;
    max-width: 480px;
    position: relative;
    z-index: 10;
    animation: slideUp 0.6s ease-out 0.2s both;
}

.pillars-panel {
    padding: 28px;
    border-radius: 16px;
    border: 1px solid rgba(0, 205, 237, 0.2);
    background: rgba(13, 20, 33, 0.85);
    backdrop-filter: blur(12px);
}

.pillar-icon {
    font-size: 22px;
    line-height: 1;
}

.pillar-cta {
    display: block;
    margin-top: 8px;
    padding: 12px;
    border-radius: 10px;
    background: rgba(0, 205, 237, 0.12);
    color: #00cded;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
}

.brand-header {
    text-align: center;
    margin-bottom: 24px;
}

.brand-logo {
    margin: 0 0 10px;
    line-height: 0;
}

.brand-logo img {
    display: block;
    margin: 0 auto;
}

.tagline {
    color: #13dfff;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.forgot-link {
    display: inline-block;
    margin-top: 6px;
    font-size: 12px;
    color: #00cded;
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #13dfff, #1a8cff);
    border: none;
    border-radius: 8px;
    color: #0a0e27;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 20px;
}

.btn-login:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(19, 223, 255, 0.3);
}

.btn-login:active:not(:disabled) {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.social-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: #718096;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.social-divider::before,
.social-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.register-link {
    text-align: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.register-link a {
    color: #13dfff;
    font-weight: 600;
    text-decoration: none;
    margin-left: 6px;
    transition: all 0.3s ease;
}

.register-link a:hover {
    color: #00cded;
    text-decoration: underline;
}

.market-stats {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

@media (max-width: 1000px) {
    .main-content {
        flex-direction: column;
        max-height: none;
        gap: 24px;
    }

    .trading-login-container {
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
    }

    .login-card {
        width: 100%;
        max-width: 420px;
    }

    .reversal-showcase-container {
        max-width: 420px;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 24px;
    }

    .market-stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}
