:root {
    --bg: #f3f7fb;
    --surface: #ffffff;
    --surface-soft: #eef6f7;
    --ink: #10202b;
    --muted: #637383;
    --line: #d8e4ec;
    --primary: #0a8f85;
    --primary-dark: #066962;
    --purple: #4d2f91;
    --accent: #f4b340;
    --dark: #071820;
    --radius: 8px;
    --shadow: 0 18px 45px rgba(16, 32, 43, .12);
}

[data-theme="dark"] {
    --bg: #071018;
    --surface: #101b25;
    --surface-soft: #162832;
    --ink: #eef7ff;
    --muted: #a8b8c8;
    --line: #253846;
    --primary: #22b8ad;
    --primary-dark: #74e8df;
}

* { box-sizing: border-box; }

html, body {
    min-height: 100%;
    margin: 0;
}

body {
    background: var(--bg);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
}

a { text-decoration: none; }

.container { max-width: 1160px; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(216, 228, 236, .78);
    background: #4d2f91;
    backdrop-filter: blur(16px);
}

[data-theme="dark"] .site-header {
    background: #291a50;
}

.navbar {
    min-height: 78px;
}

.navbar-brand {
    display: inline-flex;
    align-items: center;
    padding: 0;
}

.brand-logo {
    width: 176px;
    height: 45px;
    object-fit: contain;
}

.nav-link {
    color: rgba(255,255,255,.86);
    font-size: 14px;
    font-weight: 800;
    border-radius: var(--radius);
    padding: 9px 11px !important;
}

.nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,.12);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-actions .form-control { width: 170px; }

.form-control,
.form-select,
textarea {
    border: 1px solid var(--line) !important;
    border-radius: var(--radius) !important;
    background: var(--surface) !important;
    color: var(--ink) !important;
}

.form-control:focus,
.form-select:focus,
textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 .2rem rgba(10, 143, 133, .14) !important;
}

.btn {
    border-radius: var(--radius);
    font-weight: 900;
}

.btn-primary {
    border-color: var(--primary);
    background: var(--primary);
}

.btn-primary:hover {
    border-color: var(--primary-dark);
    background: var(--primary-dark);
}

.btn-soft {
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
}

.site-header .btn-soft {
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.25);
    color: #fff;
}

.btn-soft:hover {
    border-color: var(--primary);
    color: var(--primary-dark);
}

.top-ad-wrap .ad-slot {
    margin-top: 16px;
}

.hero {
    padding: 58px 0 46px;
    background:
        linear-gradient(135deg, rgba(10, 143, 133, .12), rgba(244, 179, 64, .13)),
        var(--bg);
}

.hero .row {
    min-height: 510px;
}

.hero h1 {
    max-width: 780px;
    margin: 12px 0 18px;
    font-size: clamp(40px, 5.2vw, 68px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0;
}

.hero p {
    max-width: 680px;
    color: var(--muted);
    font-size: 18px;
}

.hero-small .row { min-height: 410px; }
.hero-small h1 { font-size: clamp(34px, 5vw, 58px); }

.eyebrow {
    display: inline-flex;
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero-actions,
.trust-row,
.download-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-actions { margin-top: 26px; }
.trust-row { margin-top: 20px; }

.trust-row span {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .7);
    color: var(--muted);
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 800;
}

[data-theme="dark"] .trust-row span {
    background: rgba(16, 27, 37, .7);
}

.tool-panel,
.mail-card,
.feature-card,
.result-card,
.content-card,
.info-tile,
.admin-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.tool-panel {
    overflow: hidden;
    padding: 26px;
}

.tempmail-hero {
    background:
        linear-gradient(135deg, rgba(10, 143, 133, .14), rgba(244, 179, 64, .14)),
        radial-gradient(circle at 82% 18%, rgba(10, 143, 133, .16), transparent 24rem),
        var(--bg);
}

.top-ad-wrap {
    background: var(--bg);
}

.tempmail-stage {
    padding: 70px 0 34px;
    background: var(--bg);
}

.mail-hero-card {
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}

.mail-hero-card h1 {
    margin: 10px 0 12px;
    color: #10091f;
    font-size: clamp(42px, 5.8vw, 64px);
    line-height: 1;
    font-weight: 900;
}

[data-theme="dark"] .mail-hero-card h1 {
    color: var(--ink);
}

.mail-hero-card p {
    max-width: 720px;
    margin: 0 auto 30px;
    color: #4b4865;
    font-size: 18px;
}

[data-theme="dark"] .mail-hero-card p {
    color: var(--muted);
}

.email-display {
    width: min(100%, 540px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 92px;
    border: 1px solid #d8d5e4;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(32, 20, 62, .09);
    overflow: hidden;
}

.email-display .form-control {
    min-height: 70px;
    border: 0 !important;
    border-radius: 0 !important;
    font-size: clamp(18px, 3vw, 24px);
    font-weight: 700;
    text-align: center;
}

.email-display__copy {
    border: 0;
    border-left: 1px solid #e4e0ee;
    background: #fff;
    color: var(--purple);
    font-weight: 900;
}

.email-display__copy:hover {
    background: #f6f3ff;
}

.mail-action-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px;
    margin: 26px 0 16px;
}

.mail-action-row button {
    border: 0;
    background: transparent;
    color: #120b24;
    font-size: 18px;
    font-weight: 900;
}

[data-theme="dark"] .mail-action-row button {
    color: var(--ink);
}

.mail-action-row button:hover {
    color: var(--primary-dark);
}

.mail-card {
    overflow: hidden;
    padding: 26px;
}

.mail-card::before {
    content: "";
    display: block;
    height: 5px;
    margin: -26px -26px 22px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.mail-card__head {
    margin-bottom: 18px;
}

.mail-card__head h2 {
    margin: 4px 0 0;
    font-size: 28px;
    font-weight: 900;
}

.mail-address-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.mail-address-box .form-control,
.mail-address-box .btn {
    min-height: 56px;
}

.mail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.mail-status {
    width: min(100%, 620px);
    margin: 14px auto 0;
    border-radius: var(--radius);
    background: var(--surface-soft);
    color: var(--primary-dark);
    padding: 12px 14px;
    font-weight: 900;
}

.mail-workspace,
.mail-shell {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr) 200px;
    gap: 20px;
    align-items: stretch;
    padding-bottom: 0;
}

.mail-shell {
    display: block;
}

.ad-container {
    padding-top: 4px;
    padding-bottom: 10px;
}

.side-ad .ad-slot {
    width: 100%;
    min-height: 260px;
    margin: 0;
}

.inbox-table-card,
.message-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.inbox-table-card {
    overflow: hidden;
}

.inbox-toolbar {
    min-height: 78px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
}

.inbox-toolbar strong,
.inbox-toolbar span {
    display: block;
}

.inbox-toolbar strong {
    font-size: 20px;
    font-weight: 900;
}

.inbox-toolbar span {
    color: var(--muted);
    font-size: 13px;
}

.inbox-table {
    border-top: 1px solid var(--line);
}

.inbox-row {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.25fr) minmax(132px, .55fr);
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 56px;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    padding: 14px 22px;
    text-align: left;
}

.inbox-row > * {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inbox-row--head {
    min-height: 50px;
    background: #09aeba;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.message-item:hover {
    background: var(--surface-soft);
}

.message-item strong {
    font-size: 16px;
}

.message-item span,
.message-item time,
.empty-mail span {
    color: var(--muted);
}

.empty-mail {
    display: grid;
    gap: 4px;
    min-height: 140px;
    place-items: center;
    align-content: center;
    padding: 24px;
    color: var(--ink);
    text-align: center;
}

.empty-mail strong {
    color: #6a6578;
    font-size: 22px;
    font-weight: 500;
}

.empty-mail__box {
    width: 150px;
    height: 112px;
    margin-top: 16px;
    border: 4px solid #77b8eb;
    border-top: 0;
    transform: perspective(140px) rotateX(10deg);
    position: relative;
    opacity: .7;
}

.empty-mail__box::before,
.empty-mail__box::after {
    content: "";
    position: absolute;
    top: -35px;
    width: 85px;
    height: 58px;
    border: 4px solid #77b8eb;
    background: #f8fbff;
}

.empty-mail__box::before {
    left: -7px;
    transform: skewY(-22deg);
}

.empty-mail__box::after {
    right: -7px;
    transform: skewY(22deg);
}

.message-panel {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px;
}

.message-preview-section {
    margin-top: 0;
}

.message-preview h3 {
    margin: 10px 0;
    font-weight: 900;
}

.message-body {
    max-height: 430px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-soft);
    padding: 14px;
}

.message-body-frame {
    display: block;
    width: 100%;
    height: min(520px, 70vh);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.message-body pre {
    margin: 0;
    white-space: pre-wrap;
}

.tool-panel::before {
    content: "";
    display: block;
    height: 5px;
    margin: -26px -26px 22px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.tool-panel__head { margin-bottom: 18px; }

.tool-panel__head h2 {
    margin: 4px 0 0;
    font-size: 28px;
    font-weight: 900;
}

.download-input {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.download-input .form-control,
.download-input .btn {
    min-height: 56px;
}

.safe-note {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.section-title {
    max-width: 700px;
    margin-bottom: 24px;
}

.section-title h2 {
    margin: 4px 0 0;
    font-size: clamp(30px, 4vw, 44px);
    font-weight: 900;
}

.feature-card {
    height: 100%;
    display: grid;
    gap: 10px;
    padding: 24px;
    color: var(--ink);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.feature-card:hover {
    border-color: rgba(10, 143, 133, .4);
    color: var(--ink);
    transform: translateY(-4px);
    box-shadow: 0 24px 55px rgba(16, 32, 43, .16);
}

.feature-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: var(--radius);
    background: var(--surface-soft);
    color: var(--primary-dark);
    font-weight: 900;
}

.feature-card strong {
    color: var(--ink);
    font-size: 22px;
    line-height: 1.15;
}

.feature-card small {
    color: var(--muted);
    font-weight: 800;
}

.section-band {
    padding: 58px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.info-tile {
    height: 100%;
    padding: 24px;
    box-shadow: none;
}

.info-tile h2 {
    font-size: 22px;
    font-weight: 900;
}

.info-tile p,
.content-card p,
.result-card p {
    color: var(--muted);
}

.ad-slot {
    width: min(100% - 32px, 1060px);
    min-height: 74px;
    margin: 18px auto;
    display: grid;
    place-items: center;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    background: rgba(255,255,255,.72);
    color: var(--muted);
    overflow: hidden;
}

[data-theme="dark"] .ad-slot {
    background: rgba(16, 27, 37, .72);
}

.ad-slot-filled {
    display: block;
    min-height: 0;
    margin-top: 0;
    margin-bottom: 0;
    border: 0;
    background: transparent;
    padding: 10px;
    text-align: center;
}

[data-theme="dark"] .ad-slot-filled {
    background: transparent;
}

.sticky-ad {
    position: fixed;
    left: 50%;
    bottom: 12px;
    z-index: 90;
    width: min(728px, calc(100% - 28px));
    transform: translateX(-50%);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    padding: 8px;
}

.sticky-ad .ad-slot {
    width: 100%;
    min-height: 60px;
    margin: 0;
    border: 0;
    background: transparent;
}

.sticky-ad__close {
    position: absolute;
    top: -12px;
    right: -10px;
    width: 28px;
    height: 28px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    color: var(--ink);
    font-size: 18px;
    line-height: 1;
    font-weight: 900;
}

.result-card {
    padding: 20px;
    box-shadow: none;
}

.result-card h3 {
    font-weight: 900;
}

.status-box {
    padding: 16px;
    border-radius: var(--radius);
    background: #e7f8f5;
    color: #075b57;
    font-weight: 900;
}

.breadcrumb-lite {
    color: var(--muted);
    margin-bottom: 14px;
    font-weight: 800;
}

.breadcrumb-lite a { color: var(--primary-dark); }
.steps { margin-bottom: 0; }
.steps li { margin-bottom: 10px; color: var(--muted); }

.site-footer {
    background: var(--dark);
    color: #cbd5e1;
}

.footer-logo {
    width: 180px;
    height: auto;
}

.site-footer p { color: #aebdca; }
.site-footer h3 { color: #fff; font-weight: 900; }

.site-footer a {
    display: block;
    color: #cbd5e1;
    padding: 4px 0;
    font-weight: 800;
}

.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); }

.admin-body {
    background: #edf3f7;
}

.admin-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
}

.admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    background: linear-gradient(180deg, #071820, #0a282d);
    color: #fff;
    padding: 22px;
}

.admin-brand {
    display: block;
    margin-bottom: 22px;
}

.admin-brand img {
    width: 190px;
    height: auto;
}

.admin-nav {
    display: grid;
    gap: 6px;
}

.admin-nav a {
    display: flex;
    align-items: center;
    min-height: 42px;
    color: #dbe7f5;
    border-radius: var(--radius);
    padding: 10px 12px;
    font-weight: 800;
}

.admin-nav a:hover {
    background: rgba(255,255,255,.1);
    color: #fff;
}

.admin-main {
    padding: 30px;
}

.admin-page-title {
    margin-bottom: 22px;
}

.admin-main > h1,
.admin-card h1 {
    margin-bottom: 18px;
    font-weight: 900;
}

.admin-page-title h1 {
    margin: 4px 0 4px;
    font-size: clamp(32px, 4vw, 46px);
    font-weight: 900;
}

.admin-page-title p {
    margin: 0;
    color: var(--muted);
}

.admin-card {
    padding: 24px;
    margin-bottom: 20px;
}

.stat-card {
    min-height: 132px;
}

.stat-card span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.stat-card strong {
    display: block;
    margin-top: 12px;
    color: var(--primary-dark);
    font-size: 38px;
    line-height: 1;
    font-weight: 900;
}

.admin-card strong.fs-2 {
    color: var(--primary-dark);
}

.admin-login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(10, 143, 133, .16), rgba(244, 179, 64, .16)),
        var(--bg);
}

.admin-login {
    width: min(100%, 440px);
}

.login-card {
    padding: 30px;
}

.login-logo {
    width: 190px;
    height: auto;
    margin-bottom: 22px;
}

.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--ink);
    border-color: var(--line);
}

@media (max-width: 991px) {
    .navbar-nav { padding: 12px 0; }
    .header-actions {
        align-items: stretch;
        flex-direction: column;
        padding-bottom: 12px;
    }
    .header-actions .form-control { width: 100%; }
    .hero .row,
    .hero-small .row { min-height: 0; }
    .mail-workspace,
    .mail-shell {
        grid-template-columns: 1fr;
    }
    .side-ad {
        display: none;
    }
}

@media (max-width: 760px) {
    .brand-logo { width: 150px; }
    .hero { padding: 36px 0; }
    .hero h1 { font-size: 38px; }
    .tool-panel { padding: 22px 18px; }
    .tool-panel::before { margin: -22px -18px 18px; }
    .download-input { grid-template-columns: 1fr; }
    .mail-address-box { grid-template-columns: 1fr; }
    .email-display { grid-template-columns: 1fr; }
    .email-display__copy {
        min-height: 50px;
        border-left: 0;
        border-top: 1px solid #e4e0ee;
    }
    .inbox-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    .inbox-row > * {
        white-space: normal;
    }
    .inbox-row--head {
        display: none;
    }
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar {
        position: static;
        height: auto;
    }
    .admin-main { padding: 18px; }
}
