/* =====================================================
   DARK NEUMORPHISM CALCULATOR
   ===================================================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;500;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: #212529;
    --text-color: #f8f9fa;
    --text-secondary: #adb5bd;
    --shadow-light: rgba(255, 255, 255, 0.05);
    --shadow-dark: rgba(0, 0, 0, 0.5);
    --primary-accent: #00d2ff; /* Cyan */
    --secondary-accent: #3a7bd5; /* Blue */
    --operator-color: #ff0055; /* Pink/Red */
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-color);
}

/* =====================================================
   Calculator Container
   ===================================================== */
.calculator-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.calculator {
    width: 350px;
    padding: 25px;
    border-radius: 30px;
    background-color: var(--bg-color);
    box-shadow: 15px 15px 30px var(--shadow-dark), 
                -15px -15px 30px var(--shadow-light);
}

/* =====================================================
   Display
   ===================================================== */
.display-container {
    margin-bottom: 25px;
    padding: 20px;
    border-radius: 20px;
    background-color: var(--bg-color);
    box-shadow: inset 8px 8px 16px var(--shadow-dark), 
                inset -8px -8px 16px var(--shadow-light);
    text-align: right;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.previous-operand {
    font-size: 1rem;
    color: var(--text-secondary);
    min-height: 1.5rem;
    margin-bottom: 5px;
}

.current-operand {
    font-size: 2.5rem;
    font-weight: 500;
    color: var(--text-color);
    word-wrap: break-word;
    word-break: break-all;
}

/* =====================================================
   Buttons Grid
   ===================================================== */
.buttons-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

button {
    height: 60px;
    width: 60px;
    border-radius: 50%;
    border: none;
    outline: none;
    background-color: var(--bg-color);
    box-shadow: 6px 6px 12px var(--shadow-dark), 
                -6px -6px 12px var(--shadow-light);
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
}

button:active {
    box-shadow: inset 4px 4px 8px var(--shadow-dark), 
                inset -4px -4px 8px var(--shadow-light);
    transform: scale(0.98);
}

button:hover {
    color: var(--primary-accent);
}

/* Special Buttons */
.span-two {
    grid-column: span 2;
    width: 100%;
    border-radius: 30px;
}

.operator {
    color: var(--primary-accent);
    font-weight: 700;
}

.equals {
    background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
    color: white;
    box-shadow: 6px 6px 12px rgba(0, 0, 0, 0.3), 
                -6px -6px 12px rgba(255, 255, 255, 0.05);
}

.equals:hover {
    color: white;
    filter: brightness(1.1);
}

.equals:active {
    box-shadow: inset 4px 4px 8px rgba(0, 0, 0, 0.3);
}

.clear, .delete {
    color: var(--operator-color);
}

/* =====================================================
   History Panel (Optional)
   ===================================================== */
.history-panel {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: var(--bg-color);
    border-radius: 20px;
    margin-top: 20px;
    box-shadow: inset 6px 6px 12px var(--shadow-dark), 
                inset -6px -6px 12px var(--shadow-light);
}

.history-panel.open {
    max-height: 200px;
    padding: 15px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.history-item:last-child {
    border-bottom: none;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-color); border-radius: 3px; box-shadow: inset 2px 2px 5px var(--shadow-dark); }
