/* ============================================
   EASTASIA TRAVEL OS — CYBER MATRIX THEME
   Palette: Matte Black, Neon Blue, Safety Orange
   ============================================ */

/* === DESIGN TOKENS === */
:root {
    /* Core Colors */
    --black-deep: #0a0a0f;
    --black-matte: #111118;
    --black-card: #16161f;
    --black-elevated: #1c1c28;
    --black-border: #2a2a3a;

    /* Neon Blue */
    --blue-neon: #00d4ff;
    --blue-bright: #00b8e6;
    --blue-dim: #0088aa;
    --blue-glow: rgba(0, 212, 255, 0.15);
    --blue-glow-strong: rgba(0, 212, 255, 0.35);

    /* Safety Orange */
    --orange-safety: #ff6b2c;
    --orange-bright: #ff8c42;
    --orange-dim: #cc5a28;
    --orange-glow: rgba(255, 107, 44, 0.15);
    --orange-glow-strong: rgba(255, 107, 44, 0.35);

    /* Neutrals */
    --gray-100: #e8e8f0;
    --gray-200: #c0c0d0;
    --gray-300: #8888a0;
    --gray-400: #555570;
    --gray-500: #3a3a50;

    /* Typography */
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-jp: 'Noto Sans JP', sans-serif;

    /* Sizing */
    --nav-height: 60px;
    --section-pad: 40px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;

    /* Effects */
    --transition-fast: 150ms ease;
    --transition-smooth: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* === RESET & BASE === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--blue-dim) var(--black-deep);
}

body {
    font-family: var(--font-sans);
    background: var(--black-deep);
    color: var(--gray-100);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--black-deep); }
::-webkit-scrollbar-thumb { background: var(--blue-dim); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--blue-neon); }

/* === BOOT SEQUENCE === */
.boot-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: var(--black-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bootFadeOut 0.6s ease 4.5s forwards;
}

.boot-overlay.dismissed {
    animation: bootFadeOut 0.3s ease forwards;
}

.boot-content {
    text-align: center;
}

.boot-logo {
    font-family: var(--font-jp);
    font-size: 72px;
    font-weight: 700;
    color: var(--blue-neon);
    text-shadow: 0 0 40px var(--blue-glow-strong), 0 0 80px var(--blue-glow);
    margin-bottom: 32px;
    animation: bootPulse 1.5s ease infinite;
}

.boot-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 32px;
}

.boot-line {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--gray-300);
    opacity: 0;
    animation: bootLineIn 0.3s ease calc(var(--delay) * 0.6s) forwards;
}

.boot-line:last-child {
    color: var(--blue-neon);
}

.boot-progress {
    width: 300px;
    height: 3px;
    background: var(--black-card);
    border-radius: 2px;
    margin: 0 auto;
    overflow: hidden;
}

.boot-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--blue-neon), var(--orange-safety));
    width: 0%;
    animation: bootProgress 3.5s ease 0.5s forwards;
    border-radius: 2px;
}

@keyframes bootFadeOut {
    to { opacity: 0; pointer-events: none; }
}
@keyframes bootPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}
@keyframes bootLineIn {
    to { opacity: 1; }
}
@keyframes bootProgress {
    to { width: 100%; }
}

/* === NAVIGATION === */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    border-bottom: 1px solid var(--black-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 1000;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-logo {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.logo-jp {
    font-family: var(--font-jp);
    font-size: 24px;
    font-weight: 700;
    color: var(--blue-neon);
    text-shadow: 0 0 20px var(--blue-glow);
}

.logo-en {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-300);
    letter-spacing: 3px;
}

.nav-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--blue-glow);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 20px;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: var(--blue-neon);
    border-radius: 50%;
    animation: pulse 2s ease infinite;
    box-shadow: 0 0 8px var(--blue-neon);
}

.status-text {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--blue-neon);
    letter-spacing: 1px;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.nav-center {
    display: flex;
    gap: 4px;
}

.nav-link {
    background: none;
    border: 1px solid transparent;
    color: var(--gray-300);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 1px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link:hover {
    color: var(--gray-100);
    background: var(--black-elevated);
    border-color: var(--black-border);
}

.nav-link.active {
    color: var(--blue-neon);
    background: var(--blue-glow);
    border-color: rgba(0, 212, 255, 0.25);
    text-shadow: 0 0 10px var(--blue-glow);
}

.nav-icon {
    font-size: 14px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-clock {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--orange-safety);
    letter-spacing: 1px;
}

.nav-settings {
    background: none;
    border: 1px solid var(--black-border);
    color: var(--gray-300);
    font-size: 18px;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-smooth);
}

.nav-settings:hover {
    color: var(--orange-safety);
    border-color: var(--orange-dim);
    background: var(--orange-glow);
}

/* === MODAL === */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.hidden {
    display: none;
}

.modal-content {
    background: var(--black-card);
    border: 1px solid var(--black-border);
    border-radius: var(--radius-lg);
    width: 460px;
    max-width: 90vw;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--black-border);
}

.modal-header h2 {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--blue-neon);
    letter-spacing: 1px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--gray-300);
    font-size: 18px;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.modal-close:hover {
    color: var(--orange-safety);
}

.modal-body {
    padding: 24px;
}

.setting-group {
    margin-bottom: 20px;
}

.setting-group label {
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--gray-300);
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.setting-group input {
    width: 100%;
    padding: 12px 16px;
    background: var(--black-deep);
    border: 1px solid var(--black-border);
    border-radius: var(--radius-sm);
    color: var(--gray-100);
    font-family: var(--font-mono);
    font-size: 13px;
    transition: border-color var(--transition-fast);
}

.setting-group input:focus {
    outline: none;
    border-color: var(--blue-neon);
    box-shadow: 0 0 0 3px var(--blue-glow);
}

.setting-group small {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    color: var(--gray-400);
}

/* === BUTTONS === */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--blue-neon), var(--blue-bright));
    color: var(--black-deep);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-smooth);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--blue-glow-strong);
}

/* === SECTIONS === */
.section {
    display: none;
    min-height: calc(100vh - var(--nav-height));
    padding: calc(var(--nav-height) + var(--section-pad)) var(--section-pad) var(--section-pad);
}

.section.active {
    display: block;
    animation: sectionIn 0.4s ease;
}

@keyframes sectionIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h1 {
    font-family: var(--font-mono);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 4px;
    margin-bottom: 8px;
}

.section-sub {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--gray-300);
    letter-spacing: 1px;
}

/* === GLITCH TEXT === */
.glitch-text {
    position: relative;
    color: var(--gray-100);
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.glitch-text:hover::before {
    animation: glitch1 0.3s ease;
    color: var(--blue-neon);
    opacity: 0.8;
}

.glitch-text:hover::after {
    animation: glitch2 0.3s ease;
    color: var(--orange-safety);
    opacity: 0.8;
}

@keyframes glitch1 {
    0% { clip-path: inset(40% 0 60% 0); transform: translate(-4px, 0); opacity: 0.7; }
    50% { clip-path: inset(10% 0 85% 0); transform: translate(4px, 0); opacity: 0.7; }
    100% { clip-path: inset(0); transform: translate(0); opacity: 0; }
}

@keyframes glitch2 {
    0% { clip-path: inset(60% 0 20% 0); transform: translate(4px, 0); opacity: 0.7; }
    50% { clip-path: inset(80% 0 5% 0); transform: translate(-4px, 0); opacity: 0.7; }
    100% { clip-path: inset(0); transform: translate(0); opacity: 0; }
}

/* === STATS BAR === */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.stat-card {
    background: var(--black-card);
    border: 1px solid var(--black-border);
    border-radius: var(--radius-md);
    padding: 20px 28px;
    text-align: center;
    min-width: 120px;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--blue-neon), var(--orange-safety));
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

.stat-card:hover {
    border-color: var(--blue-dim);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 32px;
    font-weight: 700;
    color: var(--blue-neon);
    text-shadow: 0 0 20px var(--blue-glow);
    line-height: 1;
    margin-bottom: 6px;
}

.stat-card:nth-child(even) .stat-value {
    color: var(--orange-safety);
    text-shadow: 0 0 20px var(--orange-glow);
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--gray-400);
    letter-spacing: 2px;
}

/* === ANTI-GRAVITY CONTAINER === */
.antigravity-container {
    position: relative;
    width: 100%;
    height: 600px;
    background: var(--black-matte);
    border: 1px solid var(--black-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

#antigravity-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.floating-cards {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* === FLOATING CARD === */
.float-card {
    position: absolute;
    width: 280px;
    background: var(--black-card);
    border: 1px solid var(--black-border);
    border-radius: var(--radius-md);
    padding: 0;
    pointer-events: auto;
    cursor: grab;
    transition: box-shadow var(--transition-smooth), border-color var(--transition-smooth);
    overflow: hidden;
}

.float-card:hover {
    border-color: var(--blue-dim);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4), 0 0 30px var(--blue-glow);
}

.float-card:active {
    cursor: grabbing;
}

.float-card-header {
    padding: 14px 18px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--black-border);
}

.float-card-type {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 3px 8px;
    border-radius: 4px;
}

.float-card-type.flight {
    color: var(--blue-neon);
    background: var(--blue-glow);
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.float-card-type.hotel {
    color: var(--orange-safety);
    background: var(--orange-glow);
    border: 1px solid rgba(255, 107, 44, 0.2);
}

.float-card-type.activity {
    color: #a78bfa;
    background: rgba(167, 139, 250, 0.12);
    border: 1px solid rgba(167, 139, 250, 0.2);
}

.float-card-status {
    font-family: var(--font-mono);
    font-size: 9px;
    color: #4ade80;
    letter-spacing: 1px;
}

.float-card-body {
    padding: 14px 18px;
}

.float-card-title {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-100);
    margin-bottom: 8px;
}

.float-card-detail {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--gray-300);
    line-height: 1.7;
}

.float-card-detail strong {
    color: var(--gray-200);
}

.float-card-footer {
    padding: 10px 18px;
    border-top: 1px solid var(--black-border);
    display: flex;
    align-items: center;
    gap: 6px;
}

.float-card-date {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--gray-400);
    letter-spacing: 0.5px;
}

/* === MAP SECTION === */
.map-wrapper {
    display: flex;
    gap: 20px;
    height: calc(100vh - var(--nav-height) - 180px);
    min-height: 500px;
}

.map-container {
    flex: 1;
    background: var(--black-card);
    border: 1px solid var(--black-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
}

.map-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 16px;
    color: var(--gray-300);
    font-family: var(--font-mono);
    font-size: 13px;
    text-align: center;
    padding: 40px;
}

.map-placeholder-icon {
    font-size: 64px;
    color: var(--blue-dim);
    animation: pulse 3s ease infinite;
}

.map-sidebar {
    width: 340px;
    background: var(--black-card);
    border: 1px solid var(--black-border);
    border-radius: var(--radius-lg);
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--black-border);
    position: sticky;
    top: 0;
    background: var(--black-card);
    z-index: 1;
}

.sidebar-header h3 {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--blue-neon);
    letter-spacing: 2px;
}

.sidebar-content {
    padding: 20px;
}

.sidebar-hint {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--gray-400);
    text-align: center;
    padding: 40px 0;
}

/* Map Info Card */
.map-info-card {
    animation: fadeIn 0.3s ease;
}

.map-info-card h3 {
    font-family: var(--font-mono);
    font-size: 16px;
    color: var(--blue-neon);
    margin-bottom: 4px;
}

.map-info-card .info-subtitle {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--gray-400);
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.info-section {
    margin-bottom: 20px;
}

.info-section-title {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--orange-safety);
    letter-spacing: 2px;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--black-border);
}

.info-section p {
    font-size: 13px;
    line-height: 1.7;
    color: var(--gray-200);
}

.info-section ul {
    list-style: none;
    padding: 0;
}

.info-section li {
    font-size: 13px;
    color: var(--gray-200);
    padding: 6px 0;
    padding-left: 16px;
    position: relative;
}

.info-section li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--blue-neon);
}

/* === ITINERARY TIMELINE === */
.itinerary-filters {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--black-card);
    border: 1px solid var(--black-border);
    color: var(--gray-300);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1px;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all var(--transition-smooth);
}

.filter-btn:hover {
    border-color: var(--blue-dim);
    color: var(--gray-100);
}

.filter-btn.active {
    background: var(--blue-glow);
    border-color: rgba(0, 212, 255, 0.3);
    color: var(--blue-neon);
}

.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--blue-neon), var(--orange-safety), var(--blue-neon));
    opacity: 0.3;
}

.timeline-phase {
    margin-bottom: 40px;
}

.timeline-phase-header {
    position: relative;
    margin-bottom: 20px;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--blue-glow), transparent);
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: var(--radius-md);
    margin-left: -10px;
}

.timeline-phase-header::before {
    content: '';
    position: absolute;
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: var(--blue-neon);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--blue-neon);
}

.phase-title {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 700;
    color: var(--blue-neon);
    letter-spacing: 2px;
    margin-bottom: 4px;
}

.phase-dates {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--gray-400);
}

.timeline-day {
    position: relative;
    margin-bottom: 16px;
    padding: 18px 22px;
    background: var(--black-card);
    border: 1px solid var(--black-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-smooth);
    margin-left: -6px;
}

.timeline-day::before {
    content: '';
    position: absolute;
    left: -30px;
    top: 24px;
    width: 8px;
    height: 8px;
    background: var(--black-card);
    border: 2px solid var(--orange-safety);
    border-radius: 50%;
}

.timeline-day:hover {
    border-color: var(--blue-dim);
    transform: translateX(4px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.day-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.day-number {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--orange-safety);
    background: var(--orange-glow);
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 1px;
}

.day-title {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-100);
}

.day-date {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--gray-400);
    margin-left: auto;
}

.day-activities {
    list-style: none;
    padding: 0;
}

.day-activities li {
    font-size: 13px;
    color: var(--gray-200);
    padding: 5px 0;
    padding-left: 18px;
    position: relative;
    line-height: 1.6;
}

.day-activities li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 12px;
    width: 6px;
    height: 6px;
    border: 1px solid var(--blue-dim);
    border-radius: 2px;
}

.day-activities .time-tag {
    color: var(--blue-neon);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
}

/* === STOIC LOGGER === */
.stoic-container {
    max-width: 700px;
    margin: 0 auto;
}

.stoic-input-area {
    background: var(--black-card);
    border: 1px solid var(--black-border);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 32px;
}

.stoic-date-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.stoic-date-selector label {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--gray-300);
    letter-spacing: 2px;
}

.stoic-date-selector select {
    flex: 1;
    padding: 10px 14px;
    background: var(--black-deep);
    border: 1px solid var(--black-border);
    border-radius: var(--radius-sm);
    color: var(--gray-100);
    font-family: var(--font-mono);
    font-size: 12px;
    cursor: pointer;
    transition: border-color var(--transition-fast);
}

.stoic-date-selector select:focus {
    outline: none;
    border-color: var(--blue-neon);
}

.stoic-textarea {
    width: 100%;
    min-height: 120px;
    padding: 16px;
    background: var(--black-deep);
    border: 1px solid var(--black-border);
    border-radius: var(--radius-sm);
    color: var(--gray-100);
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.7;
    resize: vertical;
    transition: border-color var(--transition-fast);
    margin-bottom: 16px;
}

.stoic-textarea:focus {
    outline: none;
    border-color: var(--blue-neon);
    box-shadow: 0 0 0 3px var(--blue-glow);
}

.stoic-textarea::placeholder {
    color: var(--gray-500);
    font-style: italic;
}

.stoic-entries {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stoic-entry-card {
    background: var(--black-card);
    border: 1px solid var(--black-border);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.stoic-entry-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--blue-neon), var(--orange-safety));
}

.stoic-entry-card:hover {
    border-color: var(--blue-dim);
    transform: translateX(4px);
}

.stoic-entry-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.stoic-entry-day {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--blue-neon);
    letter-spacing: 1px;
    font-weight: 600;
}

.stoic-entry-timestamp {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--gray-400);
}

.stoic-entry-text {
    font-size: 14px;
    line-height: 1.7;
    color: var(--gray-200);
}

.stoic-entry-delete {
    background: none;
    border: none;
    color: var(--gray-500);
    font-size: 14px;
    cursor: pointer;
    padding: 4px;
    transition: color var(--transition-fast);
}

.stoic-entry-delete:hover {
    color: var(--orange-safety);
}

.stoic-empty {
    text-align: center;
    padding: 40px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--gray-400);
}

/* === FOOTER === */
.main-footer {
    padding: 24px;
    text-align: center;
    border-top: 1px solid var(--black-border);
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--gray-500);
    letter-spacing: 1px;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
    .nav-center { display: none; }
    .nav-status { display: none; }

    .section { padding: var(--section-pad) 16px; padding-top: calc(var(--nav-height) + 20px); }
    .section-header h1 { font-size: 18px; letter-spacing: 2px; }

    .map-wrapper { flex-direction: column; height: auto; }
    .map-container { min-height: 400px; }
    .map-sidebar { width: 100%; }

    .stats-bar { gap: 8px; }
    .stat-card { padding: 14px 18px; min-width: 90px; }
    .stat-value { font-size: 24px; }

    .float-card { width: 240px; }

    .antigravity-container { height: 500px; }
}

@media (max-width: 600px) {
    .section-header h1 { font-size: 14px; }
    .antigravity-container { height: 400px; }
    .float-card { width: 200px; }
    .timeline { padding-left: 30px; }
}

/* === MOBILE NAV (bottom) === */
@media (max-width: 900px) {
    .main-nav {
        bottom: 0;
        top: auto;
        border-top: 1px solid var(--black-border);
        border-bottom: none;
    }

    .section {
        padding-top: 20px;
        padding-bottom: calc(var(--nav-height) + 20px);
    }

    /* Show a simple mobile nav */
    .nav-center {
        display: flex;
        gap: 2px;
    }

    .nav-link {
        padding: 6px 10px;
        font-size: 10px;
    }

    .nav-link .nav-icon { display: none; }
    .nav-left { display: none; }
    .nav-right { display: none; }
}

/* === GRID BACKGROUND EFFECT === */
.antigravity-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

/* === SCANLINE EFFECT === */
.antigravity-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    pointer-events: none;
    z-index: 1;
}

.float-card {
    z-index: 2;
}

/* === UTILITY === */
.hidden {
    display: none !important;
}

/* === LEAFLET MAP OVERRIDES === */
.leaflet-container {
    background: var(--black-matte) !important;
    font-family: var(--font-sans) !important;
}

/* Dark zoom controls */
.leaflet-control-zoom a {
    background: var(--black-card) !important;
    color: var(--gray-200) !important;
    border-color: var(--black-border) !important;
    transition: all var(--transition-fast);
}

.leaflet-control-zoom a:hover {
    background: var(--black-elevated) !important;
    color: var(--blue-neon) !important;
}

/* Custom popup (Cyber Matrix) */
.cyber-popup .leaflet-popup-content-wrapper {
    background: var(--black-card);
    border: 1px solid var(--black-border);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 20px var(--blue-glow);
    color: var(--gray-100);
    padding: 0;
}

.cyber-popup .leaflet-popup-content {
    margin: 14px 18px;
}

.cyber-popup .leaflet-popup-tip {
    background: var(--black-card);
    border: 1px solid var(--black-border);
    box-shadow: none;
}

/* Custom marker */
.custom-marker {
    background: none !important;
    border: none !important;
}

/* Marker pulse animation */
@keyframes markerPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 16px currentColor, 0 0 32px currentColor;
    }
    50% {
        transform: scale(1.15);
        box-shadow: 0 0 24px currentColor, 0 0 48px currentColor;
    }
}

/* Route arrow */
.route-arrow {
    background: none !important;
    border: none !important;
}

/* Hide Leaflet default attribution */
.leaflet-control-attribution {
    display: none !important;
}

/* === SECTION: MAP — ensure Leaflet fills container === */
#map-container .leaflet-container,
#map-container > .leaflet-container {
    width: 100% !important;
    height: 100% !important;
    border-radius: var(--radius-lg);
}

/* === NOTIFICATION TOAST === */
.toast {
    position: fixed;
    bottom: 80px;
    right: 24px;
    background: var(--black-card);
    border: 1px solid var(--blue-dim);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--blue-neon);
    z-index: 3000;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px var(--blue-glow);
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
    from { opacity: 1; }
    to { opacity: 0; pointer-events: none; }
}

/* === KEYBOARD SHORTCUT BAR (desktop) === */
.kbd-hint {
    position: fixed;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 16px;
    background: rgba(22, 22, 31, 0.8);
    backdrop-filter: blur(12px);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--black-border);
    z-index: 500;
}

.kbd-hint span {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--gray-400);
    display: flex;
    align-items: center;
    gap: 4px;
}

.kbd-hint kbd {
    display: inline-block;
    padding: 2px 6px;
    background: var(--black-elevated);
    border: 1px solid var(--black-border);
    border-radius: 3px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--gray-200);
}

@media (max-width: 900px) {
    .kbd-hint { display: none; }
}
