#controls {
    background: transparent;
    padding: 18px;
    display: flex;
    gap: 18px;
    align-items: flex-start;
    flex-direction: column;
    border-top: none;
}

/* Grouping visuals */
.control-group {
    display: flex;
    gap: 12px;
    align-items: center;
    width: 100%;
    flex-wrap: wrap;
    background: rgba(255,255,255,0.01);
    padding: 8px;
    border-radius: 6px;
}

.control-group label {
    font-size: 13px;
    color: #bfc7d1;
    min-width: 90px;
}

/* Buttons & selects refined */
select, input[type="range"] {
    background: #0e1114;
    color: #e6eef6;
    border: 1px solid rgba(255,255,255,0.04);
    padding: 6px 8px;
    border-radius: 6px;
    font-family: 'Noto Sans', 'Space Mono', monospace;
}

button {
    background: linear-gradient(180deg,#0f62fe,#0053c7);
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(2,6,23,0.6);
    transition: transform 120ms ease, opacity 120ms;
}

button:hover { transform: translateY(0); opacity: 0.95; }
button.primary { background: linear-gradient(180deg,#0f62fe,#0053c7); }
button.active {
    opacity: 0.7;
    box-shadow: 0 0 12px rgba(15, 98, 254, 0.6);
}

/* Stats alignment */
.stats {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #9fb0c8;
    margin-left: 0;
    margin-top: 6px;
    flex-wrap: wrap;
}

/* Modal adjustments for centered cleaner look */
.modal-content {
    background: #0b0b0b;
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 10px;
    padding: 28px;
    min-width: 420px;
    max-width: 560px;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content h2 {
    margin-bottom: 20px;
    font-size: 20px;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.slider-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.slider-group label {
    min-width: 100px;
    font-size: 12px;
    color: #888;
}

.slider-group input {
    flex: 1;
}

.slider-group span {
    min-width: 50px;
    text-align: right;
    font-size: 12px;
}

.modal-footer {
    margin-top: 30px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Tier Display Panel */
#tierDisplay {
    background: rgba(15, 62, 254, 0.05);
    border: 1px solid rgba(15, 98, 254, 0.2);
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 12px;
}

.tier-panel {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.tier-info {
    flex: 1;
}

.tier-header {
    font-size: 11px;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.tier-name {
    font-size: 13px;
    font-weight: 600;
    color: #0f62fe;
    margin-bottom: 4px;
    transition: color 200ms ease;
}

.tier-name.transitioning {
    color: #ffaa00;
    animation: pulse-glow 0.5s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { text-shadow: none; }
    50% { text-shadow: 0 0 8px rgba(255, 170, 0, 0.6); }
}

.tier-desc {
    font-size: 11px;
    color: #888;
    margin-bottom: 6px;
}

.tier-stats {
    font-size: 10px;
    color: #666;
    line-height: 1.4;
}

.tier-stats .stat {
    margin: 2px 0;
}

.tier-stats .stat.transitioning {
    color: #ffaa00;
    font-weight: 600;
}

/* Tier Controls */
.tier-controls {
    position: relative;
}

.tier-override-btn {
    background: rgba(15, 98, 254, 0.1);
    border: 1px solid rgba(15, 98, 254, 0.3);
    color: #0f62fe;
    padding: 6px 10px;
    font-size: 11px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 120ms ease;
}

.tier-override-btn:hover {
    background: rgba(15, 98, 254, 0.2);
    border-color: rgba(15, 98, 254, 0.5);
}

.tier-override-btn.active {
    background: rgba(15, 98, 254, 0.3);
    border-color: #0f62fe;
}

.tier-select {
    position: absolute;
    top: 28px;
    right: 0;
    background: #0e1114;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: #e6eef6;
    font-size: 11px;
    z-index: 10;
}

.tier-select.hidden {
    display: none;
}

/* Time Scale Enhancements */
#tierMarkersCanvas {
    display: block;
    width: 100%;
    height: 30px;
    margin-bottom: 6px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.2);
}

.systems-info {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
    padding: 8px;
    margin-top: 8px;
    font-size: 11px;
    color: #888;
}

.system-row {
    display: flex;
    justify-content: space-between;
    margin: 3px 0;
    padding: 2px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.system-row:last-child {
    border-bottom: none;
}

.system-row .label {
    color: #666;
    min-width: 50px;
}

.system-row .value {
    color: #aaa;
    text-align: right;
    flex: 1;
    margin-left: 12px;
}