/* =========================================================
   MiniTaskHub USD ⇄ NGN Converter
   Fintech UI — Responsive / Mobile First
   ========================================================= */

:root {
    --green: #16a34a;
    --green-dark: #15803d;
    --green-deep: #166534;
    --green-soft: #ecfdf3;
    --green-border: #bbf7d0;

    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --blue-soft: #eff6ff;

    --ink: #111827;
    --text: #1f2937;
    --muted: #6b7280;
    --muted-light: #9ca3af;

    --white: #ffffff;
    --surface: #f8fafc;
    --surface-2: #f1f5f9;

    --border: #e5e7eb;
    --border-dark: #d1d5db;

    --success: #16a34a;
    --danger: #dc2626;
    --warning: #d97706;

    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 12px 30px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 25px 60px rgba(15, 23, 42, 0.10);

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
}


/* =========================================================
   RESET
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;

    background:
        radial-gradient(
            circle at 10% 0%,
            rgba(22, 163, 74, 0.09),
            transparent 28%
        ),
        radial-gradient(
            circle at 90% 10%,
            rgba(37, 99, 235, 0.07),
            transparent 25%
        ),
        #f7f9fb;

    color: var(--text);

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    line-height: 1.5;

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
input {
    font-family: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
    text-decoration: none;
}


/* =========================================================
   PAGE
   ========================================================= */

.page-container {
    width: 100%;
    max-width: 960px;

    margin: 0 auto;

    padding:
        0
        20px
        45px;
}


/* =========================================================
   HEADER
   ========================================================= */

.site-header {
    width: 100%;
    min-height: 86px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 45px;
    height: 45px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 13px;

    background:
        linear-gradient(
            145deg,
            var(--green),
            var(--green-dark)
        );

    color: #ffffff;

    font-size: 14px;
    font-weight: 900;
    letter-spacing: -0.3px;

    box-shadow:
        0 8px 20px rgba(22, 163, 74, 0.20);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-text strong {
    color: var(--ink);

    font-size: 17px;
    font-weight: 800;
    line-height: 1.15;

    letter-spacing: -0.3px;
}

.brand-text span {
    margin-top: 4px;

    color: var(--muted);

    font-size: 10px;
    font-weight: 600;

    letter-spacing: 0.25px;
}


/* =========================================================
   MAIN CARD
   ========================================================= */

.converter-card {
    position: relative;

    width: 100%;

    overflow: hidden;

    padding: 42px;

    background: var(--white);

    border:
        1px solid
        rgba(226, 232, 240, 0.9);

    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-lg);
}

/* Decorative top line */

.converter-card::before {
    content: "";

    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 4px;

    background:
        linear-gradient(
            90deg,
            var(--green),
            #22c55e,
            var(--blue)
        );
}


/* =========================================================
   HEADING
   ========================================================= */

.converter-heading {
    max-width: 700px;

    margin:
        0
        auto
        32px;

    text-align: center;
}

.heading-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding:
        6px
        12px;

    margin-bottom: 13px;

    background: var(--green-soft);

    border:
        1px solid
        var(--green-border);

    border-radius: 999px;

    color: var(--green-deep);

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 0.5px;
}

.converter-heading h1 {
    margin: 0;

    color: var(--ink);

    font-size: 34px;
    font-weight: 850;

    line-height: 1.15;

    letter-spacing: -1.2px;
}

.converter-heading p {
    max-width: 620px;

    margin:
        13px
        auto
        0;

    color: var(--muted);

    font-size: 14px;

    line-height: 1.7;
}


/* =========================================================
   RATE PANEL
   ========================================================= */

.rate-panel {
    position: relative;

    overflow: hidden;

    padding: 22px;

    margin-bottom: 28px;

    background:
        linear-gradient(
            135deg,
            #f0fdf4 0%,
            #f7fff9 55%,
            #eff6ff 100%
        );

    border:
        1px solid
        rgba(187, 247, 208, 0.9);

    border-radius: var(--radius-md);

    box-shadow: var(--shadow-sm);
}

.rate-panel::after {
    content: "";

    position: absolute;

    width: 130px;
    height: 130px;

    right: -60px;
    top: -65px;

    border-radius: 50%;

    background:
        rgba(37, 99, 235, 0.05);
}

.rate-panel-top {
    position: relative;
    z-index: 1;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 18px;
}

.rate-label {
    display: block;

    margin-bottom: 5px;

    color: var(--muted);

    font-size: 10px;
    font-weight: 800;

    text-transform: uppercase;

    letter-spacing: 0.8px;
}

.rate-value {
    color: var(--green-dark);

    font-size: 29px;
    font-weight: 850;

    line-height: 1.15;

    letter-spacing: -0.8px;
}

.rate-status-row {
    position: relative;
    z-index: 1;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-top: 12px;

    font-size: 11px;
}

.status-success,
.status-error,
.status-loading {
    display: inline-flex;
    align-items: center;

    gap: 6px;

    font-weight: 700;
}

.status-success::before,
.status-error::before,
.status-loading::before {
    content: "";

    width: 7px;
    height: 7px;

    flex: 0 0 7px;

    border-radius: 50%;
}

.status-success {
    color: var(--success);
}

.status-success::before {
    background: var(--success);

    box-shadow:
        0 0 0 3px
        rgba(22, 163, 74, 0.10);
}

.status-error {
    color: var(--danger);
}

.status-error::before {
    background: var(--danger);
}

.status-loading {
    color: var(--warning);
}

.status-loading::before {
    background: var(--warning);

    animation:
        statusPulse
        1.2s
        ease-in-out
        infinite;
}

@keyframes statusPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.35;
    }
}

.updated-time {
    position: relative;
    z-index: 1;

    margin-top: 6px;

    color: var(--muted-light);

    font-size: 10px;
}


/* =========================================================
   REFRESH BUTTON
   ========================================================= */

.refresh-button {
    position: relative;
    z-index: 2;

    width: 44px;
    height: 44px;

    flex: 0 0 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border:
        1px solid
        rgba(22, 163, 74, 0.20);

    border-radius: 50%;

    background: var(--white);

    color: var(--green-dark);

    font-size: 23px;
    font-weight: 700;

    line-height: 1;

    cursor: pointer;

    box-shadow:
        0 5px 14px
        rgba(15, 23, 42, 0.06);

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.refresh-button:hover {
    background: var(--green-soft);

    border-color:
        rgba(22, 163, 74, 0.40);

    box-shadow:
        0 8px 18px
        rgba(22, 163, 74, 0.12);

    transform: translateY(-2px);
}

.refresh-button:active {
    transform: scale(0.94);
}

.refresh-button:disabled {
    opacity: 0.55;

    cursor: not-allowed;
}

.refresh-button.refreshing {
    animation:
        refreshSpin
        0.8s
        linear
        infinite;
}

@keyframes refreshSpin {

    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}


/* =========================================================
   CONVERTER AREA
   ========================================================= */

.converter-fields {
    display: flex;
    align-items: flex-end;

    gap: 14px;

    margin-top: 4px;
}

.field-group {
    flex: 1;

    min-width: 0;
}

.field-group label {
    display: block;

    margin-bottom: 8px;

    color: var(--text);

    font-size: 12px;
    font-weight: 800;
}


/* =========================================================
   CURRENCY INPUT
   ========================================================= */

.input-wrapper {
    position: relative;

    display: flex;
    align-items: center;

    width: 100%;
}

.input-wrapper input {
    width: 100%;
    min-width: 0;

    height: 64px;

    padding:
        0
        74px
        0
        48px;

    border:
        1px solid
        var(--border-dark);

    border-radius: 15px;

    outline: none;

    background:
        linear-gradient(
            180deg,
            #ffffff,
            #fbfcfd
        );

    color: var(--ink);

    font-family: inherit;

    font-size: 20px;
    font-weight: 800;

    letter-spacing: -0.2px;

    box-shadow:
        inset 0 1px 2px
        rgba(15, 23, 42, 0.02);

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.input-wrapper input::placeholder {
    color: #b7c0ca;

    font-weight: 500;
}

.input-wrapper input:hover {
    border-color: #b8c2cd;
}

.input-wrapper input:focus {
    border-color: var(--green);

    background: var(--white);

    box-shadow:
        0 0 0 4px
        rgba(22, 163, 74, 0.09),
        0 8px 20px
        rgba(15, 23, 42, 0.05);
}

.currency-symbol {
    position: absolute;

    left: 17px;

    z-index: 2;

    color: var(--green-dark);

    font-size: 19px;
    font-weight: 850;

    pointer-events: none;
}

.currency-code {
    position: absolute;

    right: 15px;

    z-index: 2;

    padding:
        4px
        7px;

    border-radius: 6px;

    background: var(--surface-2);

    color: var(--muted);

    font-size: 9px;
    font-weight: 850;

    letter-spacing: 0.5px;

    pointer-events: none;
}


/* =========================================================
   CONVERSION ARROW
   ========================================================= */

.conversion-arrow {
    width: 44px;
    height: 44px;

    flex: 0 0 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 10px;

    border:
        1px solid
        var(--green-border);

    border-radius: 50%;

    background:
        linear-gradient(
            145deg,
            var(--green-soft),
            #f0fdf4
        );

    color: var(--green-dark);

    font-size: 21px;
    font-weight: 900;

    box-shadow:
        0 5px 14px
        rgba(22, 163, 74, 0.08);
}


/* =========================================================
   QUICK AMOUNTS
   ========================================================= */

.quick-section {
    margin-top: 27px;
}

.quick-title {
    display: flex;
    align-items: center;

    margin-bottom: 10px;

    color: var(--muted);

    font-size: 11px;
    font-weight: 800;

    text-transform: uppercase;

    letter-spacing: 0.5px;
}

.quick-buttons {
    display: flex;
    flex-wrap: wrap;

    gap: 8px;
}

.quick-buttons button {
    min-width: 60px;

    padding:
        9px
        14px;

    border:
        1px solid
        var(--border);

    border-radius: 9px;

    background: var(--white);

    color: var(--text);

    font-family: inherit;

    font-size: 12px;
    font-weight: 750;

    cursor: pointer;

    box-shadow:
        0 2px 5px
        rgba(15, 23, 42, 0.025);

    transition:
        transform 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease;
}

.quick-buttons button:hover {
    background: var(--green-soft);

    border-color:
        var(--green-border);

    color: var(--green-dark);

    box-shadow:
        0 5px 12px
        rgba(22, 163, 74, 0.08);

    transform: translateY(-1px);
}

.quick-buttons button:active {
    transform: translateY(0);
}


/* =========================================================
   INFORMATION BOX
   ========================================================= */

.info-box {
    display: flex;
    align-items: flex-start;

    gap: 12px;

    margin-top: 28px;

    padding: 17px;

    background:
        linear-gradient(
            135deg,
            #eff6ff,
            #f8fbff
        );

    border:
        1px solid
        rgba(147, 197, 253, 0.35);

    border-radius: 14px;
}

.info-icon {
    width: 27px;
    height: 27px;

    flex: 0 0 27px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background:
        linear-gradient(
            145deg,
            var(--blue),
            var(--blue-dark)
        );

    color: #ffffff;

    font-size: 12px;
    font-weight: 900;

    box-shadow:
        0 5px 12px
        rgba(37, 99, 235, 0.18);
}

.info-content {
    min-width: 0;
}

.info-content strong {
    display: block;

    margin-bottom: 5px;

    color: #1e40af;

    font-size: 12px;
    font-weight: 800;
}

.info-content p {
    margin: 0;

    color: #52637a;

    font-size: 11px;

    line-height: 1.65;
}

.info-content p + p {
    margin-top: 7px;
}


/* =========================================================
   NOTE / DISCLAIMER
   ========================================================= */

.converter-note {
    display: flex;
    align-items: flex-start;

    gap: 8px;

    margin-top: 20px;

    padding:
        0
        3px;
}

.converter-note > span {
    flex: 0 0 auto;

    font-size: 12px;
}

.converter-note p {
    margin: 0;

    color: var(--muted-light);

    font-size: 10px;

    line-height: 1.65;
}


/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
    padding:
        28px
        0
        5px;

    text-align: center;

    color: var(--muted-light);

    font-size: 10px;
}

.site-footer p {
    margin: 0;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    margin-top: 7px;
}

.footer-links a {
    color: var(--green-dark);

    font-weight: 700;

    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--green);
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 760px) {

    .converter-card {
        padding: 34px 28px;
    }

    .converter-heading h1 {
        font-size: 30px;
    }

    .rate-value {
        font-size: 27px;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 650px) {

    .page-container {
        padding:
            0
            12px
            30px;
    }

    .site-header {
        min-height: 70px;
    }

    .brand-logo {
        width: 41px;
        height: 41px;

        border-radius: 12px;

        font-size: 13px;
    }

    .brand-text strong {
        font-size: 15px;
    }

    .brand-text span {
        font-size: 9px;
    }

    .converter-card {
        padding:
            29px
            17px
            22px;

        border-radius: 18px;

        box-shadow:
            0 18px 45px
            rgba(15, 23, 42, 0.09);
    }

    .converter-heading {
        margin-bottom: 25px;
    }

    .heading-badge {
        padding:
            6px
            10px;

        margin-bottom: 11px;

        font-size: 10px;
    }

    .converter-heading h1 {
        font-size: 25px;

        letter-spacing: -0.7px;
    }

    .converter-heading p {
        margin-top: 11px;

        font-size: 12px;

        line-height: 1.65;
    }

    .rate-panel {
        padding: 17px;

        margin-bottom: 23px;

        border-radius: 14px;
    }

    .rate-value {
        font-size: 23px;

        letter-spacing: -0.5px;
    }

    .rate-label {
        font-size: 9px;
    }

    .rate-status-row {
        align-items: flex-start;

        flex-direction: column;

        gap: 5px;
    }

    .converter-fields {
        flex-direction: column;

        align-items: stretch;

        gap: 11px;
    }

    .field-group {
        width: 100%;
    }

    .field-group label {
        font-size: 11px;
    }

    .input-wrapper input {
        height: 59px;

        padding-left: 45px;
        padding-right: 70px;

        font-size: 18px;

        border-radius: 13px;
    }

    .currency-symbol {
        left: 15px;

        font-size: 18px;
    }

    .currency-code {
        right: 12px;
    }

    .conversion-arrow {
        align-self: center;

        width: 38px;
        height: 38px;

        flex-basis: 38px;

        margin:
            -1px
            0;

        font-size: 18px;
    }

    .quick-section {
        margin-top: 23px;
    }

    .quick-buttons {
        display: grid;

        grid-template-columns:
            repeat(3, minmax(0, 1fr));

        gap: 7px;
    }

    .quick-buttons button {
        width: 100%;
        min-width: 0;

        padding:
            9px
            5px;

        font-size: 11px;
    }

    .info-box {
        margin-top: 23px;

        padding: 14px;

        gap: 10px;

        border-radius: 12px;
    }

    .info-icon {
        width: 25px;
        height: 25px;

        flex-basis: 25px;
    }

    .info-content p {
        font-size: 10px;
    }

    .converter-note {
        margin-top: 17px;
    }

    .converter-note p {
        font-size: 9px;
    }

    .site-footer {
        padding-top: 23px;
    }
}


/* =========================================================
   SMALL PHONES
   ========================================================= */

@media (max-width: 380px) {

    .page-container {
        padding-left: 9px;
        padding-right: 9px;
    }

    .converter-card {
        padding:
            26px
            13px
            19px;

        border-radius: 16px;
    }

    .converter-heading h1 {
        font-size: 23px;
    }

    .converter-heading p {
        font-size: 11px;
    }

    .rate-value {
        font-size: 21px;
    }

    .refresh-button {
        width: 39px;
        height: 39px;

        flex-basis: 39px;

        font-size: 20px;
    }

    .quick-buttons {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .quick-buttons button {
        padding: 9px 5px;
    }
}


/* =========================================================
   VERY SMALL PHONES
   ========================================================= */

@media (max-width: 330px) {

    .brand-text span {
        display: none;
    }

    .converter-heading h1 {
        font-size: 21px;
    }

    .rate-value {
        font-size: 19px;
    }

    .input-wrapper input {
        font-size: 17px;
    }
}


/* =========================================================
   ACCESSIBILITY
   ========================================================= */

button:focus-visible,
input:focus-visible,
a:focus-visible {
    outline:
        3px solid
        rgba(37, 99, 235, 0.25);

    outline-offset: 2px;
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;

        animation-iteration-count: 1 !important;

        transition-duration: 0.01ms !important;
    }
}