* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #0a0f1c;
    color: #ddd;
    line-height: 1.6;
}

header {
    background: linear-gradient(135deg, #0a1f3d, #1e3a6b);
    padding: 2rem 1rem;
    text-align: center;
    border-bottom: 1px solid #1e3a6b;
}

h1 {
    margin: 0;
    font-size: 2.6rem;
    font-weight: 700;
    letter-spacing: -1.5px;
    color: white;
}

p {
    margin: 0.5rem 0 0;
    font-size: 1.05rem;
    color: #a0c4ff;
}

.container {
    max-width: 1280px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 2rem;
}

@media (max-width: 960px) {
    .container {
        grid-template-columns: 1fr;
    }
}

.canvas-wrapper {
    background: #111827;
    padding: 28px;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

canvas {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    background: #000;
}

.controls {
    background: #111827;
    border-radius: 20px;
    padding: 1.8rem;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.5);
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    height: fit-content;
}

.controls section {
    border-bottom: 1px solid #1f2937;
    padding-bottom: 1.5rem;
}

.controls section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

h3, h4 {
    margin: 0 0 0.75rem;
    color: #60a5fa;
    font-weight: 600;
}

label {
    display: block;
    margin-bottom: 0.6rem;
    font-size: 0.92rem;
    color: #9ca3af;
}

input[type="url"],
input[type="text"] {
    width: 100%;
    padding: 12px 14px;
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    margin-bottom: 0.4rem;
}

input[type="range"] {
    width: 100%;
    accent-color: #3b82f6;
}

.primary-btn {
    background: linear-gradient(90deg, #0066ff, #3388ff);
    color: white;
    font-weight: 700;
    font-size: 1.15rem;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-top: 0.5rem;
    box-shadow: 0 4px 15px rgba(51, 136, 255, 0.3);
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(51, 136, 255, 0.4);
}

.note {
    font-size: 0.85rem;
    color: #6b7280;
    text-align: center;
    margin-top: 1rem;
    line-height: 1.4;
}

@media (max-width: 640px) {
    header {
        padding: 1.5rem 1rem;
    }
    h1 {
        font-size: 2.1rem;
    }
}