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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
    background: #1a1a1a;
}

#canvas-container {
    width: 100vw;
    height: 100vh;
    position: relative;
}

#drop-zone {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100;
    transition: opacity 0.3s;
}

#drop-zone.hidden {
    opacity: 0;
    pointer-events: none;
}

#drop-zone.drag-over {
    background: rgba(100, 180, 100, 0.3);
}

.drop-content {
    text-align: center;
    color: white;
    padding: 60px;
    border: 3px dashed rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    max-width: 500px;
}

.drop-content h1 {
    font-size: 32px;
    margin-bottom: 20px;
}

.drop-content p {
    font-size: 18px;
    line-height: 1.6;
    opacity: 0.8;
}

#info-panel {
    position: absolute;
    top: 20px;
    left: 20px;
    bottom: 20px;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 10;
    width: 300px;
    display: flex;
    flex-direction: column;
}

#info-panel .stat {
    margin: 3px 0;
    opacity: 0.9;
}

#coords-row {
    display: flex;
    gap: 10px;
    margin: 5px 0;
    opacity: 0.9;
}

.coord-col {
    flex: 1;
}

.coord-label {
    font-weight: bold;
}

#top-buttons {
    display: flex;
    gap: 5px;
    margin: 10px 0;
}

#code-editor {
    flex: 1;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    min-height: 0;
}

#playback-controls {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
}

#speed-control {
    width: 100%;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

#speed-value {
    min-width: 45px;
    text-align: right;
    font-size: 12px;
    cursor: default;
}

#speed-slider {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    outline: none;
}

#speed-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: #2196F3;
    border-radius: 50%;
    cursor: pointer;
}

#speed-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #2196F3;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.btn {
    padding: 8px 16px;
    cursor: pointer;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    margin-right: 5px;
}

.btn:last-child {
    margin-right: 0;
}

.btn-icon {
    padding: 6px 10px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.2);
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.2);
}

.btn-sm:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-primary {
    background: #4CAF50;
}

.btn-info {
    background: #2196F3;
}

.btn-danger {
    background: #f44336;
}

.btn-success {
    background: #4CAF50;
}

.btn-full {
    width: 100%;
    margin-top: 10px;
    margin-right: 0;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #2a2a2a;
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    position: relative;
    color: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    right: 15px;
    top: 10px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: white;
}

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

.modal-content img {
    width: 100%;
    max-width: 300px;
    display: block;
    margin: 0 auto 20px;
}

.modal-controls p {
    margin: 10px 0;
    font-size: 14px;
}

.niint-link {
    position: fixed;
    right: 1em;
    bottom: 1em;
    color: white;
    text-decoration: none;
    font-size: 14px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.niint-link:hover {
    opacity: 1;
    text-decoration: underline;
}
