@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

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

:root {
    --bg-primary: #090d16;
    --bg-secondary: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.75);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(59, 130, 246, 0.4);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent-blue: #3b82f6;
    --accent-indigo: #6366f1;
    
    --highlight-yellow: #f59e0b;
    --highlight-red: #ef4444;
    --highlight-green: #10b981;
    
    --shadow-main: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 25px rgba(59, 130, 246, 0.15);
}

[data-theme="light"] {
    --bg-primary: #f1f5f9;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.85);
    --border-color: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(37, 99, 235, 0.4);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --accent-blue: #2563eb;
    --accent-indigo: #4f46e5;
    
    --highlight-yellow: #d97706;
    --highlight-red: #dc2626;
    --highlight-green: #059669;
    
    --shadow-main: 0 20px 40px -15px rgba(0, 0, 0, 0.07);
    --shadow-glow: 0 0 25px rgba(37, 99, 235, 0.1);
}

html, body {
    width: 100%;
    min-height: 100vh;
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif !important;
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.glow-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.4;
}

.orb-1 { width: 500px; height: 500px; top: -100px; left: -100px; background: radial-gradient(circle, var(--accent-blue), transparent 70%); }
.orb-2 { width: 600px; height: 600px; bottom: -150px; right: -150px; background: radial-gradient(circle, var(--accent-indigo), transparent 70%); }

a { color: inherit; text-decoration: none; }

/* HEADER */
header {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.9rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo { display: flex; align-items: center; gap: 14px; }
.logo-icon {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-indigo));
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.logo-text h1 { font-size: 1.15rem; font-weight: 800; line-height: 1.2; letter-spacing: -0.02em; }
.logo-text h1 span { font-weight: 500; color: var(--text-secondary); }
.logo-text .subtext { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

nav { display: flex; align-items: center; gap: 2rem; }
.nav-links { display: flex; gap: 1.5rem; list-style: none; }
.nav-links a { color: var(--text-secondary); font-weight: 600; font-size: 0.92rem; transition: color 0.2s; }
.nav-links a:hover { color: var(--accent-blue); }

.theme-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}

.theme-toggle:hover { border-color: var(--border-hover); box-shadow: var(--shadow-glow); }
.sun-icon { display: none; }
[data-theme="light"] .sun-icon { display: block; }
[data-theme="light"] .moon-icon { display: none; }

/* HERO */
.hero { max-width: 1200px; margin: 3.5rem auto 2.5rem; padding: 0 1.5rem; text-align: center; }
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 20px;
    color: var(--accent-blue);
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero h2 { font-size: 2.8rem; font-weight: 800; line-height: 1.15; letter-spacing: -0.03em; margin-bottom: 1rem; }
.gradient-text {
    background: linear-gradient(135deg, #60a5fa, #a78bfa, #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero p { color: var(--text-secondary); font-size: 1.05rem; max-width: 650px; margin: 0 auto; }

/* CONTAINER & CARDS */
.container { max-width: 1200px; margin: 0 auto 4rem; padding: 0 1.5rem; }
.glassmorphism {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-main);
    transition: border-color 0.3s ease;
}
.glassmorphism:hover { border-color: var(--border-hover); }

.section-title { display: flex; align-items: center; gap: 14px; margin-bottom: 1.8rem; }
.icon-wrap {
    width: 46px;
    height: 46px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-blue);
}
.section-title h3 { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.01em; }
.section-subtitle { font-size: 0.85rem; color: var(--text-secondary); font-weight: 500; }

/* MAP CONTROLS */
.map-controls { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.2rem; margin-bottom: 1.8rem; }
.floor-buttons { display: flex; background: var(--bg-secondary); padding: 5px; border-radius: 14px; border: 1px solid var(--border-color); }
.floor-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 9px 22px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.25s ease;
}
.floor-btn.active {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-indigo));
    color: white;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.search-box { position: relative; flex-grow: 1; max-width: 360px; }
.search-box.full-width { max-width: 100%; }
.search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.search-box input {
    width: 100%;
    padding: 11px 16px 11px 42px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s ease;
}
.search-box input:focus { border-color: var(--accent-blue); box-shadow: var(--shadow-glow); }

/* SCHEMATIC BUILDING LAYOUT */
.building-container { width: 100%; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 18px; padding: 1.8rem; overflow-x: auto; }
.building-grid { display: grid; grid-template-columns: 160px 1fr 160px; gap: 14px; min-width: 640px; height: 380px; }
.wing { border: 2px dashed var(--border-color); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 10px; background: rgba(0, 0, 0, 0.05); }
.wing-title { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); text-align: center; font-weight: 800; margin-bottom: 4px; }
.room {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    transition: all 0.25s ease;
}
.room:hover { border-color: var(--accent-blue); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2); }

.room.legend-yellow { background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.35); color: var(--highlight-yellow); }
.room.legend-red { background: rgba(239, 68, 68, 0.12); border-color: rgba(239, 68, 68, 0.35); color: var(--highlight-red); }
.room.legend-green { background: rgba(16, 185, 129, 0.12); border-color: rgba(16, 185, 129, 0.35); color: var(--highlight-green); }

.room.active-search { animation: pulseGlow 1.2s infinite alternate ease-in-out; border-color: var(--accent-blue) !important; }

@keyframes pulseGlow {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
    100% { transform: scale(1.03); box-shadow: 0 0 20px 4px rgba(59, 130, 246, 0.6); }
}

.main-entrance {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-indigo));
    color: white;
    text-align: center;
    padding: 10px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.85rem;
    margin-top: 14px;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.legend { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: 1.2rem; font-size: 0.85rem; color: var(--text-secondary); font-weight: 500; }
.legend-item { display: flex; align-items: center; gap: 8px; }
.legend-color { width: 14px; height: 14px; border-radius: 4px; }
.legend-yellow { background: var(--highlight-yellow); }
.legend-red { background: var(--highlight-red); }
.legend-green { background: var(--highlight-green); }

/* TABLE */
.search-wrapper { margin-bottom: 1.2rem; }
.table-responsive { overflow-x: auto; border-radius: 14px; border: 1px solid var(--border-color); }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.9rem; }
th, td { padding: 14px 18px; border-bottom: 1px solid var(--border-color); }
th { background-color: var(--bg-secondary); color: var(--text-muted); font-weight: 700; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.05em; }
tbody tr:hover { background-color: rgba(255, 255, 255, 0.03); }
tbody tr:last-child td { border-bottom: none; }

.code-badge {
    background: rgba(59, 130, 246, 0.12);
    padding: 5px 10px;
    border-radius: 8px;
    font-family: monospace;
    font-weight: 700;
    color: var(--accent-blue);
    border: 1px solid rgba(59, 130, 246, 0.25);
}

/* ABOUT */
.about-desc { color: var(--text-secondary); font-size: 0.98rem; line-height: 1.7; margin-bottom: 1.5rem; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.2rem; }
.info-box {
    background: var(--bg-secondary);
    padding: 1.2rem;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 14px;
}
.info-icon { color: var(--accent-blue); }
.info-box strong { display: block; font-size: 0.9rem; margin-bottom: 2px; }
.info-box p { color: var(--text-secondary); font-size: 0.85rem; }

footer { border-top: 1px solid var(--border-color); padding: 2.5rem 1.5rem; text-align: center; color: var(--text-muted); font-size: 0.85rem; }

/* ====================================================== */
/* RUNWAY & LANDING PLANE WIDGET (BOTTOM RIGHT)          */
/* ====================================================== */
.runway-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 160px;
    height: 70px;
    z-index: 9999;
    cursor: pointer;
}

.runway-track {
    position: absolute;
    bottom: 10px;
    right: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.runway-lights {
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(90deg, var(--accent-blue) 0px, var(--accent-blue) 12px, transparent 12px, transparent 24px);
    animation: moveLights 1.5s linear infinite;
}

@keyframes moveLights {
    0% { transform: translateX(0); }
    100% { transform: translateX(-24px); }
}

.landing-plane {
    position: absolute;
    width: 32px;
    height: 32px;
    color: var(--accent-blue);
    filter: drop-shadow(0 4px 10px rgba(59, 130, 246, 0.6));
    animation: planeLanding 3.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes planeLanding {
    0% {
        transform: translate(-160px, -120px) rotate(35deg) scale(1.4);
        opacity: 0;
    }
    30% { opacity: 1; }
    70% { transform: translate(-30px, -6px) rotate(5deg) scale(1); }
    85% { transform: translate(-10px, -4px) rotate(0deg) scale(1); }
    100% { transform: translate(0px, -4px) rotate(0deg) scale(1); }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero h2 { font-size: 2rem; }
    .map-controls { flex-direction: column; align-items: stretch; }
    .search-box { max-width: 100%; }
    .runway-widget { scale: 0.85; right: 10px; bottom: 10px; }
}
