/* SETUP DASAR & RESET MODERN */
html {
    box-sizing: border-box;
}
*, *:before, *:after {
    box-sizing: inherit;
    margin: 0;
    padding: 0;
}

body {
    background-color: #050505;
    color: #ffffff;
    font-family: 'Urbanist', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

.app-container {
    display: flex;
    height: 100vh;        /* fallback */
    height: calc(var(--vh, 1vh) * 100);
    width: 100vw;
    background-color: #000000;
}

/* DESKTOP SIDEBAR (LEFT) */
@media (min-width: 769px) {
    .app-container {
        flex-direction: row;
    }
    .sidebar {
        width: 100px;
        height: 100%;
        background: linear-gradient(180deg, #0a0a0a 0%, #1a1a1a 100%);
        border-right: 1px solid #333;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 30px;
        z-index: 100;
        transition: all 0.3s ease;
    }
    .content-area {
        height: 100%;
    }
}

/* MOBILE SIDEBAR (BOTTOM) */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: 70px;
        background: linear-gradient(180deg, #0a0a0a 0%, #1a1a1a 100%);
        border-top: 1px solid #333;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 20px;
        z-index: 100;
        order: 2;
        flex-shrink: 0;
    }
    .content-area {
        order: 1;
        flex-grow: 1;
        min-height: 0;
        position: relative;
        background: radial-gradient(circle at center, #111 0%, #000 100%);
    }
    .section-slide {
        padding: 30px 20px;
    }
}

/* shared nav-item styles */
.nav-item {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}
.nav-item i {
    font-size: 24px;
    color: #666;
    transition: color 0.3s ease;
}
.nav-item:hover {
    background: #333;
}
.nav-item.active {
    border-color: #00f7ff;
    box-shadow: 0 0 15px rgba(0, 247, 255, 0.3);
}
.nav-item.active i {
    color: #00f7ff;
}

/* Tooltip desktop */
@media (min-width: 769px) and (hover: hover) {
    .nav-item::after {
        content: attr(data-label);
        position: absolute;
        left: 75px;
        font-size: 12px;
        color: #fff;
        background: rgba(0, 0, 0, 0.9);
        padding: 6px 12px;
        border-radius: 4px;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s;
        white-space: nowrap;
        border: 1px solid #333;
        font-family: 'Orbitron', sans-serif;
        z-index: 200;
    }
    .nav-item:hover::after {
        opacity: 1;
    }
}

/* CONTENT AREA */
.content-area {
    flex-grow: 1;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at center, #111 0%, #000 100%);
}

.section-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    overflow-y: auto;
}

.section-slide.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.content-box {
    max-width: 800px;
    width: 100%;
    background: rgba(0, 247, 255, 0.02);
    padding: 40px;
    border-radius: 12px;
    border-left: 3px solid #00f7ff;
    backdrop-filter: blur(2px);
    height: auto;
    overflow-y: visible;
}

/* TYPOGRAPHY */
h1, h2 {
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0 0 10px 0;
    color: #ffffff;
}
.title-large {
    font-size: clamp(28px, 6vw, 48px);
    line-height: 1.1;
}
.title-medium {
    font-size: clamp(22px, 5vw, 36px);
    line-height: 1.2;
}
.subtitle {
    font-size: clamp(14px, 4vw, 18px);
    color: #00f7ff;
    margin-bottom: 30px;
    font-weight: 600;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
}
p {
    line-height: 1.7;
    font-size: clamp(14px, 2vw, 18px);
    color: #ccc;
    margin-bottom: 20px;
}
.badge-rank {
    background: #00f7ff;
    color: #000;
    padding: 5px 15px;
    font-weight: bold;
    font-size: clamp(10px, 3vw, 12px);
    margin-bottom: 15px;
    display: inline-block;
    font-family: 'Orbitron', sans-serif;
    clip-path: polygon(10% 0, 100% 0, 90% 100%, 0 100%);
    letter-spacing: 0.5px;
}
.mission-log {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px dashed #333;
}
.mission-log h3 {
    font-size: clamp(10px, 3vw, 12px);
    color: #666;
    font-family: 'Orbitron';
    margin-bottom: 10px;
    letter-spacing: 1px;
}
.directive-text {
    font-size: clamp(12px, 3vw, 14px);
    margin-bottom: 0;
    color: #00f7ff;
    font-family: monospace;
    word-break: break-word;
}

/* RESPONSIVE */
@media (max-width: 560px) {
    .section-slide { padding: 20px 15px; }
    .content-box { padding: 20px 16px; }
    .nav-item { width: 50px; height: 50px; }
    .nav-item i { font-size: 20px; }
}
@media (max-width: 480px) {
    .sidebar { height: 60px; gap: 12px; }
    .nav-item { width: 44px; height: 44px; }
    .nav-item i { font-size: 18px; }
}
@media (min-width: 1600px) {
    .content-box { max-width: 1000px; padding: 50px 60px; }
}

/* Prevent horizontal overflow */
body, .app-container, .section-slide, .content-box {
    overflow-x: hidden;
}

/* Smooth scrollbar */
.section-slide {
    scrollbar-width: thin;
    scrollbar-color: #00f7ff #1a1a1a;
}
.section-slide::-webkit-scrollbar {
    width: 5px;
}
.section-slide::-webkit-scrollbar-track {
    background: #1a1a1a;
}
.section-slide::-webkit-scrollbar-thumb {
    background: #00f7ff;
    border-radius: 6px;
}