/* Best Results tips styling */
.we-dont-spam {
    text-align: center;
    max-width: 460px;
    margin: 12px auto 0;
    margin-top: 20px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-muted, #cbd5e1);
    /* yellow highlighter background */
    background: rgba(38, 148, 175, 0.503);
    border: 1px solid rgba(38, 148, 175, 0.503);
    border-radius: 10px;
    padding: 12px 14px;
}


/* Best Results tips styling */
.best-results {
    text-align: left;
    max-width: 720px;
    margin: 12px auto 0;
    margin-top: 20px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-muted, #cbd5e1);
    /* yellow highlighter background */
    background: rgba(250, 204, 21, 0.10); /* amber with low alpha */
    border: 1px solid rgba(250, 204, 21, 0.32);
    border-radius: 10px;
    padding: 12px 14px;
}

.best-results-title {
    font-weight: 700;
    color: var(--text, #e2e8f0);
    margin-bottom: 6px;
}

.best-results ul {
    margin: 0;
    padding-left: 1.25rem;
}

.best-results li {
    margin: 4px 0;
}
/* ========================================================================= */
/* 1. BASE STYLES, VARIABLES & GLOBAL RESET                                  */
/* ========================================================================= */

/* Ensure both HTML and BODY participate in full-height layouts */
html,
body {
    height: 100%;
    min-height: 100%;
    margin: 0;
}

/* 100% Viewport Height (HTML and BODY must cooperate) */
html {
    height: 100%;
}

:root {
    color-scheme: dark;
    --bg-color: #0c0d0f;
    --panel-color: rgba(16, 18, 22, 0.9);
    --accent-color: #2f7bff;
    --text-color: #f5f7fb;
    --muted-color: #b5bccb;
    font-family: "Inter", "Segoe UI", Tahoma, sans-serif;
}

/* Global Reset (from INDEX page) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Dark theme body styling (Base for all pages) */
body.dark-theme {
    min-height: 100vh;
    /* Fills screen even if content is sparse */
    height: 100%;
    background: radial-gradient(circle at top, #1a1d24, #090a0c 55%);
    color: var(--text-color);
    font-family: "Inter", "Segoe UI", Tahoma, sans-serif;
}

/* Brand button - moved to components.css */

/* ========================================================================= */
/* 2. PAGE LAYOUT CONTAINERS (Scoped by Body Class)                          */
/* ========================================================================= */

.container {
    background: var(--panel-color);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    position: relative;
    /* IMPORTANT: no overflow hidden here so large decorative layers (model) aren't clipped */
}

/* INDEX Page Layout */
body.dark-theme.index-page-layout {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-color: var(--bg-color, #111113);
}

body.dark-theme.index-page-layout .container {
    max-width: 700px;
    width: 100%;
    padding: 50px 40px;
}

/* LANDING Page Layout (Vertical Centering + Full Height) */
body.dark-theme.landing-page-layout {
    height: 100vh;
    /* Force full viewport height */
    min-height: 100vh;
    /* Prevent collapse on mobile UI chrome changes */
    display: grid;
    grid-template-rows: 1fr auto;
    /* main content area + footer */
    justify-items: center;
    /* center horizontally */
    align-items: center;
    /* center items within their rows */
    /* DO NOT hide overflow on body; we want the decorative model to be able to extend */
}

/* BACKGROUND POINT CLOUD (Three.js) — fixed, full-viewport, behind content */
#bg-canvas-wrap {
    position: fixed;
    inset: 0;
    z-index: 0;
    /* ensure it sits behind overlay content */
    pointer-events: none;
}

#bg-canvas-wrap canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* LANDING container — keep overflow visible so the model can extend beyond content */
body.dark-theme.landing-page-layout .container {
    width: 600px;
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: visible;
    /* key: allow #landing-model to exceed the container bounds */
}

/* LANDING footer container sits at the bottom of the viewport */
body.dark-theme.landing-page-layout .landing-footer {
    width: 600px;
    max-width: 100%;
    margin-bottom: 16px;
    padding: 0 auto;
    /* spacing from the very bottom */
}

/* Ensure landing main content and footer layer above the background canvas */
.landing-main,
.landing-footer {
    position: relative;
    z-index: 2;
}


/* ========================================================================= */
/* 3. TYPOGRAPHY & HEADINGS (Scoped by Body Class)                           */
/* ========================================================================= */

h1 {
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #ffffff 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

/* INDEX Page H1 */
body.dark-theme.index-page-layout h1 {
    font-size: 2.5rem;
    text-align: center;
}

/* LANDING Page H1 */
body.dark-theme.landing-page-layout h1 {
    font-optical-sizing: auto;
    font-size: 4rem;
    font-weight: 400;
    margin-bottom: 20px;
}

/* Landing Page Logo */
.pc3d {
    position: relative;
    display: inline-block;
    line-height: 1;
    font-family: 'Orbitron', Tahoma, sans-serif;
    font-size: 3.5rem;
    font-weight: 900;
}

.pc3d__face {
    position: relative;
    display: inline-block;
    /* Slightly more saturated gradient for pop */
    background: linear-gradient(180deg, #81baff 0%, #448aff 60%, #296fd7 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;

    /* Enhanced Bevel: multiple stacked shadows for depth and shine */
    text-shadow:
        -1px -1px 0 rgba(255, 255, 255, 0.7),
        /* Brightest top-left highlight */
        -2px -2px 0 rgba(255, 255, 255, 0.35),
        /* Softer inner bevel */
        1px 1px 0 #1a5bcc,
        /* Dark bottom-right edge (shadow/rim) */
        3px 3px 2px rgba(0, 0, 0, 0.25);
    /* Contact shadow for lift */
}

/* Extrusion: offset copy with stacked text-shadows */
.pc3d__extrude {
    position: absolute;
    inset: 0;
    z-index: -1;
    /* Slightly darker blue for contrast and depth */
    color: #0052e2;
    -webkit-text-fill-color: #0052e2;
    transform: translate(5px, 5px);
    /* Increased extrusion length and angle */

    /* Stack of flat shadows to simulate depth (reduced stack for efficiency) */
    text-shadow:
        1px 1px 0 #0052e2,
        2px 2px 0 #0052e2,
        3px 3px 0 #0052e2,
        4px 4px 0 #0052e2,
        5px 5px 0 #0052e2,
        /* Enhanced ground shadow: larger blur, softer color */
        6px 7px 8px rgba(0, 0, 0, 0.45);
}

/* crisper edge on low-dpi displays (kept from original) */
@supports (-webkit-text-stroke: 0.5px #1a5bcc) {
    .pc3d__face {
        -webkit-text-stroke: 0.35px rgba(0, 0, 0, 0.15);
    }
}



/* INDEX Page Subtitle */
.subtitle {
    text-align: center;
    color: var(--muted-color);
    margin-bottom: 40px;
    font-size: 1.05rem;
    line-height: 1.6;
}

/* LANDING Page Taglines */
.tagline-wrapper {
    padding: 10px 20px;
}

.tagline {
    font-size: 1.5rem;
    line-height: 1.6;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

/* ========================================================================= */
/* 4. LANDING PAGE SPECIFIC CONTENT                                          */
/* ========================================================================= */

/* Make the 3D model a full-viewport decorative layer that is NOT clipped by .container */
#landing-model {
    position: fixed;
    /* detach from container; anchor to viewport */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* center in viewport */
    width: 80vmax;
    /* cover both axes regardless of aspect */
    height: 80vmax;
    z-index: 1;
    /* behind content-wrapper (z-index:2) */
    pointer-events: none;
    --mv-poster-background: transparent;
}

/* Foreground content card */
.content-wrapper {
    position: relative;
    z-index: 2;
    padding-top: 40px;
    padding-bottom: 30px;
    background: rgba(18, 20, 26, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 24px;
    box-sizing: border-box;
}

/* CTA Button - moved to components.css as .btn-primary */

.footer-wrapper {
    padding: 20px;
}

.footer-link {
    padding: 20px;
    color: grey;
    text-decoration: none;
    font-weight: 100;
}

.footer-link:hover {
    color: #4d8fff;
}

/* ========================================================================= */
/* 5. INDEX UPLOAD & FORM STYLES - Most moved to components.css             */
/* ========================================================================= */

/* Status/Message Box Styles - Page Specific */
#status-message {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 12px;
    margin-top: 12px;
}

#status-detail {
    color: var(--muted-color);
    font-size: 1rem;
}

/* ========================================================================= */
/* 6. VIEWER PAGE SPECIFIC                                                   */
/* ========================================================================= */

body.dark-theme.viewer-page-layout {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: none;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    position: relative;
}

.viewer-wrapper {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: var(--panel-color);
    overflow: hidden;
}

model-viewer {
    width: 100%;
    height: 100%;
    /* background: linear-gradient(180deg, #20242c 0%, #10121a 100%); */
}

model-viewer::part(default-progress-bar) {
    display: none;
}

/* Overlay, Spinner, Footer - moved to components.css */

/* ========================================================================= */
/* 7. PRIVACY PAGE SPECIFIC                                                  */
/* ========================================================================= */

body.dark-theme.privacy-page-layout {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 80px 20px 60px;
    min-height: 100vh;
    background: radial-gradient(circle at top, #1a1d24, #090a0c 55%);
}

body.dark-theme.privacy-page-layout .card {
    background: var(--panel-color) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    min-height: 200px;
    display: block !important;
}

body.dark-theme.privacy-page-layout .card-body {
    padding: 40px;
    display: block !important;
    color: var(--text-color) !important;
    max-width: 900px;
}

body.dark-theme.privacy-page-layout .card-body * {
    color: var(--text-color) !important;
}

.privacy-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 8px;
}

.privacy-meta {
    text-align: center;
    color: var(--muted-color);
    font-size: 0.95rem;
    margin-bottom: 40px;
}

.privacy-section-title {
    color: var(--text-color);
    font-size: 1.75rem;
    font-weight: 600;
    margin-top: 40px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.privacy-subsection-title {
    color: var(--text-color);
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 12px;
}

.privacy-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--border-radius-sm, 12px);
    overflow: hidden;
}

.privacy-table th,
.privacy-table td {
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px 16px;
    text-align: left;
    color: var(--text-color);
}

.privacy-table th {
    background: rgba(47, 123, 255, 0.15);
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
}

.privacy-table td {
    font-size: 0.9rem;
    line-height: 1.6;
}

.privacy-note {
    margin: 24px 0;
}

.privacy-note-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
}

body.dark-theme.privacy-page-layout ul {
    margin: 16px 0;
    padding-left: 24px;
}

body.dark-theme.privacy-page-layout li {
    margin: 8px 0;
    line-height: 1.7;
    color: var(--text-color);
}

body.dark-theme.privacy-page-layout p {
    margin: 12px 0;
    line-height: 1.7;
    color: var(--text-color);
}

/* ========================================================================= */
/* 8. MEDIA QUERIES                                                          */
/* ========================================================================= */

@media (max-width: 640px) {

    /* INDEX & LANDING H1 adjustments */
    body.dark-theme.index-page-layout h1 {
        font-size: 2rem;
    }

    body.dark-theme.landing-page-layout h1 {
        font-size: 2rem;
    }

    /* INDEX Container adjustments */
    body.dark-theme.index-page-layout .container {
        padding: 40px 24px;
    }

    /* LANDING Container adjustments */
    .tagline {
        font-size: 1.1rem;
    }

    .content-wrapper {
        padding: 40px 30px;
    }

    /* Make sure the decorative model still covers small devices */
    #landing-model {
        width: 200vmax;
        height: 200vmax;
    }

    /* PRIVACY Page adjustments */
    body.dark-theme.privacy-page-layout {
        padding: 60px 20px 40px;
    }

    body.dark-theme.privacy-page-layout .card-body {
        padding: 30px 20px;
    }

    .privacy-title {
        font-size: 1.75rem;
    }

    .privacy-section-title {
        font-size: 1.35rem;
    }

    .privacy-table {
        font-size: 0.8rem;
        display: block;
        overflow-x: auto;
    }

    .privacy-table th,
    .privacy-table td {
        padding: 8px 10px;
    }
}