* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.calculator-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.calculator {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.18);
    max-width: 400px;
    width: 100%;
}

.display {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: flex-end;
    word-wrap: break-word;
    word-break: break-all;
}

.previous-operand {
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.2rem;
    min-height: 1.5rem;
}

.current-operand {
    color: white;
    font-size: 2.5rem;
    font-weight: 500;
}

.buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.btn {
    padding: 20px;
    border: none;
    border-radius: 15px;
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    box-shadow: 0 4px 15px 0 rgba(31, 38, 135, 0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(31, 38, 135, 0.4);
    background: rgba(255, 255, 255, 0.3);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px 0 rgba(31, 38, 135, 0.2);
}

.btn-number {
    background: rgba(255, 255, 255, 0.25);
}

.btn-operator {
    background: rgba(255, 165, 0, 0.6);
}

.btn-operator:hover {
    background: rgba(255, 165, 0, 0.8);
}

.btn-equals {
    background: rgba(46, 204, 113, 0.7);
    grid-row: span 2;
}

.btn-equals:hover {
    background: rgba(46, 204, 113, 0.9);
}

.btn-clear {
    background: rgba(231, 76, 60, 0.7);
}

.btn-clear:hover {
    background: rgba(231, 76, 60, 0.9);
}

.btn-delete {
    background: rgba(241, 196, 15, 0.7);
}

.btn-delete:hover {
    background: rgba(241, 196, 15, 0.9);
}

.btn-zero {
    grid-column: span 2;
}

@media (max-width: 480px) {
    .calculator {
        padding: 20px;
    }
    
    .btn {
        padding: 15px;
        font-size: 1.2rem;
    }
    
    .current-operand {
        font-size: 2rem;
    }
}

