:root {
    --primary-color: #4d9fff;
    --secondary-color: #ffcc33;
    --background: #f5f5f5;
    --text-color: #333;
    --border-color: #ddd;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.main-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.viz-container {
    position: relative;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

#scene-3d {
    width: 100%;
    height: 600px;
}

.reset-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.reset-btn:hover {
    background: #3a7fd8;
}

.controls-panel {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.control-group {
    margin-bottom: 20px;
}

.control-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.input-pair {
    display: flex;
    gap: 10px;
    align-items: center;
}

input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    background: var(--border-color);
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
}

input[type="number"] {
    width: 80px;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
}

.reset-small-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.3s;
}

.reset-small-btn:hover {
    background: #3a7fd8;
}

.discrepancy-display {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.discrepancy-display h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: var(--text-color);
}

.discrepancy-value {
    margin: 8px 0;
    font-size: 14px;
}

.discrepancy-value span {
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
    font-size: 15px;
}

.animation-controls {
    display: flex;
    gap: 10px;
}

.animation-controls button {
    flex: 1;
    padding: 12px;
    background: var(--secondary-color);
    color: #333;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.3s;
}

.animation-controls button:hover {
    background: #ffb700;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    #scene-3d {
        height: 400px;
    }
}

@media (max-width: 600px) {
    h1 {
        font-size: 1.5rem;
    }

    .input-pair {
        flex-direction: column;
        align-items: stretch;
    }

    input[type="number"] {
        width: 100%;
    }
}
