/* Cheese — Opening Explorer page */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* =====================
   BODY
   ===================== */
/* Same background implementation as the Analysis page:
   custom_bg1.png, cover sizing, centred, no-repeat — so the page matches
   Analysis visually. */

body {
    height: 100vh;
    overflow: auto;
    background-image: url("Background/custom_bg1.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    font-family: Arial, sans-serif;
    color: white;
}

/* =====================
   LEFT NAVIGATION SIDEBAR
   ===================== */

.left-nav {
    position: fixed;
    left: 0;
    top: 0;
    width: 220px;
    height: 100vh;
    background: rgba(12, 16, 28, 0.72);
    backdrop-filter: blur(28px) saturate(135%);
    -webkit-backdrop-filter: blur(28px) saturate(135%);
    border-right: 1px solid rgba(255, 255, 255, 0.10);
    display: flex;
    flex-direction: column;
    z-index: 100;
    box-shadow: 6px 0 34px rgba(0, 0, 0, 0.45),
                inset 0 1px 0 rgba(255, 255, 255, 0.05),
                inset -1px 0 0 rgba(255, 255, 255, 0.04);
    padding: 0 0 24px 0;
}

/* LOGO */

a.left-nav-logo,
a.left-nav-item {
    text-decoration: none;
    color: inherit;
    display: flex;
}

a.left-nav-logo {
    cursor: pointer;
}

a.left-nav-logo:hover {
    background: rgba(255, 255, 255, 0.04);
}

/* Navigable (non-active, non-disabled) nav item — clickable link.
   Explicit white text so the link never falls back to the inherited body
   colour. The active item is highlighted via its own active rule. */
a.left-nav-item-link {
    cursor: pointer;
    width: 100%;
    color: white;
}

a.left-nav-item-link:hover {
    background: rgba(255, 255, 255, 0.07);
    color: white;
    transform: translateX(3px);
}

.left-nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 26px 20px 22px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    margin-bottom: 16px;
}

.left-nav-logo-icon {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
}

.left-nav-logo-text {
    font-size: 22px;
    font-weight: 800;
    color: white;
    letter-spacing: 0.5px;
    font-family: Arial, sans-serif;
}

/* NAV LIST */

.left-nav-items {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 12px;
    flex: 1;
}

/* NAV ITEM */

.left-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 15px;
    font-weight: 500;
    font-family: Arial, sans-serif;
    cursor: default;
    transition: background 0.18s ease, color 0.18s ease, transform 0.15s ease;
    position: relative;
    user-select: none;
}

/* ACTIVE */

.left-nav-active {
    background: rgba(255, 255, 255, 0.10);
    color: white;
    cursor: default;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09);
}

/* ACTIVE accent bar */

.left-nav-active::before {
    content: "";
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 0 3px 3px 0;
}

/* DISABLED */

.left-nav-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.left-nav-disabled:hover {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.65);
    transform: translateX(3px);
    opacity: 0.65;
}

/* COMING SOON tooltip */

.left-nav-disabled::after {
    content: attr(data-soon);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) translateX(-4px);
    background: rgba(20, 26, 45, 0.96);
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 7px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.18s ease, transform 0.18s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 200;
}

.left-nav-disabled:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* ICON */

.left-nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.85;
}

/* ACTIVE — pure white text + icon (inactive items unchanged) */
/* Specificity (0,2,0) to override `a.left-nav-item { color: inherit }` (0,1,1).
   The icon uses stroke="currentColor", so pure-white text makes it white too. */

.left-nav-item.left-nav-active {
    color: #fff;
}

.left-nav-item.left-nav-active .left-nav-icon {
    opacity: 1;
}

/* =====================
   MAIN CONTENT
   ===================== */

.oe-container {
    margin-left: 220px;
    min-height: 100vh;
    padding: 40px 48px 64px 48px;
}

/* HEADER */

.oe-header {
    margin-bottom: 26px;
}

.oe-page-title {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.1;
    color: #ffffff;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
    margin-bottom: 6px;
}

.oe-page-subtitle {
    font-size: 14.5px;
    color: rgba(255, 255, 255, 0.96);
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9),
                 0 2px 12px rgba(0, 0, 0, 0.7);
}

/* =====================
   SEARCH BAR
   ===================== */
/* Solid dark panel — high contrast, no glass. Matches the opening cards.
   Premium feel: smooth focus animation, soft focus glow, generous padding. */

.oe-search-wrap {
    position: relative;
    max-width: 580px;
    margin-bottom: 18px;
}

.oe-search-icon {
    position: absolute;
    left: 17px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: rgba(255, 255, 255, 0.7);
    pointer-events: none;
    transition: color 0.22s ease, transform 0.22s ease;
}

/* Icon brightens + nudges when the field is focused */
.oe-search-wrap:focus-within .oe-search-icon {
    color: rgba(170, 190, 255, 0.95);
    transform: translateY(-50%) scale(1.06);
}

.oe-search-input {
    width: 100%;
    padding: 15px 18px 15px 48px;
    font-size: 15px;
    font-family: Arial, sans-serif;
    color: #ffffff;
    background: rgba(13, 16, 22, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
    outline: none;
    transition: border-color 0.22s ease, background 0.22s ease,
                box-shadow 0.22s ease, transform 0.22s ease;
}

.oe-search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.22s ease;
}

.oe-search-input:hover {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(15, 18, 25, 0.94);
}

.oe-search-input:focus {
    border-color: rgba(150, 175, 255, 0.55);
    background: rgba(16, 20, 27, 0.97);
    transform: translateY(-1px);
    box-shadow: 0 0 0 3px rgba(120, 150, 255, 0.16),
                0 12px 30px rgba(0, 0, 0, 0.5);
}

.oe-search-input:focus::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* =====================
   STATUS / COUNT
   ===================== */
/* Compact high-contrast chip — stronger typography, easier to read. */

.oe-status {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.4px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 7px 15px;
    border-radius: 20px;
    margin-bottom: 22px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 0.2s ease, border-color 0.2s ease;
}

/* =====================
   RESULTS GRID
   ===================== */
/* Fluid auto-fill grid — cards rearrange naturally across every screen size
   while keeping spacing perfectly consistent. */

.oe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(244px, 1fr));
    gap: 16px;
}

/* OPENING CARD — solid dark panel, high contrast (no glassmorphism).
   Animated entrance + interactive hover/press states. */

.oe-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px 20px;
    border-radius: 14px;
    background: rgba(13, 16, 22, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
    min-height: 100px;
    cursor: pointer;
    user-select: none;
    /* Hidden until the row-reveal observer adds .is-revealed.
       Only opacity + transform animate, so reveals never touch layout. */
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease-out,
                transform 0.3s ease-out,
                border-color 0.2s ease,
                box-shadow 0.2s ease,
                background 0.2s ease;
}

/* Revealed — every card in a row receives this at the same instant, and
   successive rows cascade down (timing is coordinated in script.js). */
.oe-card.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

.oe-card:hover {
    background: rgba(22, 27, 36, 0.96);
    border-color: rgba(255, 255, 255, 0.30);
    transform: translateY(-4px) scale(1.015);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.6);
}

/* Click press — quick dip, then the normal navigation to Analysis follows. */
.oe-card:active {
    transform: translateY(-1px) scale(0.987);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5);
    transition-duration: 0.09s;
}

.oe-card-name {
    font-size: 14.5px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.38;
    flex: 1;
}

.oe-card-eco {
    align-self: flex-start;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.14);
    padding: 3px 9px;
    border-radius: 7px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.oe-card:hover .oe-card-eco {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.24);
}

/* =====================
   EMPTY STATE
   ===================== */
/* Clean, centred message instead of a blank page. */

.oe-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 72px 20px;
    animation: oeFadeIn 0.32s ease both;
}

.oe-empty-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 18px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-opacity='0.55' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 26px 26px;
}

.oe-empty-title {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: 0.2px;
    color: #ffffff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
    margin-bottom: 8px;
}

.oe-empty-text {
    font-size: 13.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.55;
    max-width: 360px;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

@keyframes oeFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* INFINITE-SCROLL SENTINEL */

.oe-sentinel {
    height: 1px;
    width: 100%;
}

/* =====================
   RESPONSIVE GRID
   ===================== */
/* The auto-fill grid handles most resizing on its own; these tune the card
   floor and page padding for laptop, tablet, and mobile. */

@media (max-width: 1100px) {
    .oe-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

@media (max-width: 820px) {
    .oe-container {
        padding: 34px 32px 56px 32px;
    }
    .oe-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 14px;
    }
}

@media (max-width: 560px) {
    .oe-container {
        padding: 30px 20px 52px 20px;
    }
    .oe-grid {
        grid-template-columns: 1fr;
    }
    .oe-search-wrap {
        max-width: 100%;
    }
}

/* =====================
   REDUCED MOTION
   ===================== */
/* Respect users who prefer fewer animations — keep everything functional,
   just without the motion. */

@media (prefers-reduced-motion: reduce) {
    .oe-card,
    .oe-empty,
    .oe-search-input,
    .oe-search-icon {
        animation: none !important;
        transition: none !important;
    }
    /* Always visible, no motion — defensive even if reveal never runs. */
    .oe-card {
        opacity: 1 !important;
        transform: none !important;
    }
    .oe-card:hover {
        transform: none;
    }
}