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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    max-width: 400px;
    width: 100%;
}

.calculator {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
}

.previous-operand {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
    min-height: 1.5rem;
}

.current-operand {
    color: white;
    font-size: 2.5rem;
    font-weight: 600;
    word-wrap: break-word;
    word-break: break-all;
}

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

.btn {
    padding: 20px;
    font-size: 1.5rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(0);
}

.btn-number {
    background: #f0f0f0;
    color: #333;
}

.btn-number:hover {
    background: #e0e0e0;
}

.btn-operator {
    background: #ff6b6b;
    color: white;
}

.btn-operator:hover {
    background: #ee5a52;
}

.btn-clear {
    background: #fbbf24;
    color: white;
    grid-column: span 2;
}

.btn-clear:hover {
    background: #f59e0b;
}

.btn-delete {
    background: #a855f7;
    color: white;
}

.btn-delete:hover {
    background: #9333ea;
}

.btn-equals {
    background: #10b981;
    color: white;
}

.btn-equals:hover {
    background: #059669;
}

.btn-zero {
    grid-column: span 2;
}

.back-link {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.back-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(-5px);
}

@media (max-width: 480px) {
    .calculator {
        padding: 20px;
    }

    .btn {
        padding: 15px;
        font-size: 1.2rem;
    }

    .current-operand {
        font-size: 2rem;
    }
}