/* css/sign.css */

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f8f9fa;
    overflow-y: auto;
    overflow-x: hidden;
}

#app-container {
    display: flex;
    width: 100vw;
    min-height: 100vh;
}

#sidebar {
    width: 300px;
    flex-shrink: 0;
    box-sizing: border-box;
    background: white;
    padding: 20px;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    z-index: 20;
}

h2 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 1.2rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.control-card {
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.dial-container {
    width: 80px;
    height: 80px;
    margin-bottom: 10px;
    cursor: grab;
}

.dial-container:active {
    cursor: grabbing;
}

.slider-row {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: #666;
}

input[type=range] {
    flex: 1;
}

.action-btn {
    padding: 12px;
    background: #34495e;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.action-btn:hover {
    background: #2c3e50;
}

#status-box {
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s;
}

.status-positive {
    background: #e8f4fd;
    border-left: 5px solid #3498db;
}

.status-negative {
    background: #fdedec;
    border-left: 5px solid #e74c3c;
}

.status-zero {
    background: #f0f0f0;
    border-left: 5px solid #999;
}

#status-box h4 {
    margin: 0;
    color: #555;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.math-display {
    font-family: monospace;
    font-size: 1.4rem;
    font-weight: bold;
    margin: 10px 0;
    color: #333;
}

#det-desc {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

/* Visualization */
#viz-container {
    flex-grow: 1;
    background-image: radial-gradient(#ddd 1px, transparent 1px);
    background-size: 30px 30px;
    position: relative;
    /* REQUIRED FOR ABSOLUTE SVG */
    cursor: default;
    min-height: 500px;
    /* Base height guarantee */
}

/* THE FIX: Force SVG to fill container completely */
#viz-container svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.vector-line {
    stroke-width: 4px;
    stroke-linecap: round;
    transition: stroke 0.2s;
}

.vector-label {
    font-family: sans-serif;
    font-weight: bold;
    font-size: 14px;
    text-shadow: 1px 1px 0 #fff;
    pointer-events: none;
}

.parallelogram {
    stroke-width: 2;
    transition: fill 0.2s, stroke 0.2s;
}

.vector-handle {
    fill: white;
    stroke-width: 2;
    cursor: grab;
    transition: r 0.1s;
}

.vector-handle:hover {
    r: 8;
}

.vector-handle:active {
    cursor: grabbing;
}

.dial-circle {
    fill: white;
    stroke: #ccc;
    stroke-width: 2;
}

.dial-hand {
    stroke-width: 3;
    stroke-linecap: round;
}

.dial-knob {
    fill: white;
    stroke-width: 2;
}

@media (max-width: 900px) {
    #app-container {
        flex-direction: column;
    }

    #sidebar {
        width: 100%;
        min-height: auto;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    }

    #viz-container {
        min-height: 60vh;
    }
}