.grid-line {
    stroke: #eef1f5;
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

[data-theme="dark"] .grid-line {
    stroke: #2a2a3e;
}

.vertex {
    r: 18px;
    fill: var(--bg-surface);
    stroke: var(--text-main);
    stroke-width: 3px;
    transition: r 0.2s;
}

.vertex.v-a { stroke: #ea4335; }
.vertex.v-b { stroke: #4285f4; }
.vertex.v-c { stroke: #34a853; }

.tri-fill {
    fill: rgba(66, 133, 244, 0.08);
}

.tri-side {
    stroke-width: 4;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
}

.side-a { stroke: #ea4335; }
.side-b { stroke: #4285f4; }
.side-c { stroke: #34a853; }

.line-h {
    stroke: #e67e22;
    stroke-width: 2;
    stroke-dasharray: 6, 4;
}

.line-m {
    stroke: #9b59b6;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 6, 6;
}

.line-k {
    stroke: #34495e;
    stroke-width: 3;
    stroke-linecap: round;
}

.angle-arc {
    fill-opacity: 0.2;
    stroke-width: 4px;
}

.angle-a { stroke: #ea4335; fill: #ea4335; }
.angle-b { stroke: #4285f4; fill: #4285f4; }
.angle-c { stroke: #34a853; fill: #34a853; }

.ghost-fill {
    fill: none;
    stroke: var(--text-muted);
    stroke-width: 2;
    stroke-dasharray: 8, 4;
}

.icon-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.05);
    border: none;
    padding: 0;
    margin-left: 8px;
}

.icon-toggle:hover {
    background: rgba(0, 0, 0, 0.1);
}

.icon-toggle input {
    display: none;
}

.icon-toggle svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.icon-toggle input:checked+svg {
    fill: var(--primary);
}

.btn-lock {
    position: absolute;
    right: 35px;
    top: 0;
    bottom: 0;
    width: 30px;
    border: none;
    background: none;
    color: #b2bec3;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-lock.locked {
    color: var(--primary);
}

.btn-lock svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.input-group.locked-input {
    border-color: var(--primary);
    background: #f0f0ff;
}

[data-theme="dark"] .input-group.locked-input {
    background: rgba(108, 99, 255, 0.1);
}

.canvas-section.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    background: var(--bg-surface);
    border-radius: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.canvas-section.fullscreen svg {
    flex: 1;
    width: 100%;
    height: 100%;
}

.canvas-section.fullscreen .toolbar {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1002;
}

#fsOverlay {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    display: none;
    pointer-events: none;
    max-width: 300px;
    font-family: 'Outfit', sans-serif;
}

[data-theme="dark"] #fsOverlay {
    background: rgba(26, 26, 46, 0.9);
}

.canvas-section.fullscreen #fsOverlay {
    display: block;
}

.fs-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 14px;
}

.fs-label { color: var(--text-muted); font-weight: 500; }
.fs-val { font-weight: 700; color: var(--text-main); }

.fs-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--primary);
    border-bottom: 1px solid var(--border);
    padding-bottom: 4px;
}

.val-label {
    display: none;
    font-size: 16px;
    font-weight: 600;
    text-anchor: middle;
    pointer-events: none;
    font-family: 'Outfit', sans-serif;
    paint-order: stroke;
    stroke: var(--bg-surface);
    stroke-width: 3px;
}

.canvas-section.fullscreen .val-label {
    display: block;
}

.val-side-a { fill: #ea4335; }
.val-side-b { fill: #4285f4; }
.val-side-c { fill: #34a853; }
.val-ang-a { fill: #ea4335; }
.val-ang-b { fill: #4285f4; }
.val-ang-c { fill: #34a853; }

.label {
    font-weight: 700;
    font-size: 24px;
    fill: var(--text-main);
    text-anchor: middle;
    dominant-baseline: central;
    paint-order: stroke;
    stroke: var(--bg-surface);
    stroke-width: 4px;
    pointer-events: none;
    font-family: 'Outfit', sans-serif;
}
