body {
    font-family: 'Roboto', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100vh;
    margin: 0;
    opacity: 0;
    position: relative;
    background-color: #eeeeee;
    transition: background-color 0.1s, color 0.2s, opacity 1s ease-in;
}

code {
    padding: 2px 4px;
    border-radius: 4px;
    background-color: #e6e6e6;
    font-size: 15px;
}

.container-horizontal {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    max-width: 1000px;
    justify-content: center;
    gap: 1rem;
}

.container-vertical {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    align-items: start;
    padding-left: 5px;
    padding-right: 5px;
}

.theme-switch {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    position: absolute;
    top: 25px;
    right: 20px;
    font-size: 1.2em;
}

.theme-switch label {
    display: flex;
}

.theme-switch input {
    display: none;
}

.instruction, .updates, .todo {
    position: relative;
    background-color: #f2f2f2;
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    margin-top: 50px;
    margin-left: 10px;
    margin-right: 10px;
    margin-bottom: 20px;
    width: 100%;
}

.version {
    position: absolute;
    top: 10px;
    right: 30px;
    color: #979797;
    font-size: 16px;
}

.instruction h2 {
    margin-bottom: 10px;
}

.instruction p, .instruction ul {
    margin-bottom: 10px;
}

.instruction .section {
    margin-bottom: 20px;
}

.slider {
    width: 34px;
    height: 20px;
    background-color: #ccc;
    border-radius: 50px;
    position: relative;
    transition: background-color 0.2s, box-shadow 0.2s;
}

.slider:hover {
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.slider:before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    background-color: white;
    border-radius: 50%;
    top: 1px;
    left: 1px;
    transition: transform 0.2s;
}

.theme-switch input:checked + .slider {
    background-color: #4CAF50;
}

.theme-switch input:checked + .slider:before {
    transform: translateX(14px);
}

.theme-switch input:checked + .slider:hover {
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.7);
}

.calculator {
    background-color: #f2f2f2;
    padding: 15px;
    opacity: 0;
    border-radius: 10px;
    min-width: 336px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    transform: translateY(50px);
    transition: transform 0.5s ease-out, background-color 0.2s, color 0.2s, opacity 0.5s ease-out;
}

#display {
    width: 95%;
    height: 40px;
    margin-bottom: 20px;
    margin-left: 5px;
    margin-right: 5px;
    font-size: 1.5em;
    text-align: right;
    padding: 5px;
    border: 1px solid #dadada;
    border-radius: 5px;
    background-color: #fff;
    color: #000;
    transition: background-color 0.2s, color 0.2s;
}

.button {
    width: 50px;
    height: 50px;
    margin: 5px;
    font-size: 1.2em;
    cursor: pointer;
    border: none;
    padding: 0;
    text-align: center;
    background-color: #9e9e9e;
    border-radius: 5px;
    color: white;
    transition: background-color 0.2s, color 0.2s;
}

.button:hover {
    background-color: #ffb24e;
    color: white;
    box-shadow: 0 0 5px rgba(168, 168, 168, 0.7);
}

.number {
    background-color: #ddd;
    color: black;
}

.number:hover {
    background-color: #bbb;
    color: black;
}

.erase {
    background-color: #ff8282;
    color: white;
}

.erase:hover {
    background-color: #ff4747;
    color: white;
}

.equals {
    background-color: #4CAF50;
    color: white;
    width: 97% !important;
    margin-top: 15px;
}

.equals:hover {
    background-color: #45a049;
}

.history {
    background-color: #f2f2f2;
    padding: 10px;
    border-radius: 10px;
    width: 100%;
    min-width: 300px;
    min-height: 514px;
    height: 100%;
    text-align: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s;
}

.history h3 {
    margin-top: 5px;
}

.history ul {
    list-style-type: none;
    padding-left: 0;
    max-height: 415px;
    overflow-y: auto;
}

.history li {
    background-color: #fff;
    margin: 5px 0;
    padding: 5px;
    border-radius: 4px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s, box-shadow 0.2s;
}

.history li:hover {
    background-color: #fafafa;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.notification {
    position: absolute;
    background-color: #4CAF50;
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.history-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 60%;
    margin: 0 auto;
    transform: translateY(50px);
    transition: transform 0.5s ease-out, background-color 0.2s, opacity 0.5s ease-out;
}

.save-history {
    position: absolute;
    width: 45px;
    height: 45px;
    margin-top: 10px;
    font-size: 1.2em;
    cursor: pointer;
    padding: 0;
    border: none;
    background-color: #e0e0e0;
    border-radius: 5px;
    bottom: 10px;
    left: 50%;
    color: black;
    transform: translateX(-50%);
    transition: background-color 0.2s, color 0.2s;
}

.clearHistory {
    position: absolute;
    top: 15px;
    right: 10px;
    font-size: 20px;
    color: #000000;
    transition: color 0.2s;
}

.clearHistory:hover {
    color: #ff4d4d;
}

.save-history:hover {
    background-color: #45a049;
    color: white;
}

.noHistoryMessage {
    display: none;
}

body.dark-mode {
    background-color: #2e2e2e;
    color: #f5f5f5;
}

body.dark-mode .calculator {
    background-color: #444;
}

body.dark-mode #display {
    background-color: #333;
    color: #fff;
    border: 1px solid #555;
}

body.dark-mode .button {
    background-color: #575757;
    color: #fff;
}

body.dark-mode .button:hover {
    background-color: #d89033;
}

body.dark-mode .number {
    background-color: #6d6d6d;
}

body.dark-mode .number:hover {
    background-color: #7e7e7e;
}

body.dark-mode .erase {
    background-color: #ff6c6c;
}

body.dark-mode .erase:hover {
    background-color: #ff4747;
}

body.dark-mode .equals {
    background-color: #4CAF50;
    color: white;
}

body.dark-mode .equals:hover {
    background-color: #45a049;
}

body.dark-mode .history {
    background-color: #444;
}

body.dark-mode .history li {
    background-color: #555;
}

body.dark-mode .history li:hover {
    background-color: #5c5c5c;
    box-shadow: 0 1px 1px rgba(255, 255, 255, 0.575);
    cursor: pointer;
}

body.dark-mode .clearHistory {
    color: #f5f5f5;
}

body.dark-mode .save-history {
    color: #f5f5f5;
}

body.dark-mode .clearHistory:hover {
    color: #ff4d4d;
}

body.dark-mode .instruction {
    background-color: #444;
    color: #f5f5f5;
}

body.dark-mode .updates {
    background-color: #444;
    color: #f5f5f5;
}

body.dark-mode .todo {
    background-color: #444;
    color: #f5f5f5;
}

body.dark-mode code {
    background-color: #363636;
    color: #f5f5f5;
}

body.dark-mode .social-links a {
    color: #f5f5f5;
}

body.dark-mode .social-links a:hover {
    color: #0d6efd;
}

.dark-mode input, .dark-mode button {
    background-color: #333333;
    color: #ffffff;
    border: 1px solid #555555;
}

body.dark-mode ::-webkit-scrollbar-track {
    background-color: #2c2c2c;
}

body.dark-mode ::-webkit-scrollbar-thumb {
    background-color: #555555;
    border: 2px solid #333333;
}

body.dark-mode ::-webkit-scrollbar-thumb:hover {
    background-color: #777777;
}

.highlight {
    background-color: #c3f9c8;
    transition: background-color 0.3s ease;
}

.fade-in {
    opacity: 0;
    transition: opacity 1s ease-in;
}

.fade-in.visible {
    opacity: 1;
}

.slide-in {
    transform: translateY(0);
    opacity: 1;
}

.spacer {
    width: 0px;
    height: 25px;
}