body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: linear-gradient(105deg, #1f1f1f 0%, #1f1f1f 25%, #d31027 25%, #d31027 32%, #f0f0f0 32%, #f0f0f0 100%);
    font-family: 'Inter', sans-serif;
    color: #333;
    user-select: none;
    -webkit-user-select: none;
}

canvas {
    display: block;
    width: 100vw;
    height: 100vh;
}

#ui-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    padding: 40px;
    box-sizing: border-box;
    z-index: 10;
}

/* Typography & Colors */
.red-text {
    color: #c0392b;
}

.stat-title,
.architecture,
.tracker-title {
    color: #d32f2f;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

/* Left Panel */
.left-panel {
    position: absolute;
    top: 40px;
    left: 40px;
    width: 280px;
    pointer-events: auto;
}

.stat-card {
    background: #ffffff;
    padding: 25px 30px;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    border-radius: 2px;
}

.stat-value {
    font-family: 'Space Mono', monospace;
    font-size: 2.5rem;
    color: #111;
    line-height: 1;
}

.log-card {
    height: 180px;
}

.log-content {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    color: #888;
    height: 120px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.log-content div {
    margin-top: 6px;
}

/* Top Right */
.top-right {
    position: absolute;
    top: 40px;
    right: 40px;
    text-align: right;
}

.brand {
    font-size: 1.8rem;
    color: #444;
    margin: 5px 0 15px 0;
    font-weight: 300;
}

.status-lines {
    font-size: 0.6rem;
    color: #999;
    line-height: 2;
    font-weight: 800;
    letter-spacing: 1px;
}

.dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border: 1px solid #ccc;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}

/* Bottom Center */
.bottom-center {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    pointer-events: auto;
}

.ui-btn {
    background: #ffffff;
    color: #d32f2f;
    border: none;
    padding: 18px 45px;
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    transition: all 0.2s;
    border-radius: 2px;
}

.ui-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.ui-btn:active {
    transform: translateY(1px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.04);
}

/* Bottom Left */
.bottom-left {
    position: absolute;
    bottom: 40px;
    left: 40px;
    z-index: 5;
}

.tracker-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.tracker-boxes span {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 1px solid #ddd;
    text-align: center;
    line-height: 22px;
    font-size: 0.65rem;
    color: #bbb;
    margin-right: 4px;
    font-weight: 800;
}

.tracker-text {
    font-size: 0.65rem;
    color: #aaa;
    font-weight: 800;
    letter-spacing: 1px;
}

/* Bottom Right */
.bottom-right {
    position: absolute;
    bottom: 40px;
    right: 40px;
    display: flex;
    gap: 12px;
    pointer-events: auto;
}

.icon-btn {
    width: 44px;
    height: 44px;
    background: #ffffff;
    border: none;
    color: #888;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    transition: all 0.2s;
    border-radius: 2px;
}

.icon-btn:hover {
    color: #d32f2f;
}

@media (max-width: 1500px) {
    .ui-btn {
        padding: 12px 25px;
    }
    .bottom-left {
        left: 20px;
    }
}

@media (max-width: 1300px) {
    body {
        background: #f0f0f0 !important; /* Remove stripes earlier to fix visual centering */
    }
    .tracker-text {
        display: none;
    }
    .bottom-left {
        max-width: 150px;
    }
}

@media (max-height: 850px) {
    .stat-card {
        padding: 15px 20px;
        margin-bottom: 15px;
    }
    .stat-value {
        font-size: 1.8rem;
    }
    .log-card {
        height: 120px;
    }
    .log-content {
        height: 70px;
    }
}

@media (max-width: 1100px), (max-height: 650px) {
    .bottom-left {
        display: none; /* Hide tracker on short or narrow screens */
    }
    .bottom-center {
        bottom: 20px;
    }
}

@media (max-width: 768px) {
    .left-panel {
        top: 20px;
        left: 20px;
        width: 180px;
    }
    .stat-value {
        font-size: 1.5rem;
    }
    .log-card, .bottom-left {
        display: none;
    }
    .bottom-center {
        width: 90%;
        bottom: 15px;
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
    }
    .ui-btn {
        padding: 10px 15px;
        font-size: 0.6rem;
        flex: 1 1 40%;
    }
}