:root {
    --bg-color: #0f172a;
    --calculator-bg: #1e293b;
    --display-bg: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #3b82f6;
    --accent-hover: #2563eb;
    --danger-color: #ef4444;
    --danger-hover: #dc2626;
    --btn-bg: #334155;
    --btn-hover: #475569;
    --font-family: 'Outfit', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    font-family: var(--font-family);
    color: var(--text-primary);
    overflow: hidden;
}

.calculator-container {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    padding: 24px;
    border-radius: 24px;
    width: 320px;
    /* max-width: 90%; */
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.display-container {
    background: var(--display-bg);
    padding: 24px;
    border-radius: 16px;
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 100px;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.3);
}

.history {
    color: var(--text-secondary);
    font-size: 14px;
    min-height: 20px;
    margin-bottom: 4px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.result {
    color: var(--text-primary);
    font-size: 36px;
    font-weight: 600;
    word-wrap: break-word;
    word-break: break-all;
    line-height: 1.2;
}

.buttons-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

button {
    border: none;
    outline: none;
    background: var(--btn-bg);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 20px;
    font-weight: 500;
    padding: 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

button:hover {
    background: var(--btn-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

button:active,
button.active {
    transform: translateY(0);
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
}

.btn-action {
    color: var(--danger-color);
    background: rgba(239, 68, 68, 0.1);
}

.btn-action:hover {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger-hover);
}

.btn-operator {
    color: var(--accent-color);
    background: rgba(59, 130, 246, 0.1);
    font-weight: 600;
}

.btn-operator:hover {
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent-hover);
}

.btn-submit {
    grid-column: span 2;
    background: var(--accent-color);
    color: white;
}

.btn-submit:hover {
    background: var(--accent-hover);
    color: white;
}

/* Animations */
@keyframes press {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(0.95);
    }

    100% {
        transform: scale(1);
    }
}

.btn-animate {
    animation: press 0.1s ease-in-out;
}