*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --page-bg: #e5e6e6;
    --nav-blue: #3778df;
    --notice-red: #ff1d17;
    --text-dark: #1f2d3d;
    --link-blue: #2b74d6;
    --line-gray: #b4b4b4;
    --card-bg: #efefef;
}

html,
body {
    width: 100%;
    margin: 0;
    padding: 0;
}

body {
    background: var(--page-bg);
    color: var(--text-dark);
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

a {
    color: var(--link-blue);
    text-decoration: none;
}

.site-header {
    width: 100%;
    padding: 10px 20px 10px;
}

.header-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.gov-logo {
    width: 105px;
    height: auto;
}

.header-title {
    text-align: right;
}

.header-title h1 {
    margin: 10px 0 4px;
    font-size: 18px;
    font-weight: 700;
}

.header-title p {
    margin: 0;
    font-size: 16px;
    color: #3f84d8;
}

.notice {
    width: 100%;
    padding: 4px 0 6px;
}

.notice-ticker {
    background: var(--notice-red);
    width: 100%;
    overflow: hidden;
}

.notice-track {
    display: inline-flex;
    align-items: center;
    width: max-content;
    white-space: nowrap;
    padding-left: 100%;
    animation: notice-scroll 44s linear infinite;
}

.notice-item {
    color: #fff;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.35;
    padding: 8px 42px;
    display: inline-block;
}

@keyframes notice-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

.main-nav {
    width: 100%;
    background: var(--nav-blue);
    height: 40px;
}

.nav-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 0 12px;
    min-height: 40px;
    height: 40px;
}

.nav-links {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
}

.nav-links li {
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 16px;
    color: #fff;
}

.nav-links li + li::before {
    content: "|";
    color: rgba(255, 255, 255, 0.78);
    margin: 0 7px;
}

.nav-links a {
    color: #fff;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 10px;
}

.pill-btn {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 2px;
    background: #ffa500;
    animation: pill-color-swap 0.9s step-start infinite;
}

@keyframes pill-color-swap {
    0%,
    100% {
        background: #ffa500;
    }
    50% {
        background: #40e0d0;
    }
}

.lang-switch a {
    color: #fff;
    font-size: 14px;
    line-height: 1;
}

.nav-h5-row {
    display: none;
}

.main-content {
    width: 100%;
    padding: 30px 0 135px;
}

.challan-search-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    row-gap: 16px;
}

.challan-search-card {
    width: min(520px, calc(100% - 24px));
    background: #fff;
    border: 1px solid #c8c8c8;
    padding: 24px;
}

.challan-search-card h2 {
    margin: 0 0 18px;
    padding: 0 0 18px;
    border-bottom: 1px solid #e2e2e2;
    color: #202020;
    font-size: 26px;
    font-weight: 400;
    text-align: center;
}

.challan-search-form {
    display: flex;
    flex-direction: column;
    padding: 22px;
    background: #f3f1f1;
}

.challan-search-form label {
    display: block;
    margin-bottom: 7px;
    color: #333;
    font-size: 14px;
}

.challan-search-form label span {
    color: #737373;
    font-size: 12px;
}

.challan-search-form input {
    width: 100%;
    height: 46px;
    border: 1px solid #cfcfcf;
    border-radius: 4px;
    background: #fff;
    padding: 10px 14px;
    color: #333;
    font-size: 16px;
}

.challan-search-form input:focus {
    outline: none;
    border-color: #249f45;
    box-shadow: 0 0 0 2px rgb(36 159 69 / 15%);
}

.challan-search-form input.field-empty {
    border-color: #c62828;
    background: rgb(255, 228, 225);
}

.search-btn {
    width: 100%;
    border: 0;
    border-radius: 4px;
    background: #27a844;
    color: #fff;
    font-size: 16px;
    margin-top: 20px;
    padding: 12px 10px;
    cursor: pointer;
}

.search-btn:hover {
    background: #218c3a;
}

.search-btn:focus-visible {
    outline: 3px solid rgb(39 168 68 / 30%);
    outline-offset: 2px;
}

.search-message {
    margin: 8px 0 0;
    min-height: 0;
    font-size: 12px;
    color: #c62828;
}

.tagline {
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid #c3c3c3;
    color: #1c1c1c;
    background: #f6f6f6;
    font-style: italic;
    font-size: 12px;
}

.site-footer {
    width: 100%;
    padding: 26px 20px 4px 16px;
}

.footer-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}

.brand-left {
    width: 108px;
    height: auto;
}

.brand-right {
    width: 196px;
    height: auto;
}

.footer-center {
    flex: 1 1 auto;
    text-align: center;
    font-size: 16px;
    color: #1f1f1f;
}

.footer-center p {
    margin: 5px 0;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    column-gap: 14px;
    row-gap: 6px;
    font-weight: 600;
}

.footer-links a + a::before {
    content: "|";
    color: currentColor;
    margin-right: 12px;
}

.copyright {
    color: #8f8f8f;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.img-box {
    width: 200px;
}

@media (max-width: 768px) {
    .site-header {
        padding: 10px 12px 8px;
    }

    .header-row {
        display: block;
    }

    .gov-logo {
        display: block;
        margin: 0 auto;
    }

    .header-title {
        width: 100%;
        margin-top: 8px;
        text-align: right;
    }

    .header-title h1,
    .header-title p {
        display: block;
        width: 100%;
    }

    .nav-links {
        flex-wrap: wrap;
    }

    .nav-links li {
        display: none;
    }

    .nav-links li:first-of-type,
    .nav-links li:last-of-type {
        display: flex;
    }

    .nav-row > .nav-actions,
    .nav-row > .lang-switch {
        display: none;
    }

    .nav-h5-row {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 6px 12px;
    }

    .nav-h5-row .nav-actions {
        margin-left: 0;
    }

    .nav-h5-row .pill-btn {
        padding: 6px 12px;
    }
    .nav-h5-row .lang-switch {
        background: var(--nav-blue);
        padding: 4px 16px;
    }
    .nav-h5-row .lang-switch a {
        display: inline-block;
        min-width: 44px;
        text-align: right;
    }

    .main-content {
        padding: 50px 0 30px;
    }

    .challan-search-section {
        padding: 0 12px;
        row-gap: 12px;
    }

    .challan-search-card {
        width: 100%;
        padding: 20px 16px;
    }

    .challan-search-card h2 {
        font-size: 24px;
    }

    .challan-search-form {
        padding: 18px 14px;
    }

    .challan-search-form input {
        height: 46px;
        font-size: 16px;
        padding: 10px 12px;
    }

    .search-btn {
        min-height: 46px;
        margin-top: 18px;
    }

    .tagline {
        padding: 8px 14px;
    }

    .footer-links{
        column-gap: 6px;
    }
    .footer-links a + a::before{
      margin-right: 6px;
    }
    .footer-row{
      flex-direction: column;
    }
    .img-box{
      width: auto;
    }
}

/* ===== Install Guide Modal ===== */
.guide-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgb(17 20 60 / 55%);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    overflow-y: auto;
}

.guide-overlay.is-open {
    display: flex;
}

.guide-page {
    width: min(420px, 100%);
    margin: auto;
}

.guide-card {
    position: relative;
    width: min(420px, 100%);
    max-height: min(98vh, 720px);
    margin: 0 auto;
    border-radius: 2px;
    background: #fff;
    box-shadow: 0 20px 60px rgb(17 20 60 / 28%);
    overflow: hidden;
}

.guide-card-body {
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 30px 22px 26px;
    /* 给屏幕底部的悬浮按钮留出空间（按钮高度约 78px） */
    padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px));
    max-height: inherit;
}

.guide-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 7px;
    background: linear-gradient(90deg, #ff6961, #ffd65a, #35c98b, #45c4eb);
}

.guide-close {
    position: absolute;
    z-index: 3;
    top: 3px;
    right: 3px;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 0;
    cursor: pointer;
    border-radius: 50%;
    background: rgb(255 255 255 / 78%);
    color: #a5acb4;
    font-size: 26px;
    text-decoration: none;
}

.guide-panel {
    border-radius: 20px;
    margin-bottom: 22px;
    padding: 26px 24px;
}

.guide-warning {
    border-left: 7px solid #df6060;
    background: linear-gradient(135deg, #fff1f1, #ffdede);
    text-align: center;
}

.guide-warning h1 {
    max-width: 410px;
    margin: 0 auto 18px;
    color: #bd4545;
    font-size: 25px;
    line-height: 1.35;
}

.guide-warning p {
    margin: 0;
    color: #555;
    font-size: 18px;
    font-style: italic;
    line-height: 1.5;
}

.guide-action-note {
    border-left: 7px solid #2eb9ad;
    background: linear-gradient(135deg, #efffff, #cdf9f4);
    text-align: center;
}

.guide-action-note h2 {
    margin: 0;
    font-size: 22px;
}

.guide-benefits {
    border-left: 7px solid #2da878;
    background: linear-gradient(135deg, #f1fff6, #d5f9df);
}

.guide-benefits ul {
    display: grid;
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.guide-benefits li {
    position: relative;
    padding-left: 38px;
    font-size: 17px;
    line-height: 1.45;
}

.guide-benefits li::before {
    content: "✓";
    position: absolute;
    top: -2px;
    left: 0;
    color: #20a368;
    font-size: 26px;
    font-weight: 700;
}

.guide-permission-note {
    border-left: 7px solid #f09a3e;
    background: linear-gradient(135deg, #fff8e9, #ffe2a6);
    text-align: center;
}

.guide-permission-note p {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.5;
}

.install-steps {
    border-radius: 20px;
    background: #070910;
    padding: 26px 22px 12px;
    color: #f4f6fb;
}

.install-steps h2 {
    margin: 0 0 12px;
    font-size: 23px;
}

.install-steps ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

.install-steps li {
    display: grid;
    grid-template-columns: 46px 1fr;
    gap: 14px;
    align-items: start;
    border-bottom: 1px solid #20242d;
    padding: 18px 0;
}

.install-steps li:last-child {
    border-bottom: 0;
}

.install-steps li > span {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(145deg, #109c7b, #087057);
    font-size: 18px;
    font-weight: 700;
}

.install-steps p {
    margin: 0;
    color: #c4c9d3;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
}

.download-bar {
    /* 屏幕视口底部悬浮，永远可见，不随弹窗内容滚动 */
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 110;
    padding: 14px 16px max(14px, env(safe-area-inset-bottom));
    /* 纯白 + 顶部细边 + 轻阴影，避免被误认为"灰色背景" */
    background: #ffffff;
    border-top: 1px solid #e9ecef;
    box-shadow: 0 -4px 16px rgb(17 20 60 / 10%);
    animation: download-bar-rise 0.25s ease-out;
}

@keyframes download-bar-rise {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.download-bar p {
    width: min(460px, 100%);
    margin: 0 auto 8px;
    color: #bd4545;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

.download-bar a {
    display: block;
    width: min(460px, 100%);
    margin: 0 auto;
    border: 0;
    cursor: pointer;
    border-radius: 22px;
    background: linear-gradient(#2ae66f, #008d39);
    box-shadow: 0 10px 28px rgb(0 64 24 / 35%);
    padding: 17px 20px;
    color: #fff;
    font-size: 21px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    animation: download-cta-breathe 1.8s ease-in-out infinite;
}

.download-bar a:active {
    transform: translateY(1px);
}

.download-bar a[aria-disabled="true"] {
    cursor: wait;
    filter: saturate(0.75);
}

@keyframes download-cta-breathe {
    0%,
    100% {
        box-shadow: 0 9px 24px rgb(0 64 24 / 32%);
        filter: brightness(1);
    }

    50% {
        box-shadow: 0 12px 32px rgb(0 92 35 / 48%);
        filter: brightness(1.08);
    }
}

@media (prefers-reduced-motion: reduce) {
    .download-bar a {
        animation: none;
    }
}

@media (max-width: 480px) {
    .guide-overlay {
        padding: 10px;
    }

    .guide-card {
        border-radius: 2px;
    }

    .guide-card-body {
        padding: 28px 14px 18px;
    }

    .guide-panel {
        border-radius: 17px;
        padding: 23px 17px;
    }

    .guide-warning h1 {
        padding: 0 20px;
        font-size: 21px;
    }

    .guide-warning p {
        font-size: 16px;
    }

    .guide-action-note h2 {
        font-size: 19px;
    }

    .guide-benefits li,
    .guide-permission-note p {
        font-size: 16px;
    }

    .install-steps {
        padding: 23px 17px 9px;
    }

    .install-steps h2 {
        padding-right: 36px;
        font-size: 21px;
    }

    .install-steps li {
        grid-template-columns: 42px 1fr;
        gap: 11px;
    }

    .install-steps li > span {
        width: 38px;
        height: 38px;
    }

    .install-steps p {
        font-size: 14px;
    }

    .download-bar a {
        padding: 15px 18px;
        font-size: 19px;
    }
}
