@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

* {
    font-family: 'Roboto', sans-serif;
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: rgb(69, 64, 64);
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

@keyframes borderColorCycle {
    0%   { border-color: red; }
    14%  { border-color: orange; }
    28%  { border-color: yellow; }
    42%  { border-color: green; }
    57%  { border-color: cyan; }
    71%  { border-color: blue; }
    85%  { border-color: violet; }
    100% { border-color: red; }
}


.calculator {
    display: flex;
    flex-direction: column;
    background-color: rgb(27, 25, 25);
    border-radius: 10px;
    padding: 20px;
    height: 400px;
    aspect-ratio: 200 / 320; /* or just 0.625 */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 2px solid #e0e0e0;
    flex-grow: 0;
    animation: borderColorCycle 6s linear infinite;
}

.display {
    width: 100%;
    height: 80px;
    margin-bottom: 10px;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    background-color: transparent;
    padding: 0 10px;
    box-sizing: border-box;
    overflow: hidden;
}

.display input {
    width: 100%;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    text-align: right;
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0;
    margin: 0;
    outline: none;
    pointer-events: none;
}

.rows {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.row {
    flex: 1;
    display: flex;
    gap: 10px;
}

.btn {
    width: 40px;
    height: 40px;
    border-radius: 50px;
    font-size: 1.2rem;
    border: none;
    outline: none;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    flex: 1 1 0;
}

/* Light gray for function buttons like AC, +/- */
#clear-button,
#backspace-button,
#sign-button {
    background-color: #a5a5a5;
    color: black;
}

#btn-0 {
    flex-grow: 3;
}

/* Orange for operators like + - x ÷ = */
.operator {
    background-color: #ff9f0a;
    color: white;
}

/* Dark gray for number buttons */
.digit-btn {
    background-color: #333333;
    color: white;
}

/* Optional: Button press effect */
.btn:active {
    filter: brightness(85%);
}

.btn.pressed {
    filter: brightness(85%);
}

.calculator-border {
    margin: 10rem;
    flex: 1;
}

.footer {
    color: white;
}


