body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(to right, #83a4d4, #b6fbff);
    font-family: 'Arial', sans-serif;
}

.calculator {
    width: 320px;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    background: #fff;
    padding: 20px;
}

.display {
    margin-bottom: 20px;
}

.display input {
    width: 100%;
    height: 60px;
    border: none;
    background: #f0f0f0;
    border-radius: 10px;
    text-align: right;
    padding: 0 20px;
    font-size: 2em;
    box-sizing: border-box;
    color: #333;
}

.buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

button {
    height: 60px;
    border: none;
    border-radius: 10px;
    background: #e0e0e0;
    font-size: 1.5em;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

button:hover {
    background: #d0d0d0;
    transform: translateY(-2px);
}

button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.equal {
    grid-row: span 2;
    background: #ff9f43;
    color: white;
}

.equal:hover {
    background: #e68a2e;
}

.zero {
    grid-column: span 2;
}

button:nth-child(4n+1), button:nth-child(4n+2), button:nth-child(4n+3) {
    background: #f7f7f7;
}

button:nth-child(4n), .equal {
    background: #ff9f43;
    color: white;
}

button:nth-child(1), button:nth-child(2) {
    background: #b2bec3;
    color: white;
}

.background-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.math-symbol {
    position: absolute;
    font-size: 3em;
    color: rgba(255, 255, 255, 0.1);
    animation: move 20s linear infinite;
}

.math-symbol:nth-child(1) { top: 10%; left: 15%; animation-delay: 0s; }
.math-symbol:nth-child(2) { top: 20%; left: 80%; animation-delay: -5s; }
.math-symbol:nth-child(3) { top: 70%; left: 10%; animation-delay: -10s; }
.math-symbol:nth-child(4) { top: 80%; left: 90%; animation-delay: -15s; }
.math-symbol:nth-child(5) { top: 40%; left: 50%; animation-delay: -2s; }
.math-symbol:nth-child(6) { top: 50%; left: 20%; animation-delay: -8s; }
.math-symbol:nth-child(7) { top: 90%; left: 40%; animation-delay: -12s; }
.math-symbol:nth-child(8) { top: 5%; left: 50%; animation-delay: -18s; }

@keyframes move {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-100vh) rotate(360deg); }
}

.author {
    position: fixed;
    bottom: 10px;
    right: 10px;
    color: #333;
    font-size: 1em;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.5);
}
