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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #1a1a2e;
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
}

.container {
    max-width: 640px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

h1 {
    font-size: 1.6rem;
    color: #fff;
}

.subtitle {
    font-size: 0.85rem;
    color: #888;
    margin-top: -0.5rem;
}

.controls {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: #16213e;
    padding: 1.25rem;
    border-radius: 10px;
}

.row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.row label {
    min-width: 60px;
    font-size: 0.85rem;
    color: #aaa;
}

select, input[type="text"], input[type="number"] {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid #333;
    border-radius: 6px;
    background: #0f0f23;
    color: #e0e0e0;
    font-size: 0.9rem;
    outline: none;
}

select:focus, input:focus {
    border-color: #5865f2;
}

input:disabled {
    opacity: 0.5;
}

button {
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

#load-btn {
    background: #5865f2;
    color: #fff;
}

#load-btn:hover:not(:disabled) {
    background: #4752c4;
}

#generate-btn {
    background: #2ecc71;
    color: #fff;
}

#generate-btn:hover:not(:disabled) {
    background: #27ae60;
}

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

.status {
    font-size: 0.85rem;
    color: #aaa;
    min-height: 1.2em;
    text-align: center;
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background: #0f0f23;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: #5865f2;
    width: 0%;
    transition: width 0.3s;
}

.hidden {
    display: none;
}

canvas {
    width: 512px;
    height: 512px;
    max-width: 100%;
    border-radius: 10px;
    background: #0f0f23;
    border: 1px solid #333;
}

.timing {
    width: 100%;
    background: #16213e;
    border-radius: 10px;
    padding: 1rem 1.25rem;
}

.timing table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.timing td {
    padding: 0.3rem 0;
}

.timing td:last-child {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
