:root {
    --font-size-large: 1.25rem; /* 20px */
    --font-size-xlarge: 1.5rem; /* 24px */
    --font-size-xxlarge: 2.5rem; /* 40px */
    --font-size-xxxlarge: 5rem; /* 80px */

    --border-radius-small: 0.625rem; /* 10px */
    --border-radius-medium: 1.25rem; /* 20px */
    --border-radius-large: 1.875rem; /* 30px */

    --bg-color: #222;
    --btn-color: #444;
    --text-color: #fff;
    --secondary-text-color: #555;
    --operator-color: #f39c12;
    --equal-color: #2ecc71;
    --clear-color: #e74c3c;

    --btn-size: 6rem;
}

*{
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: var(--bg-color);
}

.container {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: auto;
    background: var(--bg-color);
}

.calculator {
    width: 33.5rem; /* 536px */
    height: 72.625rem; /* 1162px */
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    border-radius: 1rem;
    background-color: #333;
    transform-origin: center;
    transition: transform 0.3s ease;
}

.display {
    width: 90%;
    padding: 1rem;
    text-align: right;
    font-size: 2rem; 
    background: #555;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    overflow-x: auto;
    white-space: nowrap; 
    scrollbar-width: none; 
    scroll-behavior: smooth;
}

.display::-webkit-scrollbar {
    display: none;
}

.advanced-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    width: 90%;
    margin-bottom: 0.5rem;
  }

.buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    width: 90%;
    height: 50%;
}

.btn {
    padding: 1rem;
    font-size: var(--font-size-xxlarge);
    border: none;
    border-radius: 0.5rem;
    background-color: var(--btn-color);
    color: var(--text-color);
    cursor: pointer;
}

.operator { background-color: var(--operator-color); }
.equal { background-color: var(--equal-color); }
.clear { background-color: var(--clear-color); }

.operator-display {
    color: var(--operator-color); 
  }

.history {
    margin-top: 1rem;
    width: 90%;
    text-align: left;
    font-size: 1.5rem;
    color: #bbb;
    margin-bottom: 1rem;
    background-color: #444;
    border-radius: 10px;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
}

.history-list {
    list-style-type: none;
    padding: 0;
    width: 100%;
    overflow-y: auto; 
    margin-top: 0.5rem;
    border-radius: var(--border-radius-small);
    background-color: #444;
    scrollbar-width: none;
    scroll-behavior: smooth;
}

.history-list::-webkit-scrollbar {
    display: none; 
}

.history-list li {
    margin-bottom: 0.5rem;
}

.history-list button {
    width: 100%;
    font-size: var(--font-size-large); 
    background-color: var(--btn-color);
    color: var(--text-color);
    border: none;
    border-radius: var(--border-radius-small);
    padding: 1rem;
    cursor: pointer;
    text-align: left; 
    transition: background-color 0.2s ease; 
}

.history-list button:hover {
    background-color: #555; 
}
