* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #eff6ff;
    --text: #172033;
    --text-light: #64748b;
    --background: #f5f7fb;
    --card: #ffffff;
    --border: #e2e8f0;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
}

/* HEADER */

.site-header {
    background: linear-gradient(135deg, #1e40af, #2563eb);
    color: white;
    padding: 55px 20px;
}

.header-content {
    max-width: 900px;
    margin: auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 35px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
}

.header-text {
    text-align: center;
}

.header-text h1 {
    font-size: 42px;
    line-height: 1.2;
    margin-bottom: 12px;
}

.header-text p {
    font-size: 18px;
    opacity: 0.9;
}

/* CONTAINER */

.container {
    width: calc(100% - 40px);
    max-width: 850px;
    margin: auto;
}

/* CARDS */

.calculator-card,
.info-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 35px;
    box-shadow: var(--shadow);
    margin-top: 35px;
}

/* HEADINGS */

.section-heading {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 30px;
}

.section-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    border-radius: 12px;
    font-size: 22px;
}

.section-heading h2 {
    font-size: 23px;
    margin-bottom: 4px;
}

.section-heading p {
    color: var(--text-light);
    font-size: 15px;
}

/* INPUTS */

.date-inputs,
.single-input {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.input-group {
    margin-bottom: 22px;
}

.input-group label {
    display: block;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

input[type="date"],
input[type="number"] {
    width: 100%;
    padding: 14px 14px 14px 45px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 16px;
    color: var(--text);
    background: white;
    outline: none;
    transition: 0.2s;
}

input[type="date"]:focus,
input[type="number"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* BUTTONS */

button {
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    border-radius: 10px;
    padding: 15px 20px;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

button:hover {
    transform: translateY(-1px);
}

button:active {
    transform: translateY(1px);
}

.primary-button {
    width: 100%;
    background: var(--primary);
    color: white;
    box-shadow: 0 5px 12px rgba(37, 99, 235, 0.2);
}

.primary-button:hover {
    background: var(--primary-dark);
    box-shadow: 0 7px 16px rgba(37, 99, 235, 0.25);
}

.primary-button span {
    margin-left: 8px;
}

.secondary-button {
    width: 100%;
    background: #f1f5f9;
    color: var(--text);
    border: 1px solid var(--border);
}

.secondary-button:hover {
    background: #e2e8f0;
}

/* RESULT */

.result {
    margin-top: 30px;
    border-top: 1px solid var(--border);
    padding-top: 28px;
    animation: appear 0.3s ease;
}

@keyframes appear {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-title {
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    color: var(--text-light);
    margin-bottom: 12px;
}

.main-result {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 25px;
}

.main-result #daysResult {
    font-size: 58px;
    line-height: 1;
    font-weight: 800;
    color: var(--primary);
}

.main-result div {
    display: flex;
    flex-direction: column;
}

.main-result strong {
    font-size: 21px;
}

.main-result small {
    color: var(--text-light);
}

/* RESULT BOXES */

.result-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.result-box {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.result-icon {
    display: block;
    font-size: 21px;
    margin-bottom: 5px;
}

.result-box strong {
    display: block;
    font-size: 24px;
    color: var(--text);
}

.result-box > span:last-child {
    font-size: 13px;
    color: var(--text-light);
}

/* SECOND CALCULATOR */

.buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* DATE RESULT */

.date-result {
    margin-top: 25px;
    background: var(--primary-light);
    border: 1px solid #dbeafe;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    animation: appear 0.3s ease;
}

.date-result-label {
    display: block;
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 5px;
}

.date-result strong {
    display: block;
    color: var(--primary);
    font-size: 27px;
    text-transform: capitalize;
}

/* ERROR */

.error {
    margin-top: 20px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    border-radius: 10px;
    padding: 13px 15px;
    text-align: center;
    font-size: 14px;
}

/* INFORMATION */

.info-card {
    margin-bottom: 35px;
}

.info-card p {
    color: var(--text-light);
    margin-bottom: 15px;
    font-size: 15px;
}

.info-card p:last-child {
    margin-bottom: 0;
}

/* FOOTER */

footer {
    background: #111827;
    color: white;
    padding: 35px 20px;
    margin-top: 50px;
}

.footer-content {
    max-width: 850px;
    margin: auto;
    text-align: center;
}

.footer-logo {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 7px;
}

.footer-content p {
    color: #94a3b8;
    font-size: 14px;
    margin-bottom: 18px;
}

.footer-content span {
    color: #64748b;
    font-size: 13px;
}

/* HIDDEN */

.hidden {
    display: none;
}

/* MOBILE */

@media (max-width: 650px) {

    .site-header {
        padding: 35px 20px;
    }

    .logo {
        margin-bottom: 25px;
    }

    .header-text h1 {
        font-size: 32px;
    }

    .header-text p {
        font-size: 16px;
    }

    .container {
        width: calc(100% - 24px);
    }

    .calculator-card,
    .info-card {
        padding: 24px 20px;
        border-radius: 14px;
        margin-top: 20px;
    }

    .section-heading h2 {
        font-size: 20px;
    }

    .date-inputs,
    .single-input {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .result-grid {
        grid-template-columns: 1fr;
    }

    .buttons {
        grid-template-columns: 1fr;
    }

    .main-result #daysResult {
        font-size: 48px;
    }
}