body {
    font-family: 'Segoe UI', sans-serif;
    background-color: #f0f0f0;
}
.win-card {
    background-color: #ffffff;
    border: 1px solid #d0d0d0;
}
.input-group { 
    margin-bottom: 1rem;
    position: relative;
}
.input-label { display: flex; align-items: center; margin-bottom: 0.5rem; font-weight: 400; color: #333; font-size: 14px;}
.input-field, .select-field {
    width: 100%; padding: 0.5rem 0.75rem; border: 1px solid #8a8a8a;
    background-color: white; transition: border-color 0.2s; border-radius: 0;
}
.input-field:focus, .select-field:focus {
    outline: none; border-color: #0078d4; box-shadow: 0 0 0 1px #0078d4;
}
.unit { position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%); color: #555; pointer-events: none; }
.result-table { width: 100%; border-collapse: collapse; }
.result-table td { padding: 0.75rem 1rem; border-bottom: 1px solid #e0e0e0; }
.result-table td:first-child { font-weight: 400; color: #333; display: flex; align-items: center; position: relative;}
.result-table td:last-child { font-weight: 600; text-align: right; color: #000; }
.result-table tr:last-child td { border-bottom: none; }

.win-button {
    background-color: #e1e1e1; border: 1px solid #adadad; color: #000;
    font-weight: 400; padding: 0.5rem 2rem; transition: background-color 0.2s, border-color 0.2s; border-radius: 0;
}
.win-button:hover { background-color: #e5f1fb; border-color: #0078d4; }
.win-button-primary { background-color: #0078d4; border-color: #005a9e; color: #fff; }
.win-button-primary:hover { background-color: #106ebe; border-color: #005a9e; }

.tooltip-text {
    visibility: hidden; width: 280px; background-color: #333; color: #fff;
    text-align: left; border-radius: 2px; padding: 8px; position: absolute;
    z-index: 10;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px; font-weight: 400;
    pointer-events: none; /* Make tooltip non-interactive */
}
.tooltip-text::after {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent #333 transparent;
}

.input-group:hover .tooltip-text,
.input-field:focus ~ .tooltip-text,
.select-field:focus ~ .tooltip-text,
.result-table td:first-child:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
    transition-delay: 0.4s;
}


#side-menu {
    transition: transform 0.3s ease-in-out;
    transform: translateX(-100%);
}
#side-menu.open {
    transform: translateX(0);
}
.formula-item {
    margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid #e0e0e0;
}
.formula-item:last-child { border-bottom: none; }
.formula-title { font-size: 1.1rem; font-weight: 600; color: #005a9e; }
.formula-explanation { font-size: 0.9rem; color: #333; margin-top: 0.5rem; }
.formula-math {
    font-family: 'Courier New', Courier, monospace; background-color: #f0f0f0; padding: 0.5rem;
    margin-top: 0.5rem; display: block; white-space: pre-wrap; font-size: 14px;
}

/* Unit Switch Styles */
.unit-switch-container { display: flex; align-items: center; justify-content: flex-end; margin-bottom: 1rem; }
.unit-switch { position: relative; display: inline-block; width: 110px; height: 28px; }
.unit-switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: #e1e1e1; transition: .4s; border: 1px solid #adadad;
}
.slider:before {
    position: absolute; content: ""; height: 20px; width: 48px; left: 3px; bottom: 3px;
    background-color: white; transition: .4s;
}
input:checked + .slider { background-color: #0078d4; }
input:checked + .slider:before { transform: translateX(55px); }
.switch-label { margin: 0 8px; font-size: 14px; color: #333; }

.lang-switch a {
    cursor: pointer;
    padding: 2px 6px;
    font-weight: 600;
}
.lang-switch a.active {
    color: #0078d4;
    text-decoration: underline;
}

