/* ---------- Base ---------- */

html, body {
    height: 100%;
}

body {
    background: linear-gradient(to bottom, #e9edff 0%, #e8ecff 50%, #dde3ff 100%);
    font-family: 'Inter', Arial, sans-serif;
    margin: 0;
    padding: 0;
}

/* ---------- Header ---------- */

.header {
    width: 100%;
    background: #4a6cf7;
    padding: 20px 0;
    display: flex;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

.header-inner {
    width: 100%;
    max-width: 520px;
    display: flex;
    justify-content: center;
}

.header-inner svg {
    width: 240px;
    height: auto;
}

/* ---------- Container ---------- */

.container {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ---------- Title ---------- */

.title {
    font-size: 32px;
    font-weight: 700;
    margin: 25px 0;
    color: #333;
    text-align: center;
}

/* ---------- Card ---------- */

.card {
    background: white;
    padding: 35px;
    width: 100%;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid #f0f2ff;
    box-sizing: border-box;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Form ---------- */

form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

label {
    font-weight: 600;
    color: #444;
    font-size: 15px;
}

select, input {
    padding: 14px;
    border-radius: 12px;
    border: 1px solid #cdd3f7;
    background: #f9faff;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

select:focus,
input:focus {
    border-color: #4a6cf7;
    box-shadow: 0 0 0 3px rgba(74,108,247,0.2);
    outline: none;
}

/* ---------- Button ---------- */

button {
    margin-top: 15px;
    padding: 14px;
    background: #4a6cf7;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.25s;
}

button:hover {
    background: #3a56d4;
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

/* ---------- Result ---------- */

#result {
    margin-top: 25px;
    padding: 18px;
    background: #f0f3ff;
    border-radius: 12px;
    font-size: 22px;
    font-weight: 700;
    color: #2a2a2a;
    text-align: center;
    border: 1px solid #dce1ff;
    min-height: 50px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

/* ---------- Loading ---------- */

.loading {
    color: #4a6cf7;
    font-size: 18px;
    font-weight: 600;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}

/* ---------- Responsive ---------- */

@media (max-width: 600px) {

    .header-inner svg {
        width: 180px;
    }

    .title {
        font-size: 26px;
        margin-top: 20px;
    }

    .card {
        padding: 25px;
    }

    select, input {
        font-size: 15px;
        padding: 12px;
    }

    button {
        font-size: 17px;
    }

    .container {
        padding: 0 15px;
    }
}

/* ---------- Side Ads (desktop only) ---------- */

.side-ads {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
}

.left-ad, .right-ad {
    width: 160px;
}

@media (max-width: 900px) {
    .side-ads {
        display: none;
    }
}

/* ---------- Bottom Ad ---------- */

.bottom-ad {
    margin-top: 30px;
}
