/* ============================================================
   TempMail-HoaToc — Public UI Stylesheet
   Dark theme inspired by Vercel/Linear with glassmorphism
   ============================================================ */

/* ---- Google Font ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ---- Design Tokens ---- */
:root {
    --radius: 0.5rem;
    --background: #0f0f23;
    --foreground: #f5f5f7;
    --card: #181830;
    --card-foreground: #f5f5f7;
    --muted: #222244;
    --muted-foreground: #8888aa;
    --border: rgba(255,255,255,0.08);
    --border-strong: rgba(255,255,255,0.15);
    --input: #1c1c3a;
    --accent: #d4a053;
    --accent-foreground: #0f0f23;
    --success: #4ade80;
    --warning: #facc15;
    --destructive: #f87171;
    --primary: #f5f5f7;
    --primary-foreground: #0f0f23;
    --secondary: #222244;
    --secondary-foreground: #f5f5f7;
    --gradient-accent: linear-gradient(135deg, #d4a053, #e8c17a);
    --gradient-hero: radial-gradient(ellipse at top, rgba(212,160,83,0.12), transparent 60%);
    --shadow-glow: 0 0 40px rgba(212,160,83,0.2);
    --shadow-card: 0 1px 0 0 rgba(255,255,255,0.05) inset, 0 8px 24px -8px rgba(0,0,0,0.5);
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: ui-monospace, 'SF Mono', Menlo, Monaco, 'Cascadia Mono', monospace;
}

/* ---- Reset ---- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    min-height: 100vh;
}

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

img {
    max-width: 100%;
    display: block;
}

/* ---- Utility ---- */
.font-mono { font-family: var(--font-mono); }
.text-muted { color: var(--muted-foreground); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-destructive { color: var(--destructive); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-center { text-align: center; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uppercase { text-transform: uppercase; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-tight { letter-spacing: -0.025em; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.hidden { display: none !important; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1 1 0%; }
.min-w-0 { min-width: 0; }
.w-full { width: 100%; }
.max-w-sm { max-width: 24rem; }

/* ---- Background Grid Pattern ---- */
.bg-grid {
    background-image:
        linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 32px 32px;
}

/* ---- Container ---- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.container-narrow {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1rem;
}

.container-sm {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ============================================================
   HEADER / NAVIGATION
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    width: 100%;
    border-bottom: 1px solid var(--border);
    background: rgba(15,15,35,0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.site-header .header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0 1rem;
    height: 56px;
}

.site-header .logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    letter-spacing: -0.025em;
    white-space: nowrap;
}

.site-header .logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--foreground);
    color: var(--background);
}

.site-header .logo-icon svg {
    width: 16px;
    height: 16px;
}

.site-header nav {
    display: none;
    align-items: center;
    gap: 1.25rem;
    font-size: 0.875rem;
}

.site-header nav a {
    color: var(--muted-foreground);
    transition: color 0.2s;
}

.site-header nav a:hover,
.site-header nav a.active {
    color: var(--foreground);
}

.site-header .header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .site-header nav { display: flex; }
}

/* ---- Mobile Menu ---- */
.mobile-menu-btn {
    display: flex;
    padding: 0.5rem;
    background: none;
    border: none;
    color: var(--muted-foreground);
    cursor: pointer;
}

@media (min-width: 768px) {
    .mobile-menu-btn { display: none; }
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--background);
    z-index: 35;
    padding: 1rem;
}

.mobile-menu.open {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mobile-menu a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    color: var(--muted-foreground);
    font-size: 0.875rem;
    transition: all 0.15s;
}

.mobile-menu a:hover,
.mobile-menu a.active {
    background: var(--secondary);
    color: var(--foreground);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0 1rem;
    height: 36px;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    text-decoration: none;
    line-height: 1;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.btn-primary {
    background: var(--primary);
    color: var(--primary-foreground);
    border-color: var(--primary);
}
.btn-primary:hover:not(:disabled) {
    opacity: 0.9;
}

.btn-outline {
    background: transparent;
    color: var(--foreground);
    border-color: var(--border-strong);
}
.btn-outline:hover:not(:disabled) {
    background: var(--secondary);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--secondary-foreground);
    border-color: var(--border);
}
.btn-secondary:hover:not(:disabled) {
    background: rgba(34,34,68,0.8);
    border-color: var(--border-strong);
}

.btn-ghost {
    background: transparent;
    color: var(--muted-foreground);
    border-color: transparent;
}
.btn-ghost:hover:not(:disabled) {
    color: var(--foreground);
    background: var(--secondary);
}

.btn-destructive {
    background: var(--destructive);
    color: #fff;
    border-color: var(--destructive);
}
.btn-destructive:hover:not(:disabled) {
    opacity: 0.9;
}

.btn-accent {
    background: var(--accent);
    color: var(--accent-foreground);
    border-color: var(--accent);
}
.btn-accent:hover:not(:disabled) {
    opacity: 0.9;
}

.btn-sm {
    height: 32px;
    padding: 0 0.75rem;
    font-size: 0.8125rem;
}

.btn-sm svg {
    width: 14px;
    height: 14px;
}

.btn-icon {
    width: 28px;
    height: 28px;
    padding: 0;
}

.btn-icon svg {
    width: 14px;
    height: 14px;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.125rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
    border: 1px solid transparent;
    white-space: nowrap;
    line-height: 1.5;
}

.badge-outline {
    background: transparent;
    border-color: var(--border-strong);
    color: var(--foreground);
}

.badge-secondary {
    background: var(--secondary);
    color: var(--secondary-foreground);
}

.badge-success {
    background: rgba(74,222,128,0.12);
    color: var(--success);
    border-color: rgba(74,222,128,0.25);
}

.badge-warning {
    background: rgba(250,204,21,0.12);
    color: var(--warning);
    border-color: rgba(250,204,21,0.25);
}

.badge-destructive {
    background: rgba(248,113,113,0.12);
    color: var(--destructive);
    border-color: rgba(248,113,113,0.25);
}

.badge-accent {
    background: rgba(212,160,83,0.12);
    color: var(--accent);
    border-color: rgba(212,160,83,0.25);
}

/* ============================================================
   FORM INPUTS
   ============================================================ */
.input, input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="url"], select, textarea {
    width: 100%;
    height: 36px;
    padding: 0 0.75rem;
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--foreground);
    background: var(--input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    outline: none;
    transition: all 0.15s;
}

.input:focus, input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, input[type="search"]:focus, input[type="url"]:focus, select:focus, textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(212,160,83,0.15);
}

.input::placeholder, input::placeholder, textarea::placeholder {
    color: var(--muted-foreground);
}

textarea {
    height: auto;
    min-height: 80px;
    padding: 0.5rem 0.75rem;
    resize: vertical;
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238888aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    padding-right: 2rem;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    background: var(--card);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.card-glass {
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    background: rgba(24,24,48,0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.card-glow {
    box-shadow: var(--shadow-glow);
    border-color: rgba(212,160,83,0.3);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.hero .hero-bg {
    position: absolute;
    inset: 0;
}

.hero .hero-bg .grid-overlay {
    position: absolute;
    inset: 0;
    opacity: 0.5;
    mask-image: radial-gradient(ellipse at top, black, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at top, black, transparent 70%);
}

.hero .hero-bg .gradient-overlay {
    position: absolute;
    inset: 0;
    background: var(--gradient-hero);
}

.hero-content {
    position: relative;
    max-width: 960px;
    margin: 0 auto;
    padding: 4rem 1rem 3rem;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.15;
    text-wrap: balance;
}

.hero h1 .gradient-text {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero .hero-desc {
    margin-top: 1.25rem;
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
    color: var(--muted-foreground);
    text-wrap: balance;
}

@media (min-width: 768px) {
    .hero h1 { font-size: 3.75rem; }
    .hero .hero-desc { font-size: 1.125rem; }
}

/* ============================================================
   EMAIL CARD (main generator)
   ============================================================ */
.email-card {
    position: relative;
    max-width: 48rem;
    margin: 0 auto;
    padding: 0 1rem 4rem;
}

.email-card-inner {
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    background: var(--card);
    padding: 1.25rem;
    box-shadow: var(--shadow-card);
}

@media (min-width: 768px) {
    .email-card-inner { padding: 1.5rem; }
}

.email-card .email-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted-foreground);
}

.email-card .email-label svg { width: 14px; height: 14px; }

.email-display {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .email-display {
        flex-direction: row;
        align-items: center;
    }
}

.email-display .email-value {
    flex: 1;
    min-width: 0;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    background: rgba(15,15,35,0.5);
    padding: 0.625rem 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (min-width: 768px) {
    .email-display .email-value { font-size: 1rem; }
}

.email-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* ---- Email Input (editable field) ---- */
.email-input {
    flex: 1;
    min-width: 0;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    background: rgba(15,15,35,0.5);
    padding: 0.625rem 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--foreground);
    outline: none;
    transition: all 0.2s;
    height: auto;
}

.email-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(212,160,83,0.15);
    background: rgba(15,15,35,0.8);
}

.email-input::placeholder {
    color: var(--muted-foreground);
    font-family: var(--font-sans);
    font-size: 0.8125rem;
}

@media (min-width: 768px) {
    .email-input { font-size: 1rem; }
}

/* ---- Status Dot ---- */
.status-dot {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

.status-dot .dot {
    position: relative;
    width: 8px;
    height: 8px;
}

.status-dot .dot-ping {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 9999px;
    opacity: 0.6;
    animation: ping 1.5s cubic-bezier(0,0,0.2,1) infinite;
}

.status-dot .dot-solid {
    position: relative;
    display: inline-flex;
    width: 8px;
    height: 8px;
    border-radius: 9999px;
}

.dot-online { background: var(--success); }
.dot-pending { background: var(--warning); }
.dot-offline { background: var(--destructive); }

@keyframes ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* ============================================================
   DOMAIN DROPDOWN
   ============================================================ */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    min-width: 280px;
    max-height: 300px;
    overflow-y: auto;
    border-radius: 0.5rem;
    border: 1px solid var(--border-strong);
    background: var(--card);
    box-shadow: 0 12px 32px rgba(0,0,0,0.5);
    z-index: 50;
    padding: 0.25rem;
    animation: dropdown-in 0.15s ease;
}

.dropdown-menu.open {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    border-radius: 0.25rem;
    cursor: pointer;
    color: var(--foreground);
    transition: background 0.1s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.dropdown-item:hover {
    background: var(--secondary);
}

.dropdown-item .check-icon {
    color: var(--accent);
    width: 14px;
    height: 14px;
}

@keyframes dropdown-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   INBOX TABLE
   ============================================================ */
.inbox-section {
    max-width: 960px;
    margin: 0 auto;
    padding: 2.5rem 1rem;
}

.inbox-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.inbox-header svg {
    width: 16px;
    height: 16px;
    color: var(--muted-foreground);
}

.inbox-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
}

.inbox-table {
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    background: var(--card);
    overflow: hidden;
}

.inbox-table-head {
    display: none;
    grid-template-columns: 3fr 5fr 2fr 1fr 1fr;
    gap: 1rem;
    padding: 0.625rem 1.25rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted-foreground);
}

@media (min-width: 768px) {
    .inbox-table-head { display: grid; }
}

.inbox-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.25rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.inbox-row:last-child { border-bottom: none; }
.inbox-row:hover { background: rgba(34,34,68,0.4); }

@media (min-width: 768px) {
    .inbox-row {
        grid-template-columns: 3fr 5fr 2fr 1fr 1fr;
        gap: 1rem;
        align-items: center;
    }
}

.inbox-row .msg-from {
    font-weight: 500;
    font-size: 0.875rem;
}

.inbox-row .msg-subject-mobile {
    display: block;
    font-size: 0.75rem;
    color: var(--muted-foreground);
    margin-top: 0.125rem;
}

@media (min-width: 768px) {
    .inbox-row .msg-subject-mobile { display: none; }
}

.inbox-row .msg-subject-col {
    display: none;
}

@media (min-width: 768px) {
    .inbox-row .msg-subject-col { display: block; }
}

.inbox-row .msg-subject-col .subject-text {
    font-size: 0.875rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inbox-row .msg-subject-col .preview-text {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: 0.125rem;
}

.code-2fa-btn {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    border: 1px solid rgba(212,160,83,0.3);
    background: rgba(212,160,83,0.08);
    color: var(--accent);
    cursor: pointer;
    transition: background 0.15s;
}

.code-2fa-btn:hover {
    background: rgba(212,160,83,0.18);
}

.inbox-row .msg-time {
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

.inbox-row .msg-actions {
    display: flex;
    gap: 0.25rem;
}

@media (min-width: 768px) {
    .inbox-row .msg-actions { justify-content: flex-end; }
}

/* Empty Inbox */
.empty-inbox {
    border-radius: 0.75rem;
    border: 1px dashed var(--border);
    background: rgba(24,24,48,0.4);
    padding: 4rem 1.5rem;
    text-align: center;
}

.empty-inbox svg {
    margin: 0 auto;
    width: 32px;
    height: 32px;
    color: rgba(136,136,170,0.5);
}

.empty-inbox p {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* ============================================================
   NOTICE BOX
   ============================================================ */
.notice {
    margin-top: 2.5rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(250,204,21,0.2);
    background: rgba(250,204,21,0.04);
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.notice svg {
    width: 20px;
    height: 20px;
    color: var(--warning);
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.notice .notice-title {
    font-weight: 600;
    font-size: 0.875rem;
}

.notice .notice-body {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
    line-height: 1.6;
}

/* ============================================================
   FEATURE CARDS
   ============================================================ */
.features-grid {
    margin-top: 2.5rem;
    display: grid;
    gap: 1rem;
}

@media (min-width: 768px) {
    .features-grid { grid-template-columns: repeat(3, 1fr); }
}

.feature-card {
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    background: var(--card);
    padding: 1.25rem;
    transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-2px);
}

.feature-card .feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 0.375rem;
    background: rgba(212,160,83,0.08);
    color: var(--accent);
}

.feature-card .feature-icon svg {
    width: 20px;
    height: 20px;
}

.feature-card .feature-title {
    margin-top: 0.75rem;
    font-weight: 600;
}

.feature-card .feature-desc {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    margin-top: auto;
    border-top: 1px solid var(--border);
}

.site-footer .footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 2rem 1rem;
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

@media (min-width: 768px) {
    .site-footer .footer-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

/* ============================================================
   AD BANNER (HORIZONTAL & SIDEBAR)
   ============================================================ */
.ad-banner {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1rem 2rem;
}

.ad-banner-link, .sidebar-ad-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.ad-banner-inner, .sidebar-ad-link {
    position: relative;
    border-radius: 0.75rem;
    border: 1px solid rgba(212,160,83,0.25);
    background: linear-gradient(135deg, rgba(212,160,83,0.06), rgba(24,24,48,0.8));
    transition: all 0.3s ease;
    overflow: hidden;
}

.ad-banner-inner {
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ad-banner-inner::before, .sidebar-ad-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(212,160,83,0.08), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}

.ad-banner-link:hover .ad-banner-inner, .sidebar-ad-link:hover {
    border-color: rgba(212,160,83,0.5);
    box-shadow: 0 0 30px rgba(212,160,83,0.15);
    transform: translateY(-2px);
}

.ad-banner-link:hover .ad-banner-inner::before, .sidebar-ad-link:hover::before {
    opacity: 1;
}

.ad-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    opacity: 0.6;
}

.ad-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.ad-icon, .sidebar-ad-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background: rgba(212,160,83,0.12);
    color: var(--accent);
    flex-shrink: 0;
}

.ad-icon {
    width: 44px;
    height: 44px;
}

.ad-title, .sidebar-ad-title {
    font-weight: 600;
    margin-bottom: 0.125rem;
}
.ad-title { font-size: 0.9375rem; }

.ad-desc, .sidebar-ad-desc {
    font-size: 0.8125rem;
    color: var(--muted-foreground);
    line-height: 1.4;
}

/* OUTLINED CTA BUTTON for better aesthetics */
.ad-cta, .sidebar-ad-cta {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--accent);
    background: transparent;
    color: var(--accent);
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s;
    flex-shrink: 0;
}

.ad-banner-link:hover .ad-cta, .sidebar-ad-link:hover .sidebar-ad-cta {
    background: var(--accent);
    color: var(--accent-foreground);
    transform: translateX(2px);
}
.sidebar-ad-link:hover .sidebar-ad-cta {
    transform: translateY(-2px); /* Vertical layout jumps up instead of right */
}

@media (max-width: 767px) {
    .ad-banner-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
    }
    .ad-cta {
        align-self: stretch;
    }
}

/* ============================================================
   SIDEBAR AD (FLOATING)
   ============================================================ */
.sidebar-ad {
    display: none; /* Hidden by default entirely */
}

/* When screen is super wide, show sidebar ad and hide horizontal ad */
@media (min-width: 1400px) {
    .ad-horizontal {
        display: none !important;
    }

    .sidebar-ad {
        display: block;
        position: fixed;
        top: 50%;
        transform: translateY(-50%);
        width: 180px;
        z-index: 50;
    }
    
    .sidebar-ad-left {
        left: 2rem;
    }

    .sidebar-ad-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.5rem 1rem;
    }

    .sidebar-ad-badge {
        font-size: 0.625rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        color: var(--accent);
        opacity: 0.6;
        margin-bottom: 1rem;
    }

    .sidebar-ad-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 1rem;
    }

    .sidebar-ad-title {
        font-size: 0.875rem;
    }

    .sidebar-ad-desc {
        margin-bottom: 1.5rem;
    }

    .sidebar-ad-cta {
        width: 100%;
        padding: 0.625rem 0.5rem;
    }
}

/* ============================================================
   FOOTER (enhanced)
   ============================================================ */
.footer-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
}

.footer-links a {
    color: var(--accent);
    transition: opacity 0.2s;
}

.footer-links a:hover {
    opacity: 0.8;
}

.footer-links span {
    color: var(--muted-foreground);
}

/* ============================================================
   PRICING PAGE
   ============================================================ */
.pricing-grid {
    display: grid;
    gap: 1rem;
}

@media (min-width: 768px) {
    .pricing-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .pricing-grid { grid-template-columns: repeat(4, 1fr); }
}

.pricing-card {
    position: relative;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    background: var(--card);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.pricing-card.featured {
    border-color: rgba(212,160,83,0.4);
    box-shadow: var(--shadow-glow);
}

.pricing-card .plan-name {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted-foreground);
}

.pricing-card .plan-price {
    margin-top: 0.5rem;
    font-size: 1.875rem;
    font-weight: 600;
}

.pricing-card .plan-features {
    margin-top: 1.25rem;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pricing-card .plan-features li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.pricing-card .plan-features li span.value {
    font-family: var(--font-mono);
    color: var(--foreground);
}

.pricing-card .plan-features li.perk {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    justify-content: flex-start;
}

.pricing-card .plan-features li.perk svg {
    width: 16px;
    height: 16px;
    color: var(--accent);
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.pricing-card .plan-features li.perk span {
    color: var(--foreground);
}

.pricing-card .plan-cta {
    margin-top: 1.5rem;
}

.pricing-contact {
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    background: var(--card);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 768px) {
    .pricing-contact {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

/* ============================================================
   API DOCS PAGE
   ============================================================ */
.docs-auth-card {
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    background: var(--card);
    padding: 1.25rem;
    margin-top: 2rem;
}

.docs-endpoint {
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    background: var(--card);
    overflow: hidden;
}

.docs-endpoint-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.docs-endpoint-body {
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.docs-endpoint pre {
    border-radius: 0.375rem;
    background: var(--background);
    border: 1px solid var(--border);
    padding: 0.75rem;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    overflow-x: auto;
    line-height: 1.6;
}

.docs-endpoint code {
    font-family: var(--font-mono);
    font-size: 0.875rem;
}

.method-badge {
    display: inline-flex;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
}

.method-get {
    background: rgba(74,222,128,0.12);
    color: var(--success);
    border: 1px solid rgba(74,222,128,0.25);
}

.method-post {
    background: rgba(212,160,83,0.12);
    color: var(--accent);
    border: 1px solid rgba(212,160,83,0.25);
}

/* ============================================================
   MODAL / DIALOG
   ============================================================ */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay.open {
    display: flex;
    animation: fade-in 0.15s ease;
}

.modal {
    width: 100%;
    max-width: 480px;
    border-radius: 0.75rem;
    border: 1px solid var(--border-strong);
    background: var(--card);
    padding: 1.5rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    animation: slide-up 0.2s ease;
}

.modal-header {
    margin-bottom: 1rem;
}

.modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

.modal-header p {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.modal-footer {
    margin-top: 1.25rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-strong);
    background: var(--card);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    font-size: 0.875rem;
    animation: slide-in-right 0.3s ease;
    pointer-events: auto;
    max-width: 360px;
}

.toast.toast-success svg { color: var(--success); }
.toast.toast-error svg { color: var(--destructive); }
.toast.toast-info svg { color: var(--accent); }

.toast.toast-exit {
    animation: slide-out-right 0.2s ease forwards;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin-top: 1.5rem;
}

.pagination .page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    font-size: 0.8125rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted-foreground);
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.pagination .page-btn:hover {
    background: var(--secondary);
    color: var(--foreground);
}

.pagination .page-btn.active {
    background: var(--primary);
    color: var(--primary-foreground);
    border-color: var(--primary);
}

.pagination .page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slide-up {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slide-in-right {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slide-out-right {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100%); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.animate-fade-in {
    animation: fade-in 0.4s ease;
}

.animate-slide-up {
    animation: slide-up 0.4s ease;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Shimmer loading skeleton */
.skeleton {
    background: linear-gradient(90deg, var(--secondary) 25%, rgba(255,255,255,0.05) 50%, var(--secondary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 0.375rem;
}

/* ============================================================
   PAGE LAYOUT
   ============================================================ */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-section {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 4rem 1rem 3rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: -0.025em;
}

@media (min-width: 768px) {
    .page-title { font-size: 3rem; }
}

/* ============================================================
   POPULAR BADGE (pricing)
   ============================================================ */
.popular-badge {
    position: absolute;
    top: -10px;
    right: 1rem;
}

/* ============================================================
   RESPONSIVE HELPERS
   ============================================================ */
@media (max-width: 767px) {
    .md-show { display: none !important; }
}

@media (min-width: 768px) {
    .md-hide { display: none !important;  }
}

/* ============================================================
   EMAIL PAGE
   ============================================================ */
.email-page-card {
    max-width: 960px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.email-page-card .email-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.message-view {
    padding: 1.25rem;
}

.message-view .msg-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.message-view .msg-body {
    padding: 1rem;
    background: var(--background);
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    min-height: 200px;
    overflow: auto;
}

.message-view .msg-body iframe {
    width: 100%;
    min-height: 300px;
    border: none;
    background: #fff;
    border-radius: 0.25rem;
}
