* {
    box-sizing: border-box;
    user-select: none;
}

body {
    background-color: #1e1e1e;
    color: #e0e0e0;
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 20px;
    min-height: 100vh;
}

#app {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #444;
    padding-bottom: 12px;
    margin-bottom: 20px;
}

header h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 300;
}

header button {
    margin-left: 12px;
}

button {
    background-color: #3a3a3a;
    color: #e0e0e0;
    border: 1px solid #666;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
}
button:hover {
    background-color: #555;
}
button:active {
    background-color: #777;
}
button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background-color: #2a2a2a;
}
button:disabled:hover {
    background-color: #2a2a2a;
}

main {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

#question-panel {
    flex: 1;
    min-width: 280px;
}

#drawing-area {
    flex: 2;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

#svg-grid {
    background-color: #252525;
    border: 1px solid #444;
    border-radius: 8px;
    width: 550px;
    height: 550px;
    cursor: default;
}

#question-text {
    background-color: #2a2a2a;
    padding: 16px 20px;
    border-radius: 8px;
    border: 1px solid #444;
    min-height: 100px;
    font-size: 18px;
    line-height: 1.7;
    margin-bottom: 20px;
    white-space: pre-wrap;
}

#result {
    background-color: #2a2a2a;
    padding: 14px 18px;
    border-radius: 8px;
    border: 1px solid #444;
    min-height: 56px;
    font-size: 16px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.success { color: #6f6; }
.error { color: #f66; }

#hint {
    color: #888;
    font-style: italic;
}

/* SVG elements */
.point-circle {
    fill: #ffcc00;
    stroke: #fff;
    stroke-width: 2px;
    r: 10;
    cursor: grab;
}
.point-circle:active {
    cursor: grabbing;
}
.point-label {
    fill: #000;
    font-size: 12px;
    font-weight: bold;
    text-anchor: middle;
    dominant-baseline: central;
    pointer-events: none;
}
.grid-line {
    stroke: #3a3a3a;
    stroke-width: 1;
}
.grid-line-major {
    stroke: #4a4a4a;
    stroke-width: 1.5;
}
.shape-line {
    stroke: #88ccff;
    stroke-width: 2.5;
    fill: none;
}
.median-line {
    stroke: #ffaa66;
    stroke-width: 2;
    stroke-dasharray: 6,4;
    fill: none;
}