/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

/* Calculator Container */
.calculator-wrap {
    background-color: #22252d; /* Dark theme background */
    width: 360px;
    padding: 25px;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}

/* Display Section */
.calculator-display {
    background-color: #2a2d37;
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 25px;
    text-align: right;
    min-height: 110px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.history-text {
    color: #4cd964; /* Green for history bonus points */
    font-size: 0.85rem;
    height: 20px;
}

.operation-text {
    color: #abb2bf;
    font-size: 1.1rem;
    height: 25px;
    margin-top: 5px;
}

.current-text {
    color: #ffffff;
    font-size: 2.4rem;
    font-weight: 600;
    overflow-x: auto;
}

/* Grid Layout */
.button-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* Exactly 5 columns */
    gap: 12px;
}

/* Buttons Styling */
.btn {
    border: none;
    height: 56px;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}

.btn:active {
    transform: scale(0.92);
}

.btn-num { background-color: #2d313e; }
.btn-num:hover { background-color: #3e4354; }

.btn-op { background-color: #ff9f0a; } /* Orange operators */
.btn-op:hover { background-color: #ffb340; }

.btn-clear { background-color: #2d313e; color: #ff453a; } /* Reddish C */

.btn-equals {
    grid-column: span 2; /* Spans 2 columns to complete the 5x4 grid */
    border-radius: 30px;
    background-color: #a5a9b7;
    color: #22252d;
    width: 100%;
}

/* Responsive for Mobile */
@media (max-width: 400px) {
    .calculator-wrap {
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }
}
