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

html, body {
    width: 100%;
    min-height: 100%;
    background: #090d16;
    font-family: system-ui, sans-serif;
    color: #fff;
    user-select: none;
}

/* Hub Dashboard Styles */
body.hub-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-y: auto;
    background: radial-gradient(circle at center, #1a1a1a 0%, #0a0a0a 100%);
}

.hub-container {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hub-header h1 {
    font-size: 2.5rem;
    color: #0f0;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.hub-header p {
    color: #888;
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.scenario-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.scenario-card {
    background: #181818;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.scenario-card:hover {
    transform: translateY(-5px);
    border-color: #0f0;
    box-shadow: 0 10px 20px rgba(0, 255, 0, 0.1);
}

.card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.scenario-card h2 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #fff;
}

.scenario-card p {
    color: #aaa;
    font-size: 0.9rem;
    margin-bottom: 20px;
    flex-grow: 1;
    line-height: 1.4;
}

.btn-play {
    display: inline-block;
    background: #222;
    color: #0f0;
    border: 1px solid #0f0;
    padding: 10px 0;
    text-align: center;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.2s, color 0.2s;
}

.btn-play:hover {
    background: #0f0;
    color: #111;
}

/* Gameplay Page Layout */
.game-body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100vh;
}

#hub-bar {
    height: 50px;
    background: #181818;
    border-bottom: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    font-size: 14px;
    font-weight: bold;
    z-index: 100;
    flex-shrink: 0;
}

.hub-title {
    color: #0f0;
    font-size: 16px;
    text-decoration: none;
}

.hub-title:hover {
    text-decoration: underline;
}

.hud-items {
    display: flex;
    gap: 20px;
}

.hud-item span {
    color: #0f0;
}

#canvas-container {
    flex-grow: 1;
    overflow: auto;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

canvas {
    display: block;
    cursor: crosshair;
    background: #000;
    border: 2px solid #555;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    flex-shrink: 0;
}

/* Settings Menu Drawer */
#menu-toggle-btn {
    position: fixed;
    top: 65px;
    right: 15px;
    background: rgba(40, 40, 40, 0.8);
    color: #fff;
    border: 1px solid #666;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    z-index: 1000;
    font-size: 14px;
}

#config-menu {
    position: fixed;
    top: 110px;
    right: 15px;
    width: 300px;
    background: rgba(18, 18, 18, 0.95);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 20px;
    z-index: 999;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: none;
}

#config-menu.open {
    display: block;
}

.config-group {
    margin-bottom: 12px;
}

.config-group label {
    display: block;
    font-size: 12px;
    color: #aaa;
    margin-bottom: 4px;
}

.config-group input[type="range"], .config-group select {
    width: 100%;
    cursor: pointer;
}

.range-value {
    float: right;
    color: #0f0;
    font-size: 12px;
}

.btn-action {
    width: 100%;
    background: #333;
    border: 1px solid #666;
    color: #fff;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 5px;
}

.btn-action:hover {
    background: #444;
}

/* Footer Styles */
footer {
    width: 100%;
    background: #111827;
    color: #94a3b8;
    font-size: 13px;
    text-align: center;
    padding: 30px 20px;
    border-top: 1px solid #1f2937;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    box-sizing: border-box;
}

.footer-links {
    display: flex;
    gap: 20px;
}

footer a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s ease;
}

footer a:hover {
    color: #3b82f6;
    text-decoration: underline;
}
