
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&display=swap');

:root {
    --bg: #101a2d;
    --panel: #18263c;
    --panel-light: #1d3048;
    --text: #f2f7fc;
    --muted: #94a9bf;
    --cyan: #7bd7e9;
    --turquoise: #59cbbb;
    --purple: #b6a0f1;
    --border: rgba(190, 220, 245, .10);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

button {
    font: inherit;
    cursor: pointer;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */

.sidebar {
    width: 245px;
    min-width: 245px;
    background: #121f33;
    border-left: 1px solid var(--border);
    padding: 28px 18px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px 35px;
}

.brand-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, #64d4dc, #8d9cf0);
    display: grid;
    place-items: center;
    font-size: 25px;
    box-shadow: 0 5px 20px #58cbdc33;
}

.brand h2 {
    font-family: Arial, sans-serif;
    font-size: 19px;
    letter-spacing: 1.5px;
}

.brand span {
    font-size: 11px;
    color: var(--muted);
}

.nav-label {
    color: #71869e;
    font-size: 11px;
    padding: 0 12px;
    margin-bottom: 13px;
}

.navigation {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    border: 0;
    color: #a5b6c9;
    background: transparent;
    text-align: right;
    padding: 13px 14px;
    border-radius: 10px;
    font-size: 13px;
    transition: .2s;
}

.nav-item span {
    margin-left: 10px;
}

.nav-item:hover,
.nav-item.active {
    background: linear-gradient(90deg, #263b56, #20344c);
    color: #86e2e7;
}

.sidebar-bottom {
    margin-top: auto;
}

.research-card {
    padding: 17px;
    border-radius: 13px;
    background: linear-gradient(135deg, #213e50, #292e51);
    border: 1px solid #80d7df22;
}

.research-card span {
    color: var(--cyan);
    font-size: 22px;
}

.research-card p {
    font-size: 12px;
    line-height: 1.9;
    color: #c2d5e4;
    margin-top: 7px;
}

.version {
    text-align: center;
    font-size: 9px;
    color: #62778e;
    margin-top: 23px;
    letter-spacing: 1px;
}

/* Main content */

.main-content {
    flex: 1;
    min-width: 0;
    padding: 25px 35px;
    max-width: 1650px;
    margin: 0 auto;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.breadcrumb {
    font-size: 11px;
    color: #8097ae;
}

.topbar h3 {
    font-size: 17px;
    margin-top: 4px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 17px;
}

.status {
    font-size: 11px;
    color: #9dcdbd;
    background: #244239;
    padding: 8px 12px;
    border-radius: 20px;
}

.status span {
    display: inline-block;
    background: #62d5a6;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-left: 5px;
}

.avatar {
    width: 39px;
    height: 39px;
    display: grid;
    place-items: center;
    background: #293b54;
    border: 1px solid var(--border);
    border-radius: 50%;
    font-size: 20px;
}

/* Sections */

.page-section {
    display: none;
    animation: appear .35s ease;
}

.page-section.active {
    display: block;
}

@keyframes appear {
    from {
        opacity: 0;
        transform: translateY(9px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Welcome banner */

.welcome-banner {
    position: relative;
    overflow: hidden;
    min-height: 270px;
    border-radius: 20px;
    padding: 38px;
    background:
        radial-gradient(circle at 80% 30%, #4ab6bd33, transparent 27%),
        linear-gradient(110deg, #203b54, #263253 65%, #34345b);
    border: 1px solid #a2d9eb22;
    display: flex;
    align-items: center;
}

.welcome-content {
    position: relative;
    z-index: 2;
    max-width: 550px;
}

.eyebrow,
.section-kicker {
    font-size: 11px;
    color: var(--cyan);
    letter-spacing: .5px;
}

.welcome-content h1 {
    font-size: clamp(24px, 3vw, 35px);
    line-height: 1.7;
    margin: 10px 0;
}

.welcome-content p {
    color: #c0d0df;
    font-size: 12px;
    line-height: 2;
    max-width: 460px;
    margin-bottom: 19px;
}

.primary-btn {
    background: linear-gradient(110deg, #65d2d7, #78bce8);
    color: #10263a;
    border: 0;
    border-radius: 9px;
    padding: 12px 20px;
    font-size: 12px;
    font-weight: 700;
    transition: .25s;
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px #62d5df33;
}

.primary-btn span {
    margin-right: 8px;
}

.welcome-art {
    position: absolute;
    left: 8%;
    top: 50%;
    transform: translateY(-50%);
    width: 250px;
    height: 250px;
    display: grid;
    place-items: center;
}

.dna-art {
    font-size: 110px;
    filter: drop-shadow(0 0 20px #7bd7e955);
    z-index: 2;
    animation: float 4s ease-in-out infinite;
}

.orbit {
    position: absolute;
    width: 220px;
    height: 220px;
    border: 1px solid #8edfe055;
    border-radius: 50%;
}

.orbit-two {
    width: 175px;
    height: 250px;
    transform: rotate(55deg);
    border-color: #b8a1ef55;
}

.floating-cell {
    position: absolute;
    color: #9fe9ed;
    font-size: 25px;
}

.cell-one { top: 15px; right: 30px; }
.cell-two { bottom: 20px; left: 15px; color: #c0a9f5; }
.cell-three { top: 50%; left: 0; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-13px); }
}

.banner-decoration {
    position: absolute;
    left: 30px;
    bottom: 10px;
    font-family: Arial, sans-serif;
    font-size: 45px;
    letter-spacing: 5px;
    font-weight: bold;
    color: #ffffff08;
}

/* Section headings */

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 30px 0 17px;
}

.section-heading h2 {
    font-size: 18px;
    margin-top: 5px;
}

.level-tag {
    font-size: 11px;
    background: #343252;
    color: #c1aafa;
    padding: 8px 13px;
    border-radius: 20px;
}

/* Statistics */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 13px;
}

.stat-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 13px;
    padding: 17px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: .2s;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: #77d6df55;
}

.stat-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    font-size: 15px;
    margin-bottom: 3px;
}

.purple { background: #443965; color: #c5afff; }
.blue { background: #26425c; color: #82d7ed; }
.green { background: #254c46; color: #74d8b3; }
.orange { background: #51402f; color: #efbd79; }

.stat-card > span {
    color: #a8b9cb;
    font-size: 11px;
}

.stat-card strong {
    font-size: 23px;
    font-family: Arial, sans-serif;
}

.stat-card small {
    font-size: 10px;
    color: #738aa2;
}

/* Biomes */

.environment-heading {
    margin-top: 34px;
}

.text-btn {
    background: none;
    border: none;
    color: var(--cyan);
    font-size: 11px;
}

.biomes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.biome-card {
    text-align: right;
    color: var(--text);
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 15px;
    min-height: 205px;
    display: flex;
    flex-direction: column;
    transition: .25s;
    overflow: hidden;
    position: relative;
}

.biome-card:hover:not(.locked) {
    transform: translateY(-5px);
    border-color: #7bd7e9aa;
    box-shadow: 0 10px 25px #0002;
}

.biome-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.biome-number {
    color: #718ba3;
    font-size: 10px;
    font-family: Arial;
}

.biome-lock {
    color: #8cd9c1;
    background: #264b42;
    border-radius: 15px;
    padding: 5px 9px;
    font-size: 9px;
}

.biome-emoji {
    font-size: 36px;
    margin: 9px 0;
    filter: drop-shadow(0 5px 8px #0002);
}

.biome-info h3 {
    font-size: 14px;
    margin-bottom: 5px;
}

.biome-info p {
    color: #8fa5b9;
    font-size: 10px;
    line-height: 1.8;
}

.biome-footer {
    margin-top: auto;
    padding-top: 13px;
    color: #8cdae3;
    font-size: 10px;
    display: flex;
    justify-content: space-between;
}

.biome-card.locked {
    opacity: .55;
    cursor: not-allowed;
    filter: saturate(.6);
}

.ocean { background: linear-gradient(145deg, #183d55, #192c44); }
.freshwater { background: linear-gradient(145deg, #1c4650, #192f46); }
.forest { background: linear-gradient(145deg, #244b40, #1b3041); }
.desert { background: linear-gradient(145deg, #564332, #2c3041); }
.human { background: linear-gradient(145deg, #493750, #26314b); }
.hot { background: linear-gradient(145deg, #553b37, #303148); }

.main-footer {
    display: flex;
    justify-content: space-between;
    color: #657e94;
    font-size: 10px;
    border-top: 1px solid var(--border);
    padding-top: 20px;
    margin-top: 35px;
}

/* Other pages */

.page-intro {
    margin: 15px 0 25px;
}

.page-intro h1 {
    font-size: 28px;
    margin: 8px 0;
}

.page-intro p {
    color: var(--muted);
    font-size: 12px;
    line-height: 2;
}

.world-panel,
.empty-panel {
    background:
        radial-gradient(circle at 50% 20%, #64d2d733, transparent 35%),
        var(--panel);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 45px 20px;
    text-align: center;
}

.world-symbol {
    font-size: 75px;
    margin-bottom: 12px;
}

.world-panel h2,
.empty-panel h2 {
    font-size: 20px;
    margin-bottom: 10px;
}

.world-panel p,
.empty-panel p {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 22px;
    line-height: 2;
}

.empty-icon {
    font-size: 55px;
    margin-bottom: 18px;
}

.world-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 18px;
}

.world-mini-item {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 17px;
    font-size: 12px;
}

/* Modal */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: #07101dd9;
    backdrop-filter: blur(7px);
    z-index: 20;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.show {
    display: flex;
    animation: appear .2s ease;
}

.modal {
    width: 100%;
    max-width: 420px;
    position: relative;
    background: #1c2d43;
    border: 1px solid #9bdfe333;
    border-radius: 19px;
    padding: 35px;
    text-align: center;
}

.modal-close {
    position: absolute;
    left: 15px;
    top: 12px;
    background: none;
    border: 0;
    color: #9db0c4;
    font-size: 27px;
}

.modal-icon {
    font-size: 55px;
    margin-bottom: 13px;
}

.modal h2 {
    font-size: 23px;
    margin: 8px 0;
}

.modal > p {
    color: var(--muted);
    font-size: 12px;
    line-height: 2;
    margin-bottom: 20px;
}

.mission-preview {
    background: #111f32;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: right;
    margin-bottom: 20px;
}

.mission-preview span {
    color: var(--cyan);
    font-size: 10px;
}

.mission-preview strong {
    font-size: 13px;
}

.mission-preview small {
    color: var(--muted);
    font-size: 10px;
}

.modal-start {
    width: 100%;
}

/* Toast */

.toast {
    position: fixed;
    bottom: 25px;
    left: 25px;
    background: #29483f;
    border: 1px solid #70d6b155;
    color: #c5f3df;
    border-radius: 10px;
    padding: 13px 20px;
    font-size: 12px;
    opacity: 0;
    transform: translateY(15px);
    pointer-events: none;
    transition: .3s;
    z-index: 30;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */

@media (max-width: 1050px) {
    .sidebar {
        width: 205px;
        min-width: 205px;
    }

    .main-content {
        padding: 22px;
    }

    .welcome-art {
        opacity: .45;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .app-shell {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-width: 0;
        min-height: auto;
        padding: 12px;
        border-left: 0;
        border-bottom: 1px solid var(--border);
    }

    .brand {
        padding: 0 5px 12px;
    }

    .navigation {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 5px;
    }

    .nav-label,
    .sidebar-bottom {
        display: none;
    }

    .nav-item {
        flex-shrink: 0;
        padding: 10px;
        font-size: 10px;
    }

    .nav-item span {
        margin-left: 4px;
    }

    .main-content {
        padding: 17px 13px;
    }

    .topbar {
        margin-bottom: 17px;
    }

    .topbar h3 {
        font-size: 14px;
    }

    .status {
        display: none;
    }

    .welcome-banner {
        min-height: 280px;
        padding: 23px;
    }

    .welcome-content {
        max-width: 100%;
    }

    .welcome-content h1 {
        font-size: 24px;
    }

    .welcome-content p {
        max-width: 90%;
    }

    .welcome-art {
        left: -100px;
        opacity: .15;
    }

    .stats-grid {
        gap: 9px;
    }

    .stat-card {
        padding: 13px;
    }

    .stat-card strong {
        font-size: 19px;
    }

    .biomes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 9px;
    }

    .biome-card {
        min-height: 195px;
        padding: 11px;
    }

    .biome-info h3 {
        font-size: 12px;
    }

    .biome-info p {
        font-size: 9px;
    }

    .world-mini-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .main-footer {
        font-size: 9px;
    }
}

@media (max-width: 370px) {
    .biomes-grid {
        grid-template-columns: 1fr;
    }
}
