/* css/resistors.css */

.tool-page-container {
    padding: 2rem 0 6rem;
}

.tool-header {
    text-align: center;
    margin-bottom: 3rem;
}

.tool-header h1 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.tool-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.calculator-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 900px) {
    .calculator-layout {
        grid-template-columns: 1fr;
    }
}

.controls-panel {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.radio-group {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.radio-group input[type="radio"] {
    display: none;
}

.radio-group label {
    padding: 0.5rem 1rem;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(255,255,255,0.05);
}

.radio-group input[type="radio"]:checked + label {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.color-selectors {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.selector-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.selector-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.color-select {
    padding: 0.8rem;
    border-radius: 8px;
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    font-family: inherit;
    outline: none;
    cursor: pointer;
    font-size: 1rem;
}

.color-select option {
    background: var(--bg-surface);
}

/* Results Panel */
.results-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 3rem;
}

.resistor-graphic {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.wire {
    width: 60px;
    height: 6px;
    background: #94a3b8; /* silver wire */
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.5);
}

.resistor-body {
    height: 80px;
    width: 220px;
    background: #e2c08d; /* beige body */
    border-radius: 20px;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    box-shadow: inset 0 -10px 15px rgba(0,0,0,0.2), inset 0 10px 15px rgba(255,255,255,0.4), 0 10px 20px rgba(0,0,0,0.5);
    position: relative;
    padding: 0 10px;
}

.band-display {
    height: 100%;
    width: 16px;
    background: transparent;
    transition: background-color 0.3s;
}

.band-display[data-color="black"] { background: #000; }
.band-display[data-color="brown"] { background: #8b4513; }
.band-display[data-color="red"] { background: #ff0000; }
.band-display[data-color="orange"] { background: #ffa500; }
.band-display[data-color="yellow"] { background: #ffff00; }
.band-display[data-color="green"] { background: #008000; }
.band-display[data-color="blue"] { background: #0000ff; }
.band-display[data-color="violet"] { background: #ee82ee; }
.band-display[data-color="grey"] { background: #808080; }
.band-display[data-color="white"] { background: #ffffff; }
.band-display[data-color="gold"] { background: #ffd700; }
.band-display[data-color="silver"] { background: #c0c0c0; }

.result-display {
    background: rgba(0,0,0,0.2);
    padding: 2.5rem;
    border-radius: 16px;
    width: 100%;
    border: 1px solid var(--glass-border);
}

.value-large {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary);
    text-shadow: 0 0 15px var(--primary-glow);
    font-family: 'Roboto Mono', monospace;
}

.unit {
    color: var(--text-main);
}

.tolerance-display, .temp-coeff-display {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-top: 1rem;
}
