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

body {
    font-family: 'Space Mono', monospace;
    background: #000;
    color: #ffffff;
    overflow: hidden;
}

#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
}

#controls {
    position: absolute;
    top: 20px;
    left: 20px;
    background:
        linear-gradient(#ffffff, #ffffff) no-repeat,
        #000;
    background-size: 2px 100%;
    background-position: calc(100% - 18px) 0;
    border: 2px solid #ffffff;
    padding: 20px;
    max-width: 300px;
    max-height: 90vh;
    overflow-y: auto;
}

#controls h2 {
    margin-bottom: 15px;
    font-size: 14px;
    border-bottom: 2px solid #ffffff;
    padding-bottom: 10px;
    font-weight: 700;
}

.control-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
}

input[type="file"],
input[type="range"],
button,
select {
    width: 100%;
    padding: 8px;
    margin-bottom: 5px;
    border: 2px solid #fff;
    background: #000;
    color: #fff;
    font-family: 'Space Mono', monospace;
    font-size: 12px;
}

input[type="file"] {
    padding: 10px;
}

input[type="range"] {
    padding: 0;
    height: 30px;
}

input[type="checkbox"] {
    margin-right: 5px;
}

button {
    cursor: pointer;
    font-weight: 700;
    transition: background 0.3s, color 0.3s;
}

button:hover {
    background: #fff;
    color: #000;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#info {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #000;
    border: 2px solid #fff;
    padding: 15px;
    font-size: 12px;
    min-width: 200px;
}

#info h3 {
    font-size: 14px;
    margin-bottom: 10px;
    border-bottom: 2px solid #fff;
    padding-bottom: 5px;
}

#info div {
    margin-bottom: 5px;
}

#energy-chart {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 400px;
    height: 200px;
    background: #000;
    border: 2px solid #fff;
    padding: 15px;
}

#energy-chart h3 {
    font-size: 14px;
    margin-bottom: 10px;
    border-bottom: 2px solid #fff;
    padding-bottom: 5px;
}

canvas {
    display: block;
}

.legend {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px solid #fff;
}

.legend-item {
    display: inline-block;
    margin-right: 15px;
    font-size: 11px;
}

.legend-color {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 5px;
    vertical-align: middle;
    border: 2px solid #fff;
}

#loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    display: none;
    background: #000;
    border: 2px solid #fff;
    padding: 40px;
}

.spinner {
    border: 2px solid #fff;
    border-top: 2px solid #000;
    border-radius: 0;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.file-section {
    border: 2px solid #fff;
    padding: 10px;
    margin-bottom: 10px;
}

.file-section label {
    font-weight: 700;
}

.file-section small {
    opacity: 0.7;
    font-size: 10px;
    display: block;
    margin-top: 5px;
}

.quick-start {
    background: #000;
    border: 2px solid #fff;
    padding: 10px;
    margin-bottom: 15px;
    font-size: 11px;
}

.quick-start strong {
    display: block;
    margin-bottom: 5px;
}

#controls::-webkit-scrollbar {
    background-color: #000000;
    width: 18px;
}

#controls::-webkit-scrollbar-thumb {
    background: #fff;
    border: 2px solid #000000;
}

#notification {
    position: fixed;
    top: 20px;
    left: calc(50% - 310px);
    background: #000;
    border: 2px solid #fff;
    padding: 10px 50px 10px 20px;
    font-size: 14px;
    z-index: 1000;
    transition: left 0.5s ease-in-out, transform 0.5s ease-in-out;
}

#notification.centered {
    left: 50%;
    transform: translateX(-50%);
}

#notification.dismissing {
    animation: bounceOut 0.6s ease-in-out forwards;
}

@keyframes bounceOut {
    0% {
        top: 20px;
    }
    30% {
        top: 40px;
    }
    100% {
        top: -200px;
    }
}

#notification a {
    color: #9370DB;
    text-decoration: underline;
}

#notification a:hover {
    color: #BA55D3;
}

#controls a {
    color: #9370DB;
    text-decoration: underline;
}

#controls a:hover {
    color: #BA55D3;
}

#closeNotification {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    line-height: 20px;
    font-family: 'Space Mono', monospace;
}

#closeNotification:hover {
    color: #999;
}

#notification2 {
    position: fixed;
    top: 20px;
    left: calc(50% + 4px);
    background: #000;
    border: 2px solid #fff;
    padding: 10px 50px 10px 20px;
    font-size: 14px;
    z-index: 1000;
    transition: left 0.5s ease-in-out, transform 0.5s ease-in-out;
}

#notification2.centered {
    left: 50%;
    transform: translateX(-50%);
}

#notification2.dismissing {
    animation: bounceOut 0.6s ease-in-out forwards;
}

#notification2 a {
    color: #9370DB;
    text-decoration: underline;
}

#notification2 a:hover {
    color: #BA55D3;
}

#closeNotification2 {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    line-height: 20px;
    font-family: 'Space Mono', monospace;
}

#closeNotification2:hover {
    color: #999;
}
