@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

* {
    box-sizing: border-box;
    font-family: 'Pretendard', sans-serif;
}

body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.calculator-container {
    padding: 20px;
}

.calculator {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    padding: 20px;
    width: 320px;
    backdrop-filter: blur(10px);
}

.display {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: right;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05);
}

.previous-operand {
    color: #6c757d;
    font-size: 1rem;
    min-height: 1.5rem;
    margin-bottom: 5px;
}

.current-operand {
    color: #212529;
    font-size: 2.5rem;
    font-weight: 700;
    word-wrap: break-word;
    word-break: break-all;
}

.buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.btn {
    border: none;
    outline: none;
    padding: 15px;
    font-size: 1.25rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #ffffff;
    color: #495057;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn.operator {
    background-color: #ff922b;
    color: white;
}

.btn.operator:hover {
    background-color: #fd7e14;
}

.btn.equals {
    background-color: #08d9d6;
    color: white;
    grid-column: span 2;
}

.btn.equals:hover {
    background-color: #06b2af;
}

.btn.function {
    background-color: #dee2e6;
    color: #212529;
}

.btn.function:hover {
    background-color: #ced4da;
}

.btn.zero {
    grid-column: span 2;
}

@media (max-width: 400px) {
    .calculator {
        width: 100%;
    }
}