/* --- Custom Text Selection --- */
::selection {
    background-color: var(--bg-base); /* Bright white highlight */
    color: #000; /* Black text for high contrast */
}

/* Firefox support */
::-moz-selection {
    background-color: rgba(255, 255, 255, 0.99);
    color: #000;
}

/* --- Dashboard Intro (Login Screen - Orion Style) --- */
.dashboard-intro {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background-color: var(--bg-raised);
    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: 40px 40px;
    display: flex;
    align-items: center; /* Back to center to ensure vertical fit */
    justify-content: center;
    color: white;
    padding-top: 2vh; /* Minimal top padding */
    overflow: hidden;
}

.intro-container {
    display: flex;
    width: 90%;
    max-width: 1200px;
    height: 90vh; /* Allow more height but centered */
    gap: 4rem;
    align-items: center;
    margin: 0 auto;
}

.intro-left {
    flex: 1.2;
    display: flex;
    flex-direction: column;
}

.intro-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem; /* Tightened */
}

.brand-logo-small img {
    width: 16px;
    height: 30px;
    transition: transform 0.3s ease;
}

.intro-brand span {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.6rem; /* Increased from 1.1rem */
    letter-spacing: 1px;
}

.intro-headline {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 3.5vw, 3rem); /* Scaled down slightly */
    line-height: 1.1;
    margin-bottom: 1rem;
    font-weight: 600;
}

.intro-subtext {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 2rem; /* Reduced margin */
}

.intro-form {
    max-width: 380px;
}

.intro-form-group {
    margin-bottom: 1.2rem; /* Reduced margin */
}

.intro-form-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.intro-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px; /* Reduced padding */
    color: white;
    outline: none;
    transition: border-color 0.3s;
}

.intro-input:focus {
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-intro-primary {
    display: block;
    width: 100%;
    padding: 12px; /* Reduced padding */
    background: white;
    color: black;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    border-radius: 10px;
    margin-bottom: 0.8rem;
    transition: transform 0.2s;
}

.btn-intro-primary:hover {
    transform: translateY(-2px);
}

.intro-terms {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.4;
    margin-top: 1.5rem; /* Space from footer links */
}

.intro-terms a {
    color: white;
    text-decoration: none;
}

.intro-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1.2rem 0; /* Reduced margin */
    color: var(--text-muted);
    font-size: 0.75rem;
}

.btn-intro-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 10px; /* Reduced padding */
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 1.5rem; /* Reduced margin */
    transition: background 0.3s;
}

.btn-intro-google:hover {
    background: rgba(255, 255, 255, 0.05);
}

.btn-intro-google i {
    font-size: 1rem;
    color: #4285F4;
    /* Google Blue */
}

.intro-footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 20px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 0.85rem;
    width: fit-content; /* Shrink to fit content */
    margin: 0 auto; /* Center horizontally */
}

.login-link-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    padding: 4px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

/* --- Arch Window (Right Side) --- */
.intro-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.arch-window {
    position: relative;
    width: 100%;
    max-width: 450px;
    height: 80vh;
    border-top-left-radius: 225px;
    border-top-right-radius: 225px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.arch-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.arch-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #050505 0%, transparent 40%);
}

.scan-line {
    position: absolute;
    top: 40%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 10px white;
    animation: scan 8s linear infinite;
}

@keyframes scan {
    0% {
        top: 10%;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        top: 90%;
        opacity: 0;
    }
}

.coord-tag {
    position: absolute;
    bottom: 40px;
    right: 40px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-family: monospace;
    font-size: 0.75rem;
    color: #00ff00;
    /* Neon tech green */
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.arch-grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
}


/* ===========================
   TABLET (≤ 1024px)
=========================== */
@media (max-width: 1024px) {

    .intro-container {
        gap: 2.5rem;
        width: 95%;
    }

    .intro-headline {
        font-size: clamp(1.8rem, 4vw, 2.5rem);
    }

    .arch-window {
        height: 70vh;
        max-width: 380px;
    }

    .intro-brand span {
        font-size: 1.4rem;
    }

    .intro-subtext {
        font-size: 0.95rem;
    }
}


/* ===========================
   MOBILE (≤ 768px)
=========================== */
@media (max-width: 768px) {

    .dashboard-intro {
        align-items: flex-start;
        padding: 20px 16px;
        overflow-y: auto;
    }

    .intro-container {
        flex-direction: column;
        height: auto;
        width: 100%;
        gap: 2rem;
    }

    /* LEFT SECTION */
    .intro-left {
        flex: unset;
        width: 100%;
        text-align: center;
        align-items: center;
    }

    .intro-brand {
        justify-content: center;
    }

    .intro-headline {
        font-size: 1.8rem;
        line-height: 1.2;
    }

    .intro-subtext {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .intro-form {
        width: 100%;
        max-width: 100%;
    }

    .intro-form-group label {
        text-align: left;
    }

    /* BUTTONS */
    .btn-intro-primary,
    .btn-intro-google {
        padding: 12px;
        font-size: 0.95rem;
    }

    .intro-footer-links {
        flex-direction: column;
        gap: 8px;
        padding: 12px;
        width: 100%;
    }

    .intro-terms {
        font-size: 0.65rem;
    }

    /* RIGHT SECTION HIDDEN OR MINIMAL */
    .intro-right {
        display: none;
    }
}


/* ===========================
   SMALL MOBILE (≤ 480px)
=========================== */
@media (max-width: 480px) {

    .intro-headline {
        font-size: 1.5rem;
    }

    .intro-brand span {
        font-size: 1.2rem;
    }

    .intro-input {
        padding: 10px;
        font-size: 0.9rem;
    }

    .btn-intro-primary,
    .btn-intro-google {
        font-size: 0.9rem;
    }

    .intro-divider {
        font-size: 0.7rem;
    }

    .intro-terms {
        font-size: 0.6rem;
    }
}