/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Poppins", sans-serif;
    background: linear-gradient(270deg, #667eea, #764ba2, #43e97b, #38f9d7);
    background-size: 800% 800%;
    animation: gradientBG 15s ease infinite;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* Background gradient animation */
@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Container */
.container {
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Heading */
h1 {
    font-size: 30px;
    margin-bottom: 20px;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Form layout */
.calculator {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

label {
    font-weight: 500;
    text-align: left;
    font-size: 14px;
    color: #f5f5f5;
}

/* Inputs */
input {
    padding: 12px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    outline: none;
    background: rgba(255, 255, 255, 0.85);
    color: #333;
    transition: 0.3s;
}

input:focus {
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.9);
}

/* Button with ripple effect */
button {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
    color: white;
    padding: 12px;
    font-size: 16px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    font-weight: 500;
    transition: transform 0.2s ease, background 0.3s ease;
}

button:hover {
    transform: scale(1.05);
}

button::after {
    content: "";
    position: absolute;
    width: 300%;
    height: 300%;
    top: 50%;
    left: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.6s ease;
    transform: translate(-50%, -50%) scale(0);
    border-radius: 50%;
}

button:active::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
}

/* Result box */
#result {
    margin-top: 20px;
    font-size: 20px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.18);
    padding: 12px;
    border-radius: 12px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s ease;
}

#result.show {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 500px) {
    h1 { font-size: 26px; }
    .container { padding: 20px; }
}
