/* Konfiguracja zmiennych i bazy */
:root {
    --bg-main: #0f172a;
    --card-bg: #1e293b;
    --accent: #38bdf8;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --resistor-base: #ebd2b0; /* Klasyczny beżowy kolor ceramiki */
}

body {
    margin: 0;
    padding: 20px;
    background-color: var(--bg-main);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    box-sizing: border-box;
}



.app-container {
    width: 100%;
    max-width: 700px;
    background: var(--card-bg);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    border: 1px solid #334155;
}

.app-header h2 {
    margin: 0 0 10px 0;
    font-size: 24px;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-header p {
    margin: 0 0 30px 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}


/* Stylizacja Graficzna Rezystora */
.resistor-viewport {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    background: #020617;
    border-radius: 12px;
    margin-bottom: 25px;
    overflow: hidden;
}

.wire {
    height: 6px;
    width: 80px;
    background: linear-gradient(to bottom, #94a3b8, #cbd5e1, #64748b);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.resistor-body {
    width: 220px;
    height: 56px;
    background: var(--resistor-base);
    border-radius: 28px;
    position: relative;
    display: flex;
    justify-content: space-between;
    padding: 0 35px;
    box-sizing: border-box;
    box-shadow: inset -8px -8px 15px rgba(0,0,0,0.15), 
                inset 8px 8px 15px rgba(255,255,255,0.4),
                0 4px 10px rgba(0,0,0,0.3);
}

.resistor-band {
    width: 14px;
    height: 100%;
    box-shadow: 1px 0 3px rgba(0,0,0,0.2);
    transition: background 0.25s ease-in-out;
}

/* Pozycjonowanie paska tolerancji lekko na bok (zgodnie ze sztuką inżynierską) */
#visual-band-3 {
    margin-left: 20px;
}

/* Ekran Wynikowy */
.display-panel {
    background: #0f172a;
    border-left: 4px solid var(--accent);
    padding: 15px 20px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 30px;
    text-align: center;
}

.panel-label {
    font-size: 11px;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.panel-value {
    font-size: 32px;
    font-weight: 700;
    color: #f8fafc;
}

.panel-sub-value {
    font-size: 14px;
    color: #38bdf8;
    margin-top: 4px;
}

/* Grid Kontrolny */
.selectors-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

@media (max-width: 500px) {
    .selectors-grid {
        grid-template-columns: 1fr;
    }
}

.control-card {
    background: #0f172a;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #1e293b;
}

.control-card label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 600;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 10px;
    color: #fff;
}
.b-1 { background-color: #ef4444; }
.b-2 { background-color: #3b82f6; }
.b-3 { background-color: #eab308; }
.b-4 { background-color: #10b981; }

select {
    width: 100%;
    padding: 10px;
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid #475569;
    border-radius: 6px;
    outline: none;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s;
}

select:focus {
    border-color: var(--accent);
}

/* Przycisk powrotu do Hubu */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    margin-bottom: 20px;
    transition: all 0.2s ease-in-out;
    width: fit-content;
}

/* Efekt po najechaniu myszką */
.back-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(56, 189, 248, 0.05); /* Subtelny błękitny blask w tle */
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.15);
}

/* Animacja samej strzałki przy hoverze */
.back-btn i {
    transition: transform 0.2s ease-in-out;
}

.back-btn:hover i {
    transform: translateX(-3px); /* Strzałka lekko cofa się w lewo sugerując powrót */
}