/* --- CSS STYLES --- */
:root {
    --bg-color: #121212;
    --calc-bg: #1e1e1e;
    --text-color: #ffffff;
    --btn-bg: #2d2d2d;
    --btn-hover: #3d3d3d;
    --btn-active: #4d4d4d;
    --accent-color: #ff9f0a; /* Orange */
    --accent-hover: #ffb340;
    --operator-color: #252525;
    --operator-hover: #353535;
    --shadow-light: rgba(255, 255, 255, 0.05);
    --shadow-dark: rgba(0, 0, 0, 0.3);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--bg-color);
}

.calculator {
    background-color: var(--calc-bg);
    width: 350px;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 15px 15px 30px var(--shadow-dark), 
                -5px -5px 15px var(--shadow-light);
}

/* Display Screen */
.display-container {
    margin-bottom: 20px;
    text-align: right;
    padding: 10px;
}

#display {
    width: 100%;
    height: 80px;
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 3rem;
    text-align: right;
    outline: none;
    /* Hide scrollbar */
    scrollbar-width: none; 
}

#display::-webkit-scrollbar { 
    display: none; 
}

/* Button Grid */
.buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

button {
    height: 65px;
    border-radius: 15px;
    border: none;
    background-color: var(--btn-bg);
    color: var(--text-color);
    font-size: 1.25rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 5px 5px 10px var(--shadow-dark), 
                -2px -2px 5px var(--shadow-light);
    outline: none;
}

button:active {
    transform: scale(0.95);
    box-shadow: inset 5px 5px 10px var(--shadow-dark), 
                inset -2px -2px 5px var(--shadow-light);
}

button:hover {
    background-color: var(--btn-hover);
}

/* Specific Button Styles */
.operator {
    color: var(--accent-color);
    font-weight: bold;
}

.equals {
    background-color: var(--accent-color);
    color: #000;
    grid-column: span 2; /* Make equals button wider */
    font-weight: bold;
}

.equals:hover {
    background-color: var(--accent-hover);
}

.clear {
    color: #ff4757;
}

.delete {
    color: #ffa502;
}

/* Responsive adjustments */
@media (max-width: 400px) {
    .calculator {
        width: 100%;
        height: 100vh;
        border-radius: 0;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
    }
    #display {
        font-size: 4rem;
    }
}