body {
    background-color: #121212;
    color: #e0e0e0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
    height: 100%;
}

header {
    margin-bottom: 20px;
    text-align: center;
}

h1 {
    font-size: 2em;
    margin-bottom: 5px;
    font-weight: 300;
}

.subtitle {
    font-size: 1.1em;
    color: #a0a0a0;
    margin: 0 0 10px 0;
}

.back-link {
    color: #4CAF50;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    margin-top: 5px;
}

.back-link:hover {
    text-decoration: underline;
}

main {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.canvas-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 1200px;
    max-height: 800px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    background-color: #1e1e1e;
}

canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.overlay-controls {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: rgba(30, 30, 30, 0.9);
    padding: 20px;
    border-radius: 8px;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    max-width: 300px;
    z-index: 10;
}

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

.control-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 0.9em;
    color: #ccc;
}

.checkbox-label {
    display: block;
    font-weight: normal !important;
    margin-bottom: 5px;
    cursor: pointer;
}

.btn-group {
    display: flex;
    gap: 5px;
}

.btn-group button {
    flex-grow: 1;
    padding: 8px;
    background-color: #333;
    color: #eee;
    border: 1px solid #444;
    cursor: pointer;
    font-size: 0.9em;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.btn-group button.active {
    background-color: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.btn-group button:hover:not(.active) {
    background-color: #444;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

input[type=range] {
    flex-grow: 1;
    cursor: pointer;
}

#t-value {
    min-width: 40px;
    text-align: right;
    font-family: monospace;
}

#btn-animate {
    width: 100%;
    padding: 10px;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}

#btn-animate:hover {
    background-color: #1976D2;
}

#btn-animate.playing {
    background-color: #f44336;
}

.instructions {
    margin-top: 10px;
    font-size: 0.85em;
    color: #888;
    text-align: center;
    border-top: 1px solid #333;
    padding-top: 10px;
}

footer {
    text-align: center;
    padding-top: 10px;
    color: #666;
    font-size: 0.8em;
}

@media (max-width: 768px) {
    .overlay-controls {
        position: static;
        max-width: none;
        margin: 0;
        border-radius: 0;
        padding: 10px;
    }

    .canvas-wrapper {
        display: flex;
        flex-direction: column-reverse;
    }

    canvas {
        height: 60vh;
    }
}