/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

body {
    background-color: #121212;
    color: #ffffff;
    transition: background-color 0.3s, color 0.3s;
}

.smd-resistance-calculator {
    background-color: #1e1e1e;
    color: #ffffff;
    padding: 20px;
    border-radius: 15px;
    max-width: 400px;
    margin: 0 auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.smd-resistance-calculator h1 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #bb86fc;
}

.resistance-symbol {
    font-size: 28px;
    color: #ff6f61;
}

.calculator-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-group, .output-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

label {
    font-size: 14px;
    color: #bb86fc;
}

input {
    padding: 10px;
    border: 1px solid #333;
    border-radius: 8px;
    background-color: #333;
    color: #ffffff;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

input:focus {
    border-color: #bb86fc;
}

input[readonly] {
    background-color: #444;
    cursor: not-allowed;
}

.tooltip {
    position: relative;
    margin-top: 10px;
}

.tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.theme-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    gap: 10px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #333;
    transition: 0.4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: #bb86fc;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #ffffff;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Light Theme */
body.light-theme {
    background-color: #f5f5f5;
    color: #121212;
}

body.light-theme .smd-resistance-calculator {
    background-color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

body.light-theme input {
    background-color: #f0f0f0;
    color: #121212;
    border-color: #ccc;
}

body.light-theme input[readonly] {
    background-color: #e0e0e0;
}

body.light-theme .tooltip-text {
    background-color: #f0f0f0;
    color: #121212;
}