/* =========================================================================
   AETHER INDEX: 2026 Industrial Futurism Stylesheet
   Theme: Cyberpunk CCTV / Tech-Brutalism
   ========================================================================= */

:root {
    --bg-base: #050507;
    --bg-glass: rgba(10, 10, 12, 0.85);
    --border-color: #1e1e24;
    --border-bright: #33333d;
    --accent-cyan: #00f3ff;
    --accent-yellow: #ffea00;
    --accent-red: #ff2a2a;
    --text-main: #e0e0e5;
    --text-muted: #666677;
    --font-heading: 'Outfit', sans-serif;
    --font-mono: 'Space Mono', monospace;
    --grid-size: 40px;
}

/* Base Blueprint Grid */
.bg-blueprint {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-base);
    background-image: 
        linear-gradient(var(--border-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
    background-size: var(--grid-size) var(--grid-size);
    z-index: -1;
    opacity: 0.15;
}

.bg-blueprint::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 0%, var(--bg-base) 80%);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: var(--font-heading);
    overflow: hidden; /* App-like feel */
}

/* Base CRT/Scanline effect to sell the "Terminal" vibe */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 2px, 3px 100%;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.15;
}

.grid-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    grid-template-rows: 80px 1fr;
    height: 100vh;
    padding: 1rem;
    gap: 1rem;
}

/* Glassmorphism Panels */
.neon-border {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
}

/* ==================================
   HEADER
   ================================== */
.header {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.brand-logo {
    height: 48px;
    filter: drop-shadow(0 0 8px rgba(0, 243, 255, 0.4));
}

.brand-text h1 {
    font-weight: 800;
    letter-spacing: 2px;
    font-size: 1.5rem;
    text-transform: uppercase;
    color: #fff;
}

.sub-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.status-indicator {
    font-weight: bold;
}
.status-indicator.online {
    color: var(--accent-cyan);
    animation: pulse 2s infinite;
}

.time-panel {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-mono);
    font-size: 1.25rem;
    color: var(--accent-yellow);
}

.sys-pulse {
    width: 12px;
    height: 12px;
    background-color: var(--accent-red);
    border-radius: 50%;
    animation: flash 1s infinite alternate;
}

/* ==================================
   SIDEBAR
   ================================== */
.sidebar {
    display: flex;
    flex-direction: column;
    padding: 2rem 1rem;
}

.nav-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-links li {
    padding: 1rem;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    border: 1px solid transparent;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    color: var(--text-muted);
}

.nav-links li:hover {
    border-left: 3px solid var(--accent-cyan);
    background: rgba(0, 243, 255, 0.05);
    color: #fff;
    transform: translateX(4px);
}

.nav-links li.active {
    border-left: 4px solid var(--accent-yellow);
    background: rgba(255, 234, 0, 0.08);
    color: var(--accent-yellow);
    font-weight: bold;
}

.system-stats {
    margin-top: auto;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    border-top: 1px dashed var(--border-color);
    padding-top: 1rem;
}
.stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}
.cyan-text { color: var(--accent-cyan); }
.yellow-text { color: var(--accent-yellow); }

/* ==================================
   VIEWPORT & PANELS
   ================================== */
.viewport {
    position: relative;
    overflow: hidden;
}

.panel {
    display: none;
    height: 100%;
    flex-direction: column;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 2rem;
    animation: scanReveal 0.4s ease-out forwards;
}

.panel.active {
    display: flex;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.panel-header h2 {
    font-weight: 600;
    letter-spacing: 1px;
}

.badge {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 2px;
    font-weight: bold;
}
.yellow-badge { background: rgba(255, 234, 0, 0.1); color: var(--accent-yellow); border: 1px solid var(--accent-yellow); }
.cyan-badge { background: rgba(0, 243, 255, 0.1); color: var(--accent-cyan); border: 1px solid var(--accent-cyan); }
.red-badge { background: rgba(255, 42, 42, 0.1); color: var(--accent-red); border: 1px solid var(--accent-red); }

/* ==================================
   LANDING PAGE COMPONENTS
   ================================== */

.landing-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 10;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 4rem;
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-links-public {
    display: flex;
    gap: 3rem;
    list-style: none;
    font-family: var(--font-mono);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.nav-links-public a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-links-public a:hover, .nav-links-public a.active {
    color: var(--accent-cyan);
}

.hero-section {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 4rem 0;
}

.hero-marker {
    background: var(--accent-cyan);
    color: var(--bg-base);
    font-family: var(--font-mono);
    font-weight: bold;
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.hero-title {
    font-size: 5rem;
    line-height: 1;
    font-weight: 800;
    margin-bottom: 2rem;
    max-width: 800px;
    text-transform: uppercase;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    line-height: 1.6;
    margin-bottom: 3rem;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
}

.btn-primary {
    background: var(--accent-cyan);
    color: var(--bg-base);
    padding: 1rem 2.5rem;
    font-family: var(--font-mono);
    font-weight: 800;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.3);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 50px rgba(0, 243, 255, 0.5);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-bright);
    color: #fff;
    padding: 1rem 2.5rem;
    font-family: var(--font-mono);
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 4rem 0;
}

.feature-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.feature-card:hover {
    border-color: var(--border-bright);
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.02);
}

.feature-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, transparent 50%, var(--border-color) 50%);
}

.feature-tag {
    font-family: var(--font-mono);
    color: var(--accent-yellow);
    font-size: 0.7rem;
    margin-bottom: 1rem;
    display: block;
    text-transform: uppercase;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Vertical Stats Section */
.industry-stats {
    display: flex;
    justify-content: space-between;
    padding: 4rem 0;
    border-top: 1px solid var(--border-color);
}

.stat-item {
    text-align: left;
}

.stat-value {
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    display: block;
}

.stat-label {
    font-family: var(--font-mono);
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 2px;
}

/* ==================================
   TABLE WRAPPER REFACTOR
   ================================== */
.table-wrapper {
    flex: 1;
    overflow-y: auto;
}

/* Custom Scrollbar */
.table-wrapper::-webkit-scrollbar { width: 6px; }
.table-wrapper::-webkit-scrollbar-track { background: var(--bg-base); }
.table-wrapper::-webkit-scrollbar-thumb { background: var(--border-color); }

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-align: left;
}

.data-table th {
    color: var(--text-muted);
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: var(--bg-base);
    z-index: 10;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.02);
    color: #ccc;
    transition: background 0.2s, color 0.2s;
}

.data-table tbody tr:hover td {
    background: rgba(255,255,255,0.03);
    color: #fff;
    cursor: crosshair;
}

/* Dropdown styling */
.tech-select {
    background: rgba(0, 0, 0, 0.5);
    color: var(--accent-cyan);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    font-family: var(--font-mono);
    outline: none;
    cursor: pointer;
    margin-right: 1rem;
}
.tech-select:focus { border-color: var(--accent-cyan); }

/* Agentic Feed Styling */
.feed-wrapper {
    flex: 1;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.feed-item {
    border-left: 2px solid var(--border-color);
    padding-left: 1rem;
    animation: slideIn 0.3s ease-out;
}
.feed-time {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}
.feed-text {
    color: var(--accent-cyan);
}

/* Animations */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}
@keyframes flash {
    0% { opacity: 0.2; }
    100% { opacity: 1; filter: drop-shadow(0 0 5px var(--accent-red)); }
}
@keyframes scanReveal {
    from { opacity: 0; clip-path: polygon(0 0, 100% 0, 100% 0, 0 0); transform: translateY(-10px); }
    to { opacity: 1; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); transform: translateY(0); }
}
@keyframes slideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ==================================
   DISCOVERY ENGINE: THE TELEPORT INDEXER
   ================================== */
.teleport-panel {
    display: flex;
    gap: 1rem;
    flex: 1;
    max-width: 600px;
    margin: 0 4rem;
}

.neon-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    color: var(--accent-cyan);
    padding: 0.75rem 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.neon-input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.15);
}

.neon-button {
    background: transparent;
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    padding: 0.75rem 1.5rem;
    font-family: var(--font-mono);
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.neon-button:hover {
    background: var(--accent-cyan);
    color: var(--bg-base);
    box-shadow: 0 0 20px var(--accent-cyan);
}

/* ==================================
   DEVELOPER SANCTUM (Walkthrough UI)
   ================================== */
.developer-sanctum {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(0, 243, 255, 0.02);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sanctum-header h3 {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    letter-spacing: 2px;
}

.sanctum-content {
    display: flex;
    gap: 2rem;
}

.example-selector {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 150px;
}

.example-selector button {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s ease;
}

.example-selector button:hover {
    border-color: var(--accent-yellow);
    color: var(--accent-yellow);
}

.code-block {
    flex: 1;
    background: #000;
    padding: 1.5rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-cyan);
    border-left: 3px solid var(--accent-cyan);
    overflow-x: auto;
    line-height: 1.6;
}

/* ==================================
   DOCS PAGE LAYOUT
   ================================== */

.docs-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 4rem;
    padding: 2rem 0;
}

.docs-sidebar {
    position: sticky;
    top: 2rem;
    height: fit-content;
    padding-right: 2rem;
    border-right: 1px solid var(--border-color);
}

.docs-sidebar ul {
    list-style: none;
}

.docs-sidebar li {
    margin-bottom: 1rem;
}

.docs-sidebar a {
    color: var(--text-muted);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    transition: all 0.3s ease;
    display: block;
    padding: 0.5rem 0;
}

.docs-sidebar a:hover, .docs-sidebar a.active {
    color: var(--accent-cyan);
    transform: translateX(4px);
}

.docs-content {
    color: var(--text-main);
    line-height: 1.6;
}

.docs-content h2 {
    font-size: 2.5rem;
    text-transform: uppercase;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.docs-content h3 {
    font-size: 1.5rem;
    margin-top: 3rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    color: var(--accent-yellow);
}

.docs-content p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.docs-content code {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9em;
    color: var(--accent-cyan);
}

.docs-code-block {
    background: #000;
    padding: 2rem;
    border: 1px solid var(--border-color);
    margin: 2rem 0;
    position: relative;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    overflow-x: auto;
}

.docs-code-block::before {
    content: "[ RAW_BLUEPRINT ]";
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 0.6rem;
    color: var(--text-muted);
}

.docs-nav-title {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent-yellow);
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
}

/* ==================================
   STITCH (BENTO) GRID SYSTEM
   ================================== */

.stitch-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: 150px;
    gap: 1rem;
    padding: 1rem 0;
}

.stitch-item {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    position: relative;
    padding: 1.5rem;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    overflow: hidden;
}

.stitch-item:hover {
    border-color: var(--accent-cyan);
    background: rgba(255, 255, 255, 0.02);
}

.stitch-item::after {
    content: "[ STITCH_ID_" attr(data-id) " ]";
    position: absolute;
    bottom: 5px;
    left: 10px;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-muted);
}

/* Bento Spans */
.span-6 { grid-column: span 6; }
.span-4 { grid-column: span 4; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }
.row-2 { grid-row: span 2; }
.row-3 { grid-row: span 3; }

.stitch-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 0.5rem;
}

.stitch-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==================================
    BAGS EXPLORER GRID
   ================================== */
.bags-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    flex: 1;
    overflow: hidden;
    margin-top: 1rem;
}

.bags-column {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
}

.column-header {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.scroll-feed {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-right: 0.5rem;
}

.scroll-feed::-webkit-scrollbar { width: 4px; }
.scroll-feed::-webkit-scrollbar-thumb { background: var(--border-color); }

.bag-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.bag-card:hover {
    border-color: var(--accent-cyan);
    background: rgba(0, 243, 255, 0.03);
    transform: translateY(-2px);
}

.card-title {
    font-weight: 600;
    color: var(--accent-cyan);
    margin-bottom: 0.25rem;
}

.card-meta {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
}

.fee-amount {
    font-family: var(--font-mono);
    color: var(--accent-yellow);
    font-weight: bold;
}

.loading-manifest {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 2rem;
    animation: pulse 2s infinite;
}
