/* Logistic Classification Visualization Stylesheet */
/* Dark theme consistent with other tutorials */

.logistic-container {
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    margin: 10px 0;
    font-family: 'Courier New', monospace;
    color: #e0e0e0;
}

.control-panel {
    background-color: #222;
    border: 1px solid #444;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 15px;
}

.section-label {
    color: #ff9900;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.control-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.control-row label {
    color: #aaa;
    font-size: 12px;
}

.control-row button {
    background-color: #333;
    color: #ff9900;
    border: 1px solid #ff9900;
    padding: 8px 16px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    border-radius: 3px;
    transition: all 0.2s;
}

.control-row button:hover {
    background-color: #ff9900;
    color: #000;
}

.control-row button.active {
    background-color: #00ff00;
    color: #000;
    border-color: #00ff00;
}

.control-row button.stop {
    background-color: #ff3333;
    color: #fff;
    border-color: #ff3333;
}

.control-row input[type="range"] {
    width: 120px;
    cursor: pointer;
}

.control-row input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.dark-select {
    background-color: #333;
    color: #ff9900;
    border: 1px solid #555;
    padding: 6px 10px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    border-radius: 3px;
    cursor: pointer;
}

.dark-select:hover {
    border-color: #ff9900;
}

.stats-display {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 10px;
    padding: 10px;
    background-color: #1a1a1a;
    border-radius: 3px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-label {
    color: #888;
    font-size: 11px;
}

.stat-value {
    color: #ffcc00;
    font-size: 12px;
    font-weight: bold;
}

.canvas-container {
    background-color: #000;
    border: 1px solid #333;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    margin-bottom: 10px;
}

#logistic-canvas {
    cursor: crosshair;
    border-radius: 3px;
}

.instructions {
    background-color: #222;
    border: 1px solid #333;
    border-radius: 3px;
    padding: 10px 15px;
    margin-top: 10px;
    font-size: 12px;
    color: #888;
    text-align: center;
}

.instructions span {
    color: #ff9900;
    font-weight: bold;
}

.class-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
}

.class-a {
    background-color: #ff4444;
    border: 2px solid #ff8888;
}

.class-b {
    background-color: #4444ff;
    border: 2px solid #8888ff;
}

.legend-box {
    display: flex;
    gap: 20px;
    padding: 10px;
    background-color: #1a1a1a;
    border-radius: 3px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #aaa;
}

.legend-color {
    width: 20px;
    height: 3px;
}

.legend-color.boundary {
    background-color: #ff9900;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* Slider styling */
input[type="range"] {
    -webkit-appearance: none;
    background: #333;
    height: 6px;
    border-radius: 3px;
}

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

input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #ff9900;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Value display next to sliders */
.slider-value {
    color: #ffcc00;
    font-size: 11px;
    min-width: 50px;
}

/* Step buttons styling */
.step-btn {
    background-color: #2a2a2a !important;
    color: #ffcc00 !important;
    border: 1px solid #ffcc00 !important;
}

.step-btn:hover {
    background-color: #ffcc00 !important;
    color: #000 !important;
}

.step-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed !important;
}

/* Step Details Panel */
.step-details-panel {
    background-color: #111;
    border: 2px solid #333;
    border-radius: 5px;
    margin-top: 15px;
    font-family: 'Courier New', monospace;
    overflow: hidden;
}

.step-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #222;
    padding: 10px 15px;
    border-bottom: 1px solid #333;
}

.step-details-title {
    color: #ff9900;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 1px;
}

.step-counter {
    color: #ffcc00;
    font-size: 14px;
    font-weight: bold;
}

.step-details-content {
    padding: 15px;
    min-height: 180px;
    font-size: 12px;
    line-height: 1.6;
}

.step-placeholder {
    color: #666;
    font-style: italic;
    text-align: center;
    padding: 50px 20px;
}

.step-placeholder .highlight {
    color: #ff9900;
    font-style: normal;
    font-weight: bold;
}

/* Step detail rows */
.step-detail-row {
    display: flex;
    margin-bottom: 8px;
    align-items: flex-start;
}

.step-detail-label {
    color: #888;
    min-width: 160px;
    flex-shrink: 0;
}

.step-detail-value {
    color: #e0e0e0;
}

/* Section dividers in step details */
.step-section {
    margin: 12px 0;
    padding: 10px;
    background-color: #1a1a1a;
    border-radius: 4px;
    border-left: 3px solid #333;
}

.step-section.sigmoid {
    border-left-color: #ff9900;
}

.step-section.prediction {
    border-left-color: #00ffff;
}

.step-section.loss {
    border-left-color: #ff6666;
}

.step-section.gradient {
    border-left-color: #00ff00;
}

.step-section.update {
    border-left-color: #cc99ff;
}

.step-section.boundary {
    border-left-color: #ff9900;
}

.step-section-title {
    color: #aaa;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

/* Formula display */
.formula {
    font-family: 'Courier New', monospace;
    background-color: #0a0a0a;
    padding: 8px 12px;
    border-radius: 3px;
    margin: 5px 0;
    color: #e0e0e0;
    display: inline-block;
}

.formula .num {
    color: #ffcc00;
}

.formula .op {
    color: #888;
}

.formula .result {
    color: #00ff00;
}

.formula .prob {
    color: #ff9900;
}

/* Point indicator in step details */
.point-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    background-color: #1a1a1a;
    border-radius: 3px;
    margin-bottom: 10px;
}

.point-indicator .point-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.point-indicator .point-dot.red {
    background-color: #ff4444;
    border: 2px solid #ff8888;
}

.point-indicator .point-dot.blue {
    background-color: #4488ff;
    border: 2px solid #88bbff;
}

/* Delta display (change indicators) */
.delta {
    font-size: 10px;
    margin-left: 8px;
}

.delta.positive {
    color: #00ff00;
}

.delta.negative {
    color: #ff6666;
}

/* Probability bar */
.prob-bar-container {
    width: 100%;
    height: 20px;
    background-color: #333;
    border-radius: 3px;
    margin: 10px 0;
    overflow: hidden;
    position: relative;
}

.prob-bar {
    height: 100%;
    background: linear-gradient(90deg, #ff4444, #4488ff);
    transition: width 0.3s;
}

.prob-bar-label {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #fff;
    text-shadow: 0 0 3px #000;
}

.prob-bar-label.left {
    left: 5px;
}

.prob-bar-label.right {
    right: 5px;
}

/* Weight update block styling */
.weight-update-block {
    margin: 12px 0;
    padding: 10px;
    background-color: #0a0a0a;
    border-radius: 4px;
    border: 1px solid #222;
}

.weight-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #333;
}

.weight-name {
    color: #ff9900;
    font-weight: bold;
    font-size: 13px;
}

.weight-result {
    color: #e0e0e0;
    font-size: 12px;
}

.highlight-green {
    color: #00ff00 !important;
    font-weight: bold;
}

/* Calculation steps display */
.calc-steps {
    padding-left: 10px;
    border-left: 2px solid #333;
    margin-top: 5px;
}

.calc-formula {
    color: #aaa;
    font-size: 11px;
    margin-bottom: 6px;
    font-style: italic;
}

.calc-line {
    color: #888;
    font-size: 11px;
    margin: 3px 0;
    padding-left: 10px;
}

.calc-line .num {
    color: #ffcc00;
}

.calc-line .result {
    color: #00ff00;
    font-weight: bold;
}

.calc-note {
    color: #666;
    font-size: 10px;
    font-style: italic;
}

/* Sigmoid plot container */
.sigmoid-plot {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.sigmoid-canvas-container {
    background-color: #000;
    border: 1px solid #333;
    border-radius: 3px;
    padding: 5px;
}
