*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    height: 100%;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    color: #d8dee9;
    background: #0b0e12;
}

/* Fullscreen simulation */
.sim_body {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.sim_header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-shrink: 0;
    padding: 10px 16px;
    background: rgba(15, 20, 28, 0.92);
    border-bottom: 1px solid #2a3344;
    z-index: 10;
}

.sim_header_left {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.sim_header_stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    font-size: 0.78rem;
}

.sim_stat {
    font-variant-numeric: tabular-nums;
    color: #a8b4c8;
}

.sim_stat.female_stat {
    color: #ff8ec4;
}

.sim_stat.male_stat {
    color: #6eb5ff;
}

.sim_stat.divorced_stat {
    color: #b8c4d0;
}

.sim_header_actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.sim_setup_btn {
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid #455268;
    border-radius: 6px;
    background: #243044;
    color: #c5d0e0;
    text-decoration: none;
}

.sim_setup_btn:hover {
    background: #2f3f58;
    color: #e8edf5;
}

.sim_body.sim_running .sim_header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(15, 20, 28, 0.75);
    border-bottom: none;
}

.sim_title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #e8c87a;
}

.sim_launch_btn {
    padding: 10px 28px;
    font-size: 1rem;
    font-weight: 600;
    border: 1px solid #5a7aa8;
    border-radius: 6px;
    background: #3a5a8a;
    color: #fff;
    cursor: pointer;
}

.sim_launch_btn:hover {
    background: #4a6a9a;
}

.sim_main {
    flex: 1;
    min-height: 0;
    position: relative;
    background: #0f1419;
}

.sim_body.sim_running .sim_main {
    flex: 1;
    height: 100%;
}

#similarity_canvas {
    display: block;
    width: 100%;
    height: 100%;
}

@media (max-width: 720px) {
    .sim_header {
        flex-direction: column;
        align-items: stretch;
    }

    .sim_header_actions {
        justify-content: center;
    }
}
