/* ======================
   Base Page Styling
====================== */
body {
    font-family: 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #8e9eab, #eef2f3); /* Soft grey-blue to light */
    margin: 0;
    padding: 0;
    color: #333; /* Dark gray text */
    text-align: center;

    /* Center everything */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

/* Headings */
h2 {
    margin-bottom: 20px;
    font-size: 1.8rem;
    letter-spacing: 1px;
    color: #444;
}

/* ======================
   Buttons Styling
====================== */
.buttons button {
    background: linear-gradient(90deg, #a1c4fd, #c2e9fb); /* Soft blue gradient */
    color: #333;
    border: none;
    padding: 12px 25px;
    font-size: 1rem;
    border-radius: 8px;
    margin: 10px;
    cursor: pointer;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.buttons button:hover {
    transform: translateY(-3px);
    box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.2);
}

/* ======================
   Converter Card
====================== */
.converter-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    width: 300px;
    margin-top: 20px;
    animation: slideDown 0.4s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.converter-card input {
    width: 80%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    outline: none;
    font-size: 1rem;
    text-align: center;
    background: #f9f9f9;
}

.converter-card button {
    background: linear-gradient(90deg, #d4fc79, #96e6a1); /* Soft green gradient */
    color: #333;
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.converter-card button:hover {
    transform: scale(1.05);
}

/* Slide-in animation for card */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ======================
   Spinner
====================== */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.6); /* Lighter overlay */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(0, 0, 0, 0.1);
    border-top: 5px solid #6c63ff; /* Soft purple spin */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ======================
   Result Display
====================== */
#resultDisplay {
    margin-top: 10px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #444;
}


/* =========================
   Modal Background
========================= */
.modal {
    display: none; /* hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.35);
    backdrop-filter: blur(4px); /* soft blur effect */
    animation: fadeIn 0.3s ease-in-out;
}

/* =========================
   Modal Content Box
========================= */
.modal-content {
    background: linear-gradient(135deg, #8e9eab, #eef2f3);
    margin: 15% auto;
    padding: 20px 25px;
    border-radius: 12px;
    width: 320px;
    max-width: 85%;
    text-align: center;
    color: #333;
    font-size: 1rem;
    font-weight: 500;
    box-shadow: 0px 6px 18px rgba(0,0,0,0.25);
    animation: scaleUp 0.25s ease-in-out;
    position: relative;
}

/* =========================
   Close Button
========================= */
.close {
    position: absolute;
    top: 10px;
    right: 12px;
    color: #777;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}
.close:hover {
    color: #333;
    transform: scale(1.2);
}

/* =========================
   Message Styling
========================= */
#modalMessage {
    margin-top: 10px;
    font-size: 1.05rem;
    line-height: 1.5;
}

@media (max-width: 768px) {
    h1{
        margin-top: -300px;
    }
    .buttons{
        margin-top: -100px;
    }
}