/* ==========================================
   MODUL PENGUKUR SUDUT — BUSUR DERAJAT DIGITAL
   ========================================== */

/* --- Layout --- */
.protractor-module {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.protractor-shape-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.prot-shape-btn {
    background: rgba(13, 22, 38, 0.7);
    border: 2px solid rgba(0, 229, 255, 0.3);
    color: var(--text-main);
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s;
}

.prot-shape-btn:hover {
    border-color: var(--primary);
    background: rgba(0, 229, 255, 0.1);
}

.prot-shape-btn.active {
    border-color: var(--primary);
    background: rgba(0, 229, 255, 0.15);
    color: var(--primary);
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.3);
}

/* --- Canvas area --- */
.protractor-canvas {
    position: relative;
    width: 100%;
    height: 500px;
    background: rgba(5, 11, 20, 0.6);
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: 12px;
    overflow: hidden;
    touch-action: none;
    user-select: none;
}

.protractor-canvas svg.shape-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* --- Protractor element --- */
.protractor-tool {
    position: absolute;
    cursor: grab;
    touch-action: none;
    z-index: 10;
    filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.3));
    transition: filter 0.2s;
}

.protractor-tool:hover {
    filter: drop-shadow(0 0 15px rgba(0, 229, 255, 0.5));
}

.protractor-tool.dragging {
    cursor: grabbing;
    filter: drop-shadow(0 0 20px rgba(0, 229, 255, 0.7));
}

/* Rotation handle */
.prot-rotate-handle {
    cursor: crosshair;
    transition: fill 0.2s;
}

.prot-rotate-handle:hover {
    fill: #FFD700 !important;
}

/* --- Info panel --- */
.protractor-info {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.prot-angle-readout {
    background: rgba(0, 229, 255, 0.08);
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 12px 24px;
    text-align: center;
    min-width: 160px;
}

.prot-angle-label {
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.prot-angle-value {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--primary);
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}

.prot-angle-value span {
    font-size: 1.2rem;
    color: var(--text-light);
}

.prot-hint {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.6;
    max-width: 400px;
}

.prot-hint strong {
    color: var(--primary);
}

/* --- Vertex labels on shape --- */
.prot-vertex-label {
    fill: var(--primary);
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: bold;
}

.prot-vertex-dot {
    fill: #FF9F1C;
    stroke: #fff;
    stroke-width: 2;
    cursor: pointer;
    transition: r 0.2s;
}

.prot-vertex-dot:hover {
    r: 10;
}

.prot-expected-angle {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* --- Check button & feedback --- */
.prot-check-btn {
    background: linear-gradient(135deg, #39FF14, #2BCB0A);
    color: #050B14;
    border: none;
    padding: 10px 24px;
    border-radius: 25px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.prot-check-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(57, 255, 20, 0.4);
}

.prot-feedback {
    font-weight: 700;
    font-size: 1rem;
    min-height: 24px;
    text-align: center;
}

.prot-feedback.correct {
    color: #39FF14;
    text-shadow: 0 0 10px rgba(57, 255, 20, 0.5);
}

.prot-feedback.wrong {
    color: #FF2A6D;
}

/* --- Instructions overlay --- */
.prot-instructions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 10px 20px;
    background: rgba(0, 229, 255, 0.06);
    border: 1px solid rgba(0, 229, 255, 0.15);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.prot-instructions strong {
    color: var(--primary);
}