/* RESOURCE COLORS */
:root {
    --wood: #8B4513;
    --stone: #888;
    --gold: #FFD700;
    --gem: #E0115F;
    --credit: #00ffcc;
    --iron: #aaaaff;
    --titanium: #4444ff;
    --uranium: #00ff00;
    --panel: rgba(15, 20, 25, 0.98);
    --border: #666;
}

#main-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.menu-btn {
    background: #111;
    border: 2px solid #4f4;
    color: #fff;
    padding: 15px 30px;
    font-size: 20px;
    cursor: pointer;
    border-radius: 8px;
    font-family: 'Cinzel', serif;
    transition: 0.2s;
    min-width: 180px;
}

.menu-btn:hover {
    transform: scale(1.05);
    background: #222;
}

.ext-link-huge {
    color: #888;
    text-decoration: none;
    font-size: 14px;
    border: 1px solid #444;
    padding: 10px 20px;
    border-radius: 4px;
    transition: 0.2s;
}

.ext-link-huge:hover {
    color: #fff;
    border-color: #fff;
    background: #222;
}

#bottom-links {
    position: absolute;
    bottom: 10px;
    left: 10px;
    display: flex;
    gap: 15px;
    pointer-events: auto;
}

#bottom-links a {
    color: var(--gold);
    text-decoration: none;
    font-weight: bold;
    font-size: 12px;
    text-shadow: 0 0 5px #000;
    transition: 0.2s;
}

#bottom-links a:hover {
    color: #fff;
    text-shadow: 0 0 10px var(--gold);
}

/* VIRAAJ PROMO */
#viraaj-promo {
    margin-top: 50px;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #333;
}

.vp-title {
    font-size: 14px;
    color: #888;
    letter-spacing: 3px;
    margin-bottom: 5px;
    /* Sits 'on top' of the content */
    font-weight: bold;
}

.vp-links {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.vp-btn {
    text-decoration: none;
    background: linear-gradient(135deg, #222, #111);
    color: var(--gold);
    border: 1px solid #444;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    font-family: 'Cinzel', serif;
    transition: 0.2s;
    text-align: center;
    min-width: 180px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.vp-btn:hover {
    transform: translateY(-3px);
    border-color: var(--gold);
    box-shadow: 0 6px 15px rgba(255, 215, 0, 0.2);
    color: #fff;
}

body {
    margin: 0;
    overflow: hidden;
    background: #080808;
    color: #fff;
    font-family: 'Roboto', sans-serif;
    user-select: none;
}

canvas {
    display: block;
}

/* UI OVERLAYS */
#ui-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* BRANDING */
#brand {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-family: 'Cinzel', serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.3);
    pointer-events: none;
}

/* RESOURCES */
#res-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: var(--panel);
    border-bottom: 2px solid var(--border);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    pointer-events: auto;
    font-family: 'Cinzel', serif;
    font-size: 14px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    flex-wrap: wrap;
    padding: 0 20px;
}

.res {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* CONTROLS BOTTOM */
#build-dock {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    background: var(--panel);
    padding: 8px;
    border: 2px solid var(--border);
    border-radius: 8px;
    pointer-events: auto;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.5);
}

.b-btn {
    width: 48px;
    height: 48px;
    background: #222;
    border: 1px solid #444;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 9px;
    color: #aaa;
    transition: 0.1s;
}

.b-btn:hover {
    background: #333;
    color: #fff;
    border-color: #888;
    transform: translateY(-2px);
}

.b-btn.active {
    border-color: var(--gold);
    background: #332a00;
    color: var(--gold);
}

/* MODALS */
.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(20, 25, 30, 0.98);
    border: 2px solid var(--gold);
    padding: 25px;
    width: 450px;
    display: none;
    pointer-events: auto;
    box-shadow: 0 0 30px #000;
    z-index: 100;
    border-radius: 6px;
}

.modal h2 {
    margin: 0 0 15px 0;
    color: var(--gold);
    font-family: 'Cinzel', serif;
    text-align: center;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
}

.m-row {
    display: flex;
    justify-content: space-between;
    margin: 12px 0;
    align-items: center;
    font-size: 14px;
}

.btn {
    background: #333;
    border: 1px solid #666;
    color: #fff;
    padding: 6px 16px;
    cursor: pointer;
    border-radius: 3px;
    font-weight: bold;
    transition: 0.2s;
}

.btn:hover {
    background: #555;
    border-color: #fff;
}

.btn-buy {
    color: var(--gold);
    border-color: #866600;
}

/* DAY NIGHT CLOCK */
#clock {
    position: absolute;
    top: 60px;
    right: 20px;
    font-size: 20px;
    font-weight: bold;
    text-shadow: 0 0 5px #000;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 15px;
    border-radius: 20px;
}

/* TOOLTIPS */
#tooltip {
    position: absolute;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.95);
    padding: 12px;
    border: 1px solid #777;
    display: none;
    text-align: center;
    width: 260px;
    pointer-events: none;
    font-size: 11px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
    border-radius: 4px;
}

/* CAP WARNING */
#cap-warn {
    position: absolute;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    color: #f00;
    font-weight: bold;
    font-size: 14px;
    text-shadow: 1px 1px 0 #000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    text-align: center;
}
