* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #1c1c1c;
    color: #ffffff;
}

.calculator-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

h1 {
    font-size: 24px;
    font-weight: 300;
    margin-bottom: 10px;
    text-align: center;
    color: #ffffff;
}

.calculator {
    background-color: #2d2d2d;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    width: 320px;
}

.display {
    background-color: #1c1c1c;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: right;
    overflow: hidden;
}

.result {
    color: #ffffff;
    font-size: 48px;
    font-weight: 300;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: all 0.2s ease;
}

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

.btn {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    border: none;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
}

.btn:hover {
    filter: brightness(120%);
    transform: translateY(-2px);
}

.btn:active {
    filter: brightness(130%);
    transform: translateY(1px);
}

.number {
    background-color: #505050;
    color: #ffffff;
}

.operator {
    background-color: #ff9f0a;
    color: #ffffff;
    font-size: 28px;
}

.equals {
    font-weight: bold;
}

.function {
    background-color: #323232;
    color: #ffffff;
}

.zero {
    grid-column: span 2;
    width: 100%;
    border-radius: 32.5px;
    padding-left: 24px;
    justify-content: flex-start;
}

.active-operator {
    background-color: #ffffff;
    color: #ff9f0a;
}

.info {
    text-align: center;
    font-size: 14px;
    color: #999;
    margin-top: 10px;
}

.info p {
    margin: 5px 0;
}

/* Animation for result changes */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.result.updated {
    animation: pulse 0.3s ease;
}

@media (max-width: 360px) {
    .calculator {
        width: 90%;
    }
    
    .btn {
        width: 100%;
        height: 60px;
    }
} 