body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-color: #f0f0f0;
    transition: background-color 0.3s, color 0.3s;
}

body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

.main-container {
    display: flex;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
    max-width: 900px;
    width: 90%;
    transition: background-color 0.3s, box-shadow 0.3s;
}

body.dark-mode .main-container {
    background-color: #1e1e1e;
    box-shadow: 0 4px 6px rgba(255,255,255,0.1);
}

.sidebar {
    background-color: #f8f8f8;
    width: 180px;
    padding: 10px;
    border-right: 1px solid #e0e0e0;
    transition: background-color 0.3s, border-color 0.3s;
}

body.dark-mode .sidebar {
    background-color: #2a2a2a;
    border-right-color: #444;
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

/* Theme toggle switch styles */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
    margin-right: 10px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

body.dark-mode .sidebar th {
    background-color: #3a3a3a;
    color: #e0e0e0;
}

.sidebar .table-container {
    max-height: 400px;
    overflow-y: auto;
}

.sidebar table {
    width: 100%;
    border-collapse: collapse;
}

.sidebar th, .sidebar td {
    border: 1px solid #e0e0e0;
    padding: 6px;
    text-align: center;
    font-size: 14px;
    transition: background-color 0.3s, border-color 0.3s, color 0.3s;
}

body.dark-mode .sidebar th, 
body.dark-mode .sidebar td {
    border-color: #444;
    color: #e0e0e0;
}

.sidebar th {
    background-color: #f0f0f0;
    position: sticky;
    top: 0;
    z-index: 1;
}

.calculator-container {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
}

.container {
    text-align: center;
    width: 100%;
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

input, button, select {
    padding: 10px;
    font-size: 16px;
    width: 250px;
    margin-bottom: 10px;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

body.dark-mode input, 
body.dark-mode button, 
body.dark-mode select {
    background-color: #2a2a2a;
    color: #e0e0e0;
    border: 1px solid #444;
}

.input-section select {
    padding: 10px;
    font-size: 16px;
    width: 250px;
    margin-bottom: 10px;
}

.result {
    font-size: 18px;
    font-weight: bold;
    margin-top: 15px;
    transition: color 0.3s;
}

body.dark-mode .result {
    color: #e0e0e0;
}

body.dark-mode h1, 
body.dark-mode h2, 
body.dark-mode label {
    color: #e0e0e0;
}