body, html {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
    background: linear-gradient(135deg, #41f7ee, #f6b4c9);
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 20px;
}

.calculator {
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transform: perspective(1px) translateZ(0);
}

.calculator:before {
    content: '';
    position: absolute;
    z-index: -1;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    background: radial-gradient(circle, #e0f7fa 20%, transparent 20%);
    background-size: 50% 50%;
    transform: translate(-50%, -50%);
    animation: bgRotate 10s linear infinite;
}

@keyframes bgRotate {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

h1 {
    margin-bottom: 20px;
    font-size: 26px;
    color: #333333;
    position: relative;
    animation: fadeIn 1s ease-in-out;
}

h1:after {
    content: '';
    width: 80px;
    height: 4px;
    background: #2779eb;
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 5px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
    position: relative;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555555;
}

input {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-size: 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    outline: none;
}

input:focus {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #246bcf, #18c3cf);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.3s ease, transform 0.2s ease;
    margin-top: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

button:hover {
    background: linear-gradient(135deg, #2077ea, #22bee9);
    transform: translateY(-3px);
}

.result {
    margin-top: 20px;
    font-size: 20px;
    font-weight: bold;
    color: #333333;
}

.result span {
    color: #2f80f2;
}
