﻿/* =========================================
   NexoGENO Studio - Stable Ocean Theme
   - High contrast
   - Screenshot-safe (no mask/backdrop/filter tricks)
   - Keeps functionality unchanged
   ========================================= */

:root {
    --bg-color: #0e2539;
    --panel-color: #17354d;
    --input-bg: #102c42;
    --text-main: #e7f2fb;
    --text-muted: #9fc0d7;

    --accent-blue: #1d88c7;
    --accent-blue-hover: #156996;
    --accent-green: #1fb892;
    --accent-orange: #f0a23a;
    --accent-red: #e45a6e;
    --accent-purple: #7d8ff1;
    --accent-yellow: #f1c755;

    --border-color: #2a5572;

    --ocean-bg-1: #0b2032;
    --ocean-bg-2: #12324a;
    --ocean-bg-3: #1a4664;
    --ocean-panel: #16344c;
    --ocean-panel-soft: #1a3c56;
    --ocean-ink: #e7f2fb;
    --ocean-sub: #9fc0d7;
    --ocean-border: #2b5876;
    --ocean-shadow: 0 12px 24px rgba(5, 17, 28, 0.35);
}

body {
    color: var(--ocean-ink);
    background: linear-gradient(155deg, var(--ocean-bg-1) 0%, var(--ocean-bg-2) 52%, var(--ocean-bg-3) 100%);
}

.navbar {
    background: linear-gradient(180deg, rgba(9, 28, 43, 0.96) 0%, rgba(7, 22, 35, 0.96) 100%);
    border-bottom: 1px solid var(--ocean-border);
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.28);
}

.navbar a {
    color: #b5d1e3;
    border: 1px solid transparent;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    position: relative;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
    transform-origin: center center;
}

.navbar a:hover {
    background: rgba(29, 136, 199, 0.16);
    border-color: rgba(73, 157, 207, 0.35);
    color: #eaf5fd;
    transform: translateY(-2px) scale(1.07);
    box-shadow: 0 9px 18px rgba(10, 43, 66, 0.42);
    z-index: 2;
}

.navbar a.active {
    background: linear-gradient(180deg, #2195d8 0%, #14689a 100%);
    border-color: rgba(190, 226, 247, 0.45);
    color: #ffffff;
    box-shadow: 0 6px 14px rgba(11, 69, 102, 0.38);
}

.container {
    padding: 18px 28px;
}

.homepage-hero,
.homepage-card,
.tool-panel,
.sidebar-panel,
.main-panel,
.load-box,
.coordsgen-card,
.coordsgen-block,
.coordsgen-result-card,
.manual-col,
.pca-panel,
.g25lab-card,
.g25comp-head,
.g25report-head,
.g25mix-head,
.g25comp-output,
.g25report-output,
.childsampler-panel,
.childsampler-card,
.childsampler-log-panel,
.hmv2-mode-panel,
.hmv2-pct-panel,
.hmv2-setting-box,
.matches-table-wrap,
.matches-modal-card {
    background: linear-gradient(180deg, var(--ocean-panel-soft) 0%, var(--ocean-panel) 100%) !important;
    border: 1px solid var(--ocean-border) !important;
    box-shadow: var(--ocean-shadow);
}

h1, h2, h3,
.panel-title,
.col-header,
.sub-header,
.title,
.status-text,
.status-msg,
.panel-hint,
.mini-help,
.matches-hint,
.matches-run-title,
.coordsgen-desc,
.coordsgen-chrom-sub,
.coordsgen-chrom-hint,
.childsampler-status,
.g25comp-subtitle,
.g25report-subtitle,
.g25mix-subtitle,
label {
    color: var(--ocean-sub) !important;
}

h1, h2, h3,
.panel-title,
.col-header,
.sub-header,
.title,
.homepage-card h3,
.homepage-quickstart-title,
.hmv2-header,
.g25lab-card h3,
.g25comp-title,
.g25report-title,
.g25mix-title,
.childsampler-title {
    color: #e8f4fd !important;
}

input[type="text"],
input[type="number"],
input[type="file"],
select,
textarea {
    background: #102c42 !important;
    color: #e7f2fb !important;
    border: 1px solid #2f5f7f !important;
}

input[type="text"]::placeholder,
input[type="number"]::placeholder,
textarea::placeholder {
    color: #86a8be !important;
    opacity: 1;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #5da8d6 !important;
    box-shadow: 0 0 0 2px rgba(93, 168, 214, 0.2) !important;
}

.progress-container,
.progress-track,
.coordsgen-progress-track {
    background: #20435e !important;
    border: 1px solid #2d617f !important;
}

.progress-bar,
.progress-fill,
.coordsgen-progress-fill {
    background: linear-gradient(90deg, #21a2e5 0%, #1371a8 100%) !important;
}

.homepage-quickstart {
    background: #183b56 !important;
    border-color: #2f5f7d !important;
}

.homepage-disclaimer,
.coordsgen-unscaled-warning-row {
    background: #3e3520 !important;
    border-color: #8f7642 !important;
    color: #f8dea1 !important;
}

.matches-table thead th {
    background: #1a3e5a !important;
    color: #dbefff !important;
    border-bottom-color: #2f5f7d !important;
}

.matches-table tbody td {
    color: #d3e8f7 !important;
    border-bottom-color: #2a5572 !important;
}

.status-pill,
.hmv2-badge,
.g25lab-badge,
.childsampler-badge {
    background: #1a4867 !important;
    border: 1px solid #31739b !important;
    color: #ddf1ff !important;
}

/* =========================================
   Heatmap V2 (Aligned With Main App Theme)
   ========================================= */
#view-heatmapv2.hmv2-scope {
    --hmv2-bg: transparent;
    --hmv2-panel: #17354d;
    --hmv2-text: #e4f1fb;
    --hmv2-accent: #1d88c7;
    --hmv2-accent-hover: #156996;
    --hmv2-border: #2b5876;
    --hmv2-list-bg: #102a3d;
    --hmv2-list-text: #d8eaf8;
    background: linear-gradient(165deg, #0d2537 0%, #13354c 60%, #18435f 100%) !important;
    color: var(--hmv2-text) !important;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #2b5876;
}

#view-heatmapv2 .hmv2-header {
    background: linear-gradient(180deg, #0d2a3f 0%, #102f45 100%) !important;
    border-bottom: 1px solid #2b5876 !important;
    color: #e8f4fd !important;
}

#view-heatmapv2 .hmv2-header h1,
#view-heatmapv2 .hmv2-header div {
    color: #e8f4fd !important;
}

#view-heatmapv2 #hmv2_sidebar {
    background: linear-gradient(180deg, #17354d 0%, #143248 100%) !important;
    border-right: 1px solid #2b5876 !important;
}

#view-heatmapv2 label,
#view-heatmapv2 .hmv2-inline-note,
#view-heatmapv2 .status-text,
#view-heatmapv2 #hmv2_status,
#view-heatmapv2 #hmv2_debug {
    color: #b7d0e2 !important;
}

#view-heatmapv2 .hmv2-setting-box,
#view-heatmapv2 #hmv2_distPanel,
#view-heatmapv2 #hmv2_pctPanel,
#view-heatmapv2 .hmv2-pct-panel {
    background: #112f45 !important;
    border: 1px solid #2f5f7f !important;
    border-radius: 10px;
}

#view-heatmapv2 .hmv2-mode-tab,
#view-heatmapv2 .hmv2-btn-toggle {
    background: #16384f !important;
    color: #d7eaf9 !important;
    border: 1px solid #376b8d !important;
}

#view-heatmapv2 .hmv2-mode-tab.active,
#view-heatmapv2 .hmv2-btn-toggle.active {
    background: linear-gradient(180deg, #2195d8 0%, #14689a 100%) !important;
    border-color: #6aaed8 !important;
    color: #ffffff !important;
}

#view-heatmapv2 .hmv2-btn-save,
#view-heatmapv2 .hmv2-scope button,
#view-heatmapv2 button:not(.hmv2-mode-tab):not(.hmv2-btn-toggle):not(.hmv2-mode-help-btn) {
    background: linear-gradient(180deg, #2195d8 0%, #14689a 100%) !important;
    color: #ffffff !important;
    border: 1px solid #6aaed8 !important;
}

#view-heatmapv2 .hmv2-btn-save:hover,
#view-heatmapv2 .hmv2-scope button:hover,
#view-heatmapv2 button:not(.hmv2-mode-tab):not(.hmv2-btn-toggle):not(.hmv2-mode-help-btn):hover {
    background: linear-gradient(180deg, #26a2ea 0%, #1775ad 100%) !important;
}

#view-heatmapv2 #hmv2_btnExpandList {
    background: #143248 !important;
    color: #d7eaf9 !important;
    border: 1px solid #376b8d !important;
}

#view-heatmapv2 textarea,
#view-heatmapv2 .hmv2-target-search,
#view-heatmapv2 input[type="text"] {
    background: #0f2b40 !important;
    color: #e7f2fb !important;
    border: 1px solid #2f5f7f !important;
}

#view-heatmapv2 textarea::placeholder,
#view-heatmapv2 .hmv2-target-search::placeholder,
#view-heatmapv2 input[type="text"]::placeholder {
    color: #90b1c8 !important;
    opacity: 1;
}

#view-heatmapv2 .hmv2-target-list {
    background: #0f2b40 !important;
    border: 1px solid #2f5f7f !important;
}

#view-heatmapv2 .hmv2-target-list .checkbox-item {
    background: #173950 !important;
    color: #dcecff !important;
    border: 1px solid #2f5f7f !important;
}

#view-heatmapv2 .hmv2-target-list .checkbox-item:hover {
    background: #1d4560 !important;
}

#view-heatmapv2 .hmv2-target-list .checkbox-item.selected {
    background: #1d88c7 !important;
    color: #ffffff !important;
    border-color: #6aaed8 !important;
}

#view-heatmapv2 #hmv2_distHeader,
#view-heatmapv2 #hmv2_pctHeader,
#view-heatmapv2 .top10-item,
#view-heatmapv2 .top10-dist,
#view-heatmapv2 .top10-rank {
    color: #d8eaf8 !important;
}

#view-heatmapv2 .top10-rank {
    color: #7cc4f3 !important;
}

#view-heatmapv2 .top10-dist {
    color: #9be0b5 !important;
}

#view-heatmapv2 #hmv2_distOverlay {
    background: rgba(11, 35, 54, 0.86) !important;
    color: #e9f5ff !important;
    border: 1px solid #3b7192;
}

#view-heatmapv2 #hmv2_loader {
    background: rgba(8, 26, 40, 0.88) !important;
}

#view-heatmapv2 #hmv2_loader > div:last-child {
    color: #dcecff !important;
}

#view-heatmapv2 #hmv2_map-wrapper {
    border-left: 1px solid #2b5876;
    background: #0f2b40;
}

#view-heatmapv2 #hmv2_map {
    background: #edf3f8 !important;
}

#view-heatmapv2 .hmv2-inline-check {
    color: #cfe4f4 !important;
}

#view-heatmapv2 .hmv2-inline-check input {
    accent-color: #2aa1e8;
}

/* Keep protected and map-heavy UIs untouched */
#view-chromopainter,
#view-chromopainter *,
#matches-painter-section,
#matches-painter-section *,
.single-map-oracle,
.single-map-oracle *,
.single-oracle-modal,
.single-oracle-tooltip {
}

@media (max-width: 900px) {
    .container {
        padding: 12px;
    }
}

/* =========================================
   Homepage Landing Revamp (Homepage Only)
   ========================================= */
#view-homepage {
    overflow-y: auto;
    padding-bottom: 24px;
}

#view-homepage .landing-home {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 1320px;
    margin: 0 auto;
    color: #d7e8f7;
}

#view-homepage .landing-hero {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(107, 168, 208, 0.36);
    background: linear-gradient(135deg, #0f2940 0%, #153a56 52%, #1c4e70 100%);
    box-shadow: 0 28px 52px rgba(4, 17, 31, 0.42);
    min-height: 410px;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 288px;
    gap: 20px;
    padding: 22px;
}

#view-homepage .landing-hero::before {
    content: "";
    position: absolute;
    inset: auto -90px -120px auto;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(79, 178, 238, 0.30) 0%, rgba(79, 178, 238, 0.04) 64%, transparent 74%);
    pointer-events: none;
}

#view-homepage .landing-hero::after {
    content: "";
    position: absolute;
    inset: -120px auto auto -120px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(115, 195, 241, 0.20) 0%, rgba(115, 195, 241, 0.04) 62%, transparent 76%);
    pointer-events: none;
}

#view-homepage .landing-hero-media {
    position: relative;
    z-index: 1;
    border-radius: 16px;
    border: 1px solid rgba(129, 187, 224, 0.32);
    overflow: hidden;
    min-height: 360px;
    background: #0e2a42;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

#view-homepage .landing-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    filter: saturate(1.05) contrast(1.03);
}

#view-homepage .landing-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    gap: 12px;
}

#view-homepage .landing-brand-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

#view-homepage .landing-wordmark {
    width: min(320px, 100%);
    height: auto;
    filter: drop-shadow(0 8px 20px rgba(7, 24, 40, 0.44));
}

#view-homepage .landing-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(20, 53, 78, 0.86);
    border: 1px solid rgba(118, 183, 224, 0.42);
    color: #dff2ff;
    font-family: "JetBrains Mono", Consolas, monospace;
    font-size: 0.72rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    font-weight: 700;
}

#view-homepage .landing-hero-content h1 {
    margin: 0;
    font-family: "Sora", "Segoe UI", sans-serif;
    font-size: clamp(2.2rem, 3.4vw, 3.45rem);
    line-height: 1.05;
    letter-spacing: -0.015em;
    color: #f4fbff;
    text-wrap: balance;
}

#view-homepage .landing-subtitle {
    margin: 0;
    color: #b9d6ea;
    font-size: 1.03rem;
    line-height: 1.52;
    max-width: 56ch;
}

#view-homepage .landing-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}

#view-homepage .landing-btn {
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 10px 16px;
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

#view-homepage .landing-btn:hover {
    transform: translateY(-1px);
}

#view-homepage .landing-btn-primary {
    background: linear-gradient(140deg, #2ba9ef 0%, #1980bc 100%);
    border-color: rgba(167, 223, 252, 0.62);
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(8, 68, 104, 0.30);
}

#view-homepage .landing-btn-secondary {
    background: rgba(13, 39, 59, 0.76);
    border-color: rgba(104, 170, 209, 0.52);
    color: #d8ecfb;
}

#view-homepage .landing-mini-note {
    font-size: 0.84rem;
    color: #9ec2da;
    letter-spacing: 0.03em;
}

#view-homepage .landing-float-panel {
    position: relative;
    z-index: 1;
    border-radius: 16px;
    border: 1px solid rgba(121, 182, 220, 0.42);
    background: linear-gradient(180deg, rgba(15, 45, 67, 0.96) 0%, rgba(10, 33, 50, 0.96) 100%);
    box-shadow: 0 14px 30px rgba(2, 14, 24, 0.42);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#view-homepage .landing-mark {
    width: 66px;
    height: 66px;
    border-radius: 14px;
    object-fit: cover;
    border: 1px solid rgba(150, 204, 236, 0.48);
    box-shadow: 0 8px 18px rgba(5, 20, 36, 0.36);
    background: #ffffff;
    padding: 3px;
}

#view-homepage .landing-float-title {
    font-family: "Sora", "Segoe UI", sans-serif;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #eaf7ff;
    font-size: 0.86rem;
}

#view-homepage .landing-float-step {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.82rem;
    color: #bad8ee;
    line-height: 1.35;
}

#view-homepage .landing-float-step span {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 900;
    color: #ffffff;
    background: linear-gradient(180deg, #2da8ef 0%, #1874aa 100%);
    box-shadow: 0 6px 12px rgba(11, 59, 88, 0.36);
    flex-shrink: 0;
}

#view-homepage .landing-feature-zone,
#view-homepage .landing-tool-access,
#view-homepage .landing-disclaimer {
    border-radius: 18px;
    border: 1px solid rgba(117, 176, 213, 0.34);
    background: linear-gradient(180deg, rgba(18, 52, 76, 0.92) 0%, rgba(15, 43, 63, 0.92) 100%);
    box-shadow: 0 14px 30px rgba(5, 18, 31, 0.34);
}

#view-homepage .landing-feature-zone,
#view-homepage .landing-tool-access {
    padding: 18px 18px 16px;
}

#view-homepage .landing-section-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px 16px;
    margin-bottom: 14px;
}

#view-homepage .landing-section-head h2 {
    margin: 0;
    font-family: "Sora", "Segoe UI", sans-serif;
    font-size: 1.18rem;
    letter-spacing: 0.015em;
    color: #edf8ff;
}

#view-homepage .landing-section-head p {
    margin: 0;
    font-size: 0.88rem;
    color: #9fc3da;
}

#view-homepage .landing-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

#view-homepage .landing-home .homepage-card.landing-feature-card {
    margin: 0;
    border-radius: 14px;
    border: 1px solid rgba(121, 183, 222, 0.35) !important;
    background: linear-gradient(180deg, rgba(16, 44, 67, 0.98) 0%, rgba(11, 34, 52, 0.98) 100%) !important;
    box-shadow: 0 10px 22px rgba(3, 16, 26, 0.34);
    padding: 14px 14px 13px;
    min-height: 126px;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

#view-homepage .landing-home .homepage-card.landing-feature-card:hover {
    transform: translateY(-3px);
    border-color: rgba(160, 217, 250, 0.64) !important;
    box-shadow: 0 16px 28px rgba(3, 16, 28, 0.42);
}

#view-homepage .landing-feature-card h3 {
    margin: 0 0 8px;
    font-size: 1rem;
    letter-spacing: 0.01em;
    color: #ecf9ff !important;
}

#view-homepage .landing-feature-card p {
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.46;
    color: #a7cbe2 !important;
}

#view-homepage .landing-tab-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

#view-homepage .landing-home .homepage-card.landing-tab-pill {
    border-radius: 999px;
    padding: 8px 12px;
    border: 1px solid rgba(114, 179, 218, 0.40) !important;
    background: linear-gradient(180deg, rgba(18, 49, 71, 0.96) 0%, rgba(11, 34, 51, 0.96) 100%) !important;
    color: #d3ebfb !important;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease, color 0.14s ease;
}

#view-homepage .landing-home .homepage-card.landing-tab-pill:hover {
    transform: translateY(-1px) scale(1.03);
    border-color: rgba(164, 221, 252, 0.74) !important;
    color: #f1fbff !important;
    box-shadow: 0 7px 14px rgba(8, 33, 52, 0.34);
}

#view-homepage .landing-disclaimer {
    padding: 12px 16px;
    font-size: 0.8rem;
    color: #9ec2d9;
    letter-spacing: 0.025em;
    line-height: 1.46;
}

@media (max-width: 1240px) {
    #view-homepage .landing-hero {
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
    }

    #view-homepage .landing-float-panel {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px 12px;
    }

    #view-homepage .landing-float-title {
        width: 100%;
    }
}

@media (max-width: 900px) {
    #view-homepage .landing-home {
        gap: 14px;
    }

    #view-homepage .landing-hero {
        border-radius: 18px;
        padding: 14px;
        gap: 12px;
    }

    #view-homepage .landing-hero-media {
        min-height: 230px;
    }

    #view-homepage .landing-feature-grid {
        grid-template-columns: 1fr;
    }

    #view-homepage .landing-btn {
        width: 100%;
    }

    #view-homepage .landing-wordmark {
        width: min(270px, 100%);
    }

    #view-homepage .landing-subtitle {
        font-size: 0.94rem;
    }
}

#landingTabHoverModal.landing-tab-hover-modal {
    position: fixed;
    z-index: 10020;
    max-width: min(360px, calc(100vw - 28px));
    border-radius: 12px;
    border: 1px solid rgba(128, 190, 227, 0.52);
    background: linear-gradient(180deg, rgba(10, 34, 51, 0.97) 0%, rgba(7, 25, 39, 0.97) 100%);
    box-shadow: 0 16px 36px rgba(3, 16, 27, 0.46);
    padding: 10px 11px 10px;
    color: #d7ebfa;
    opacity: 0;
    transform: translateY(5px) scale(0.985);
    transition: opacity 0.14s ease, transform 0.14s ease;
    pointer-events: none;
}

#landingTabHoverModal.landing-tab-hover-modal.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

#landingTabHoverModal .landing-tab-hover-title {
    font-family: "Sora", "Segoe UI", sans-serif;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.055em;
    text-transform: uppercase;
    color: #eef9ff;
    margin-bottom: 5px;
}

#landingTabHoverModal .landing-tab-hover-body {
    font-size: 0.78rem;
    line-height: 1.42;
    color: #a9ccE4;
}
