:root {
    --brand: #0f766e;
    --brand-dark: #115e59;
    --accent: #f97316;
    --ink: #172033;
    --muted: #526173;
    --soft: #f4f8fb;
    --line: #d7e2ea;
    --shadow: 0 12px 28px rgba(23, 32, 51, 0.08);
}

* {
    letter-spacing: 0;
}

body {
    color: var(--ink);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #ffffff;
}

a {
    text-decoration: none;
}

.text-brand {
    color: var(--brand) !important;
}

.bg-soft {
    background: var(--soft);
}

.btn {
    border-radius: 8px;
}

.btn-brand {
    --bs-btn-bg: var(--brand);
    --bs-btn-border-color: var(--brand);
    --bs-btn-hover-bg: var(--brand-dark);
    --bs-btn-hover-border-color: var(--brand-dark);
    --bs-btn-color: #ffffff;
    --bs-btn-hover-color: #ffffff;
}

.btn-outline-brand {
    --bs-btn-color: var(--brand);
    --bs-btn-border-color: var(--brand);
    --bs-btn-hover-bg: var(--brand);
    --bs-btn-hover-border-color: var(--brand);
    --bs-btn-hover-color: #ffffff;
}

.form-control,
.form-select {
    border-color: #cfdbe5;
    border-radius: 8px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 0.2rem rgba(15, 118, 110, 0.14);
}

.navbar {
    backdrop-filter: blur(12px);
}

.navbar-brand i {
    font-size: 1.5rem;
}

.tool-band {
    background: var(--soft);
}

.intro-panel,
.tool-card,
.info-card,
.redirect-card,
.auth-card,
.admin-card,
.stat-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.intro-panel {
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tool-card {
    padding: 28px;
}

.display-title {
    font-size: clamp(2rem, 5vw, 3.3rem);
    line-height: 1.08;
    font-weight: 800;
}

.eyebrow {
    color: var(--accent);
    display: inline-flex;
    font-size: 0.84rem;
    font-weight: 700;
    text-transform: uppercase;
}

.feature-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-grid div {
    align-items: center;
    background: #f9fbfd;
    border: 1px solid #e3ebf1;
    border-radius: 8px;
    display: flex;
    gap: 10px;
    padding: 12px;
}

.feature-grid i,
.info-card i {
    color: var(--brand);
    font-size: 1.35rem;
}

.section-heading {
    margin-bottom: 24px;
    max-width: 680px;
}

.section-heading h2 {
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    font-weight: 800;
    margin-top: 6px;
}

.info-card {
    padding: 24px;
}

.info-card h3 {
    font-size: 1.1rem;
    font-weight: 750;
    margin-top: 12px;
}

.info-card p {
    color: var(--muted);
    margin-bottom: 0;
}

.faq-accordion .accordion-item {
    border-color: var(--line);
}

.faq-accordion .accordion-button {
    font-weight: 700;
}

.footer {
    background: #111827;
    color: #e5edf5;
}

.ad-slot {
    background: #ffffff;
    border: 1px dashed #b8c8d6;
    border-radius: 8px;
    overflow: hidden;
    padding: 12px;
    text-align: center;
}

.redirect-body,
.auth-body,
.admin-body {
    background: var(--soft);
}

.redirect-shell,
.auth-shell {
    align-items: center;
    display: flex;
    min-height: 100vh;
    padding: 32px 0;
}

.redirect-card {
    max-width: 760px;
    overflow: hidden;
}

.brand-mini {
    align-items: center;
    color: var(--brand);
    display: flex;
    font-weight: 800;
    gap: 8px;
    padding: 20px 24px 0;
}

.redirect-image {
    aspect-ratio: 1200 / 630;
    background: #f4f8fb;
    display: block;
    object-fit: contain;
    width: 100%;
}

.redirect-content {
    padding: 28px;
}

.redirect-content h1 {
    font-size: clamp(1.7rem, 4vw, 2.8rem);
    font-weight: 800;
    line-height: 1.12;
    margin-top: 8px;
}

.redirect-content p {
    color: var(--muted);
    font-size: 1.06rem;
}

.countdown-box {
    align-items: center;
    background: #f9fbfd;
    border: 1px solid #e3ebf1;
    border-radius: 8px;
    display: flex;
    gap: 16px;
    padding: 16px;
}

.countdown-number {
    align-items: center;
    background: var(--accent);
    border-radius: 50%;
    color: #ffffff;
    display: inline-flex;
    flex: 0 0 56px;
    font-size: 1.6rem;
    font-weight: 800;
    height: 56px;
    justify-content: center;
    width: 56px;
}

.auth-shell {
    justify-content: center;
}

.auth-card {
    max-width: 460px;
    padding: 28px;
    width: min(100% - 24px, 460px);
}

.stat-card {
    min-height: 132px;
    padding: 20px;
    position: relative;
}

.stat-card span {
    color: var(--muted);
    display: block;
    font-weight: 650;
}

.stat-card strong {
    display: block;
    font-size: 2rem;
    line-height: 1.1;
    margin-top: 10px;
}

.stat-card i {
    color: rgba(15, 118, 110, 0.14);
    font-size: 2.4rem;
    position: absolute;
    right: 18px;
    top: 18px;
}

.admin-card {
    padding: 22px;
}

.admin-table td,
.admin-table th {
    vertical-align: middle;
}

.admin-table small {
    display: block;
    max-width: 360px;
}

.search-form {
    min-width: min(100%, 520px);
}

.chart-list {
    display: grid;
    gap: 12px;
}

.chart-row {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: 48px 1fr 44px;
}

.chart-row span,
.chart-row strong {
    font-size: 0.92rem;
}

.chart-track {
    background: #e5edf5;
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
}

.chart-track div {
    background: var(--brand);
    height: 100%;
}

.top-list {
    display: grid;
    gap: 12px;
}

.top-item {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: 32px 1fr auto;
}

.top-item > span {
    align-items: center;
    background: #e8f3f2;
    border-radius: 50%;
    color: var(--brand-dark);
    display: inline-flex;
    font-weight: 800;
    height: 32px;
    justify-content: center;
    width: 32px;
}

.code-area {
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.92rem;
}

.form-page-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.back-link {
    color: var(--brand);
    font-weight: 700;
}

.current-image {
    align-items: center;
    display: flex;
    gap: 16px;
}

.current-image img {
    aspect-ratio: 16 / 9;
    background: #f4f8fb;
    border: 1px solid var(--line);
    border-radius: 8px;
    object-fit: contain;
    width: 180px;
}

.copy-toast {
    background: #111827;
    border-radius: 8px;
    bottom: 24px;
    color: #ffffff;
    left: 50%;
    opacity: 0;
    padding: 12px 16px;
    position: fixed;
    transform: translate(-50%, 12px);
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 1080;
}

.copy-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.confirm-backdrop {
    align-items: center;
    background: rgba(17, 24, 39, 0.48);
    display: none;
    inset: 0;
    justify-content: center;
    padding: 18px;
    position: fixed;
    z-index: 1090;
}

.confirm-backdrop.show {
    display: flex;
}

.confirm-dialog {
    background: #ffffff;
    border-radius: 8px;
    max-width: 420px;
    padding: 22px;
    width: 100%;
}

@media (max-width: 767.98px) {
    .intro-panel,
    .tool-card,
    .admin-card {
        padding: 18px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .form-page-header,
    .current-image {
        align-items: stretch;
        flex-direction: column;
    }

    .current-image img {
        width: 100%;
    }

    .btn-group {
        flex-wrap: wrap;
    }
}
