/**
 * ConvMaster - Resistance Converter Styles
 * 
 * @package    ConvMaster
 * @version    1.0.0
 */

/* =====================================================
   TOOL PAGE LAYOUT
   ===================================================== */
.tool-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.tool-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.tool-header__icon {
    font-size: 2.5rem;
}

.tool-header__icon .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    background: var(--bg-tertiary);
    font-weight: 700;
    font-size: 2rem;
}

.tool-header__icon .icon--purple {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}

.tool-header__text h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: var(--text-primary);
}

.tool-header__text p {
    margin: 0;
    color: var(--text-secondary);
}

/* =====================================================
   CURRENT DATE BANNER
   ===================================================== */
.current-date-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(168, 85, 247, 0.1));
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
}

.current-date-banner__icon {
    font-size: 1.25rem;
}

.current-date-banner__text {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* =====================================================
   CONVERTER WIDGET
   ===================================================== */
.resistance-converter-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* =====================================================
   TOOLBAR
   ===================================================== */
.converter-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    flex-wrap: wrap;
    gap: 1rem;
}

.converter-toolbar__left,
.converter-toolbar__right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.converter-toolbar__right {
    flex-wrap: wrap;
}

.converter-toolbar__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Tabs */
.converter-tabs {
    display: flex;
    gap: 0.25rem;
    background: var(--bg-secondary);
    padding: 0.25rem;
    border-radius: var(--radius-md);
}

.converter-tab {
    padding: 0.5rem 0.875rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.converter-tab:hover {
    color: var(--text-primary);
    background: rgba(139, 92, 246, 0.1);
}

.converter-tab--active {
    color: #fff;
    background: #8b5cf6;
}

/* Popup Button */
.btn-popup {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-popup:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: #8b5cf6;
}

.btn-popup__icon {
    font-size: 1rem;
}

/* =====================================================
   PANELS
   ===================================================== */
.converter-panel {
    padding: 1.5rem;
}

.converter-panel[hidden] {
    display: none !important;
}

/* =====================================================
   INPUT SECTION
   ===================================================== */
.converter-input-section {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.converter-input-row {
    display: flex;
    gap: 1rem;
    flex: 1;
    min-width: 300px;
}

.converter-input-group {
    flex: 1;
}

.converter-input-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.converter-input-group input,
.converter-input-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.converter-input-group input:focus,
.converter-input-group select:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.converter-input-group input::placeholder {
    color: var(--text-tertiary);
}

/* Hide number input spinners */
.converter-input-group input[type="number"],
.resistor-input,
.ohm-input-wrapper input {
    -moz-appearance: textfield;
}

.converter-input-group input[type="number"]::-webkit-outer-spin-button,
.converter-input-group input[type="number"]::-webkit-inner-spin-button,
.resistor-input::-webkit-outer-spin-button,
.resistor-input::-webkit-inner-spin-button,
.ohm-input-wrapper input::-webkit-outer-spin-button,
.ohm-input-wrapper input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Reset Button */
.btn-reset {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    color: #8b5cf6;
}

.btn-reset:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: #8b5cf6;
}

.btn-reset:active {
    transform: scale(0.95);
}

.btn-reset svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

/* =====================================================
   MESSAGE
   ===================================================== */
.converter-message {
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.converter-message--error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.converter-message--success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

/* =====================================================
   RESULTS SECTION
   ===================================================== */
.converter-results-section {
    margin-bottom: 1.5rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.results-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.results-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-action {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-action:hover {
    color: #8b5cf6;
    border-color: rgba(139, 92, 246, 0.3);
    background: rgba(139, 92, 246, 0.1);
}

/* =====================================================
   RESULTS GRID
   ===================================================== */
.results-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
}

.result-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 90px;
}

.result-card:hover {
    border-color: rgba(139, 92, 246, 0.3);
    background: rgba(139, 92, 246, 0.05);
}

.result-card--active {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
}

.result-card__label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-bottom: 0.375rem;
    text-transform: uppercase;
}

.result-card__value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'SF Mono', 'Consolas', monospace;
    word-break: break-all;
    text-align: center;
}

.result-card__symbol {
    font-size: 0.8rem;
    color: #8b5cf6;
    font-weight: 600;
    margin-top: 0.25rem;
}

.result-card__copy {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 24px;
    height: 24px;
    padding: 0;
    font-size: 0.75rem;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
}

.result-card:hover .result-card__copy {
    opacity: 1;
}

.result-card__copy:hover {
    background: rgba(139, 92, 246, 0.2);
}

/* =====================================================
   REFERENCE SECTION
   ===================================================== */
.reference-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.reference-section h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1rem;
}

.reference-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem;
}

.reference-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.875rem 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.reference-item:hover {
    border-color: rgba(139, 92, 246, 0.3);
    background: rgba(139, 92, 246, 0.05);
}

.reference-item__value {
    font-size: 1rem;
    font-weight: 700;
    color: #8b5cf6;
    margin-bottom: 0.25rem;
}

.reference-item__desc {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    text-align: center;
}

/* =====================================================
   COLOR CODE SECTION
   ===================================================== */
.colorcode-section {
    padding: 0;
}

.band-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.band-selector label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.band-selector__buttons {
    display: flex;
    gap: 0.5rem;
}

.band-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.band-btn:hover {
    border-color: rgba(139, 92, 246, 0.3);
}

.band-btn--active {
    color: #fff;
    background: #8b5cf6;
    border-color: #8b5cf6;
}

/* Visual Resistor */
.resistor-visual {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.resistor-body {
    display: flex;
    align-items: center;
    position: relative;
}

.resistor-lead {
    width: 40px;
    height: 3px;
    background: linear-gradient(to bottom, #C0C0C0, #808080);
}

.resistor-bands {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 15px;
    height: 50px;
    background: linear-gradient(to bottom, #E8DCC8 0%, #D4C4A8 50%, #C4B090 100%);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.resistor-band {
    width: 10px;
    height: 40px;
    border-radius: 2px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: background 0.3s ease;
}

.resistor-band--multiplier {
    margin-left: 15px;
}

.resistor-band--tolerance {
    margin-left: 20px;
}

.resistor-band--temp {
    margin-left: 5px;
}

/* Color Selectors */
.color-selectors {
    display: grid;
    gap: 1rem;
}

.color-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.color-selector[hidden] {
    display: none !important;
}

.color-selector label {
    min-width: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.color-palette {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.color-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.color-btn:hover {
    transform: scale(1.1);
}

.color-btn--active {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.4);
}

/* Color Code Result */
.colorcode-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(168, 85, 247, 0.05));
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--radius-lg);
}

.colorcode-result__value {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.colorcode-result__number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'SF Mono', 'Consolas', monospace;
}

.colorcode-result__unit {
    font-size: 1.5rem;
    font-weight: 600;
    color: #8b5cf6;
}

.colorcode-result__tolerance {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.colorcode-result__range {
    font-size: 0.9rem;
    color: var(--text-tertiary);
    margin-top: 0.25rem;
}

/* =====================================================
   SERIES/PARALLEL SECTION
   ===================================================== */
.series-section {
    padding: 0;
}

.series-mode-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.series-mode-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.series-mode-btn:hover {
    border-color: rgba(139, 92, 246, 0.3);
}

.series-mode-btn--active {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.series-mode-icon {
    font-size: 1.5rem;
}

/* Resistor Inputs */
.resistor-inputs {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.resistor-input-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.resistor-input-label {
    min-width: 32px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #8b5cf6;
}

.resistor-input {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.resistor-input:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.resistor-unit {
    padding: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
}

.resistor-remove {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--text-tertiary);
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.resistor-remove:hover:not(:disabled) {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.1);
}

.resistor-remove:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.btn-add-resistor {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
    border: 1px dashed rgba(139, 92, 246, 0.3);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 1.5rem;
}

.btn-add-resistor:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: #8b5cf6;
}

/* Series Result */
.series-result {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(168, 85, 247, 0.05));
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--radius-lg);
}

.series-result__label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.series-result__value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'SF Mono', 'Consolas', monospace;
}

.series-result__value span:last-child {
    color: #8b5cf6;
    font-size: 1.25rem;
}

.series-result__formula {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    margin-top: 0.75rem;
    font-family: 'SF Mono', 'Consolas', monospace;
}

/* =====================================================
   OHM'S LAW SECTION
   ===================================================== */
.ohm-section {
    padding: 0;
}

.ohm-diagram {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.ohm-triangle {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 3rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-color);
}

.ohm-triangle__top {
    margin-bottom: 1rem;
}

.ohm-triangle__bottom {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--border-color);
}

.ohm-var {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ohm-var:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: #8b5cf6;
}

.ohm-multiply {
    font-size: 1.25rem;
    color: var(--text-tertiary);
}

/* Ohm Inputs */
.ohm-inputs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.ohm-input-group {
    display: flex;
    flex-direction: column;
}

.ohm-input-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.ohm-input-wrapper {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-secondary);
    transition: all 0.2s ease;
}

.ohm-input-wrapper:focus-within {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.ohm-input-wrapper input {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    color: var(--text-primary);
    background: transparent;
    border: none;
}

.ohm-input-wrapper input:focus {
    outline: none;
}

.ohm-input-wrapper input::placeholder {
    color: var(--text-tertiary);
}

.ohm-input-unit {
    padding: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
}

.ohm-input-wrapper select {
    padding: 0.75rem;
    font-size: 0.85rem;
    color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
    border: none;
    cursor: pointer;
}

/* Ohm Actions */
.ohm-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.btn-ohm-calc {
    flex: 1;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: #8b5cf6;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-ohm-calc:hover {
    background: #7c3aed;
}

.btn-ohm-reset {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-ohm-reset:hover {
    color: #8b5cf6;
    border-color: rgba(139, 92, 246, 0.3);
}

/* Ohm Results */
.ohm-results {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.ohm-results[hidden] {
    display: none !important;
}

.ohm-result-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(168, 85, 247, 0.05));
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--radius-md);
}

.ohm-result-label {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin-bottom: 0.5rem;
}

.ohm-result-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'SF Mono', 'Consolas', monospace;
}

.ohm-result-formula {
    font-size: 1rem;
    font-weight: 500;
    color: #8b5cf6;
    font-family: 'SF Mono', 'Consolas', monospace;
}

/* Ohm Message */
.ohm-message {
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    text-align: center;
}

.ohm-message[hidden] {
    display: none !important;
}

.ohm-message--error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.ohm-message--info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #3b82f6;
}

/* =====================================================
   SEO CONTENT
   ===================================================== */
.tool-seo-content {
    margin-top: 3rem;
}

.tool-section {
    margin-bottom: 2.5rem;
}

.tool-section h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1rem;
}

.tool-section > p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.feature-card {
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.feature-card:hover {
    border-color: rgba(139, 92, 246, 0.3);
}

.feature-card__icon {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    display: block;
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.feature-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* Steps Grid */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.step-card {
    position: relative;
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.step-card__number {
    position: absolute;
    top: -10px;
    left: 16px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    background: #8b5cf6;
    border-radius: 50%;
}

.step-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0.5rem 0 0.5rem;
}

.step-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* Formulas Grid */
.formulas-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.formula-card {
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    text-align: center;
}

.formula-card h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.75rem;
}

.formula-card code {
    display: block;
    padding: 0.75rem;
    font-size: 1rem;
    font-family: 'SF Mono', 'Consolas', monospace;
    color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
    border-radius: var(--radius-sm);
}

/* FAQ List */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.faq-item summary {
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.25rem;
    color: #8b5cf6;
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-item summary:hover {
    background: var(--bg-secondary);
}

.faq-item p {
    padding: 0 1.25rem 1rem;
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* =====================================================
   HIDDEN STATE
   ===================================================== */
[hidden] {
    display: none !important;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 900px) {
    .results-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .reference-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .formulas-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ohm-inputs {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .tool-page {
        padding: 1rem;
    }
    
    .tool-header {
        flex-direction: column;
        text-align: center;
    }
    
    .tool-header__text h1 {
        font-size: 1.5rem;
    }
    
    .converter-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .converter-toolbar__left,
    .converter-toolbar__right {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .converter-tabs {
        order: -1;
        width: 100%;
        justify-content: center;
    }
    
    .converter-input-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .converter-input-row {
        flex-direction: column;
        min-width: auto;
    }
    
    .btn-reset {
        width: 100%;
        height: 44px;
    }
    
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .result-card__copy {
        opacity: 1;
    }
    
    .reference-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .color-selector {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .color-selector label {
        min-width: auto;
        margin-bottom: 0.5rem;
    }
    
    .series-mode-selector {
        flex-direction: column;
    }
    
    .resistor-input-row {
        flex-wrap: wrap;
    }
    
    .resistor-input {
        min-width: 100px;
    }
    
    .features-grid,
    .steps-grid,
    .formulas-grid {
        grid-template-columns: 1fr;
    }
    
    .ohm-results {
        grid-template-columns: 1fr;
    }
    
    .btn-popup__text {
        display: none;
    }
}

@media (max-width: 480px) {
    .current-date-banner {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
        text-align: center;
    }
    
    .current-date-banner__text {
        font-size: 0.95rem;
    }
    
    .converter-tab {
        padding: 0.4rem 0.6rem;
        font-size: 0.7rem;
    }
    
    .results-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .result-card {
        padding: 0.75rem;
        min-height: 80px;
    }
    
    .result-card__value {
        font-size: 1rem;
    }
    
    .reference-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .color-palette {
        gap: 0.375rem;
    }
    
    .color-btn {
        width: 28px;
        height: 28px;
    }
    
    .resistor-visual {
        padding: 1rem;
    }
    
    .resistor-bands {
        height: 40px;
        gap: 5px;
        padding: 0 10px;
    }
    
    .resistor-band {
        width: 8px;
        height: 32px;
    }
    
    .colorcode-result__number {
        font-size: 2rem;
    }
    
    .colorcode-result__unit {
        font-size: 1.25rem;
    }
}

/* =====================================================
   DARK THEME SPECIFIC
   ===================================================== */
[data-theme="dark"] .result-card:hover {
    background: rgba(139, 92, 246, 0.08);
}

[data-theme="dark"] .result-card--active {
    background: rgba(139, 92, 246, 0.15);
}

[data-theme="dark"] .reference-item:hover {
    background: rgba(139, 92, 246, 0.08);
}

[data-theme="dark"] .formula-card code {
    background: rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .resistor-bands {
    background: linear-gradient(to bottom, #B8A888 0%, #A89870 50%, #988860 100%);
}
