/* css/determinant.css */

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f8f9fa;
    overflow: hidden;
}

#app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
}

/* --- SIDEBAR --- */
#sidebar {
    width: 340px;
    background: white;
    padding: 25px;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    z-index: 20;
    overflow-y: auto;
    /* Allow scrolling if height is small */
}

h2 {
    font-size: 1.3rem;
    margin: 0 0 15px 0;
    color: #2c3e50;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.input-group {
    margin-bottom: 18px;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: #7f8c8d;
    text-transform: uppercase;
}

.coord-row {
    display: flex;
    gap: 10px;
}

input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    background: #f9f9f9;
}

input[type="number"]:focus {
    border-color: #3498db;
    background: white;
    outline: none;
}

/* Controls */
.controls {
    display: flex;
    gap: 10px;
    margin: 20px 0 10px 0;
}

button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
}

#btn-prev {
    background: #ecf0f1;
    color: #7f8c8d;
}

#btn-prev:hover:not(:disabled) {
    background: #bdc3c7;
    color: #2c3e50;
}

#btn-next {
    background: #3498db;
    color: white;
}

#btn-next:hover:not(:disabled) {
    background: #2980b9;
    transform: translateY(-1px);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Explanation Box - MOVED UP */
#explanation-box {
    background: #eef2f5;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    margin-top: 15px;
    /* Fixed spacing from buttons */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

#explanation-box h4 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 1.1rem;
}

#explanation-box p {
    margin: 0 0 10px 0;
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
}

.math-display {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #333;
    background: white;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    border: 1px solid #ddd;
    margin-top: 10px;
}

/* --- VISUALIZATION AREA --- */
#viz-container {
    flex-grow: 1;
    position: relative;
    background-color: #ffffff;
    background-image: radial-gradient(#e0e0e0 1.5px, transparent 1.5px);
    background-size: 25px 25px;
    cursor: grab;
}

#viz-container:active {
    cursor: grabbing;
}

/* SVG Styles */
.vector-line {
    stroke-width: 4px;
    stroke-linecap: round;
    filter: drop-shadow(2px 2px 2px rgba(0, 0, 0, 0.2));
}

.vector-label {
    font-weight: bold;
    font-size: 16px;
    font-family: sans-serif;
    pointer-events: none;
}

/* Axis */
.axis {
    stroke: #bdc3c7;
    stroke-width: 2;
}