* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Hiragino Sans', 'Meiryo', sans-serif;
    margin: 0;
    padding: 20px;
    background: #1a1a2e;
    color: #eee;
}

h1 {
    text-align: center;
    color: #fff;
    margin-bottom: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.controls {
    background: #16213e;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.control-group label {
    font-weight: bold;
    color: #a0a0a0;
}

.control-group .value {
    color: #4fc3f7;
    font-size: 1.2em;
    font-weight: bold;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

input[type="range"] {
    flex: 1;
    height: 8px;
    -webkit-appearance: none;
    background: #0f3460;
    border-radius: 4px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #4fc3f7;
    border-radius: 50%;
    cursor: pointer;
}

.graph-container {
    background: #16213e;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

canvas {
    background: #0a0a1a;
    border-radius: 5px;
    max-width: 100%;
}

.legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-line {
    width: 30px;
    height: 3px;
}

.legend-attractor {
    background: #ff4444;
}

.legend-repeller {
    background: #4444ff;
    background: repeating-linear-gradient(
        90deg,
        #4444ff 0px,
        #4444ff 5px,
        transparent 5px,
        transparent 10px
    );
}

.info {
    margin-top: 15px;
    padding: 10px;
    background: #0f3460;
    border-radius: 5px;
    font-size: 0.9em;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
}

.status {
    margin-top: 10px;
    color: #888;
    font-size: 0.9em;
}

.formula {
    color: #888;
    font-size: 0.9em;
}
