:root {
    --bg: #0f172a;
    --panel: #0b1220;
    --accent: #06b6d4;
    --muted: #94a3b8;
    --card: #0b1220;
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial;
    color: #e6eef6;
    background: linear-gradient(180deg, var(--bg), #071024);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px
}

.app {
    width: 100%;
    max-width: 1100px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 8px 30px rgba(2, 6, 23, 0.7)
}

.top {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center
}

.tool {
    background: var(--card);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    gap: 10px;
    align-items: center
}

.tool label {
    font-size: 13px;
    color: var(--muted)
}

.color,
.size {
    display: flex;
    gap: 8px;
    align-items: center
}

input[type=color] {
    width: 38px;
    height: 34px;
    border: 0;
    padding: 0;
    background: none
}

input[type=range] {
    width: 130px
}

button {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 8px 10px;
    border-radius: 8px;
    color: #e6eef6;
    cursor: pointer
}

button.primary {
    background: var(--accent);
    color: #022;
    border: none
}

.spacer {
    flex: 1
}

.canvas-wrap {
    margin-top: 14px;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    display: flex
}

canvas {
    width: 100%;
    height: 600px;
    display: block;
    touch-action: none;
    background-color: white
}

.hint {
    margin-top: 10px;
    color: var(--muted);
    font-size: 13px
}

/* Responsive */
@media (max-width:700px) {
    canvas {
        height: 420px
    }

    .tool {
        padding: 8px
    }

    input[type=range] {
        width: 110px
    }
}