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

:root {
    --bg-dark: #f8fafc;
    --bg-primary: #ffffff;
    --bg-secondary: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-surface: rgba(255, 255, 255, 0.9);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.08);
    --glass-blur: blur(20px);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --gradient-primary: linear-gradient(135deg, #06b6d4, #8b5cf6, #ec4899);
    --gradient-accent: linear-gradient(135deg, #22d3ee, #a855f7, #f472b6);
    --gradient-glow: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(139, 92, 246, 0.2), rgba(236, 72, 153, 0.2));
    --brand-cyan: #06b6d4;
    --brand-purple: #8b5cf6;
    --brand-pink: #ec4899;
    --border-subtle: rgba(0, 0, 0, 0.05);
    --border-default: rgba(0, 0, 0, 0.1);
    --border-hover: rgba(0, 0, 0, 0.15);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.1);
    --shadow-glow-cyan: 0 0 30px rgba(6, 182, 212, 0.15);
    --shadow-glow-purple: 0 0 30px rgba(139, 92, 246, 0.15);
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444
}

dialog {
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    background: var(--bg-surface);
    color: var(--text-primary);
    padding: 0;
    max-width: 400px;
    width: 90%;
    position: fixed;
    inset: 0;
    margin: auto;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--shadow-lg), 0 0 0 100vmax rgba(0, 0, 0, 0.5)
}

dialog::backdrop {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px)
}

dialog[open] {
    animation: modal-in 0.3s ease forwards
}

dialog[open]::backdrop {
    animation: fade-in 0.3s ease forwards
}

@keyframes modal-in {
    from {
        opacity: 0;
        transform: scale(0.95)
    }

    to {
        opacity: 1;
        transform: scale(1)
    }
}

.modal-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    display: flex
}

.modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary)
}

.modal-body {
    padding: var(--space-lg)
}

.modal-footer {
    padding: var(--space-lg);
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm)
}

*,
*::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: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-primary);
    background: var(--bg-dark);
    min-height: 100dvh;
    line-height: 1.6;
    overflow-x: hidden
}

a {
    color: var(--brand-cyan);
    text-decoration: none;
    transition: color var(--transition-fast)
}

a:hover {
    color: var(--brand-purple)
}

.bg-animated {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(6, 182, 212, 0.15), transparent), radial-gradient(ellipse 60% 40% at 100% 0%, rgba(139, 92, 246, 0.12), transparent), radial-gradient(ellipse 50% 30% at 0% 100%, rgba(236, 72, 153, 0.1), transparent), var(--bg-dark)
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s ease-in-out infinite
}

.bg-orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.3), transparent 70%);
    top: -200px;
    left: 10%;
    animation-delay: 0s
}

.bg-orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3), transparent 70%);
    top: 30%;
    right: -100px;
    animation-delay: -5s;
    animation-duration: 25s
}

.bg-orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.25), transparent 70%);
    bottom: -100px;
    left: 30%;
    animation-delay: -10s;
    animation-duration: 30s
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1)
    }

    25% {
        transform: translate(30px, -30px) scale(1.05)
    }

    50% {
        transform: translate(-20px, 20px) scale(0.95)
    }

    75% {
        transform: translate(-30px, -20px) scale(1.02)
    }
}

.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%)
}

.wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md)
}

header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid var(--border-subtle);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur)
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) 0
}

.brand {
    font-weight: 800;
    font-size: 22px;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: var(--space-xs)
}

.brand-text {
    color: var(--text-primary)
}

.brand-highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradient-shift 8s ease infinite;
    background-size: 200% 200%
}

@keyframes gradient-shift {

    0%,
    100% {
        background-position: 0% 50%
    }

    50% {
        background-position: 100% 50%
    }
}

nav {
    display: flex;
    gap: var(--space-lg)
}

nav a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 15px;
    position: relative;
    padding: var(--space-xs) 0;
    transition: color var(--transition-fast)
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-normal);
    border-radius: var(--radius-full)
}

nav a:hover {
    color: var(--text-primary)
}

nav a:hover::after {
    width: 100%
}

.hero {
    padding: var(--space-2xl) 0;
    text-align: center
}

.hero-title {
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--space-md);
    letter-spacing: -1px
}

.hero-title .gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradient-shift 8s ease infinite;
    background-size: 200% 200%
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto var(--space-xl);
    line-height: 1.7
}

.card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--shadow-md), var(--shadow-glow);
    position: relative;
    overflow: hidden
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent)
}

.card-glow {
    position: relative
}

.card-glow::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: var(--gradient-primary);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition-normal);
    pointer-events: none
}

.card-glow:hover::after,
.card-glow:focus-within::after {
    opacity: 0.5
}

.pad {
    padding: var(--space-lg)
}

.email-section {
    max-width: 700px;
    margin: 0 auto
}

.email-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    gap: var(--space-sm)
}

.email-label::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1)
    }

    50% {
        opacity: 0.5;
        transform: scale(0.8)
    }
}

.input {
    width: 100%;
    padding: var(--space-md);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 16px;
    outline: none;
    transition: all var(--transition-fast)
}

.input::placeholder {
    color: var(--text-muted)
}

.input:focus {
    border-color: var(--brand-purple);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15), var(--shadow-glow-purple)
}

.input:hover:not(:focus) {
    border-color: var(--border-hover)
}

.toolbar {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
    flex-wrap: wrap;
    margin-top: var(--space-md)
}

.btn {
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-default);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    min-height: 44px;
    position: relative;
    overflow: hidden
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), transparent);
    opacity: 0;
    transition: opacity var(--transition-fast)
}

.btn:hover {
    border-color: var(--border-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm)
}

.btn:hover::before {
    opacity: 1
}

.btn:active {
    transform: translateY(0)
}

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

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    color: white;
    box-shadow: var(--shadow-glow-purple)
}

.btn-primary:hover {
    box-shadow: var(--shadow-glow-purple), var(--shadow-md);
    filter: brightness(1.1)
}

.select {
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    min-height: 44px;
    cursor: pointer;
    transition: all var(--transition-fast)
}

.select:hover {
    border-color: var(--border-hover)
}

.select:focus {
    border-color: var(--brand-purple);
    outline: none;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15)
}

.status {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm)
}

.inbox {
    overflow: hidden;
    margin-top: var(--space-xl)
}

.inbox-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-subtle)
}

.inbox-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0
}

.inbox-body {
    display: grid;
    grid-template-columns: minmax(280px, 380px) 1fr;
    min-height: 60dvh
}

@media (max-width:980px) {
    .inbox-body {
        grid-template-columns: 1fr
    }
}

.list-pane {
    background: rgba(255, 255, 255, 0.4);
    border-right: 1px solid var(--border-subtle);
    max-height: 64dvh;
    overflow-y: auto
}

@media (max-width:980px) {
    .list-pane {
        max-height: none;
        border-right: none;
        border-bottom: 1px solid var(--border-subtle)
    }
}

.list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding: var(--space-md)
}

.empty-msg {
    padding: var(--space-lg);
    text-align: center;
    color: var(--text-muted)
}

.item {
    padding: var(--space-md);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.6);
    text-align: left;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden
}

.item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-fast)
}

.item:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--border-hover);
    transform: translateX(4px)
}

.item:hover::before {
    opacity: 1
}

.item.active {
    background: #ffffff;
    border-color: var(--brand-purple)
}

.item.active::before {
    opacity: 1
}

.row1 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    margin-bottom: var(--space-xs)
}

.sender {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.date {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap
}

.label {
    color: var(--text-muted);
    margin-right: var(--space-xs);
    font-size: 13px
}

.one-line {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.from-email {
    color: var(--text-secondary);
    font-size: 13px
}

.subject {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px
}

.snippet {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: var(--space-xs)
}

.viewer-pane {
    padding: var(--space-lg);
    max-height: 64dvh;
    overflow-y: auto
}

.viewer {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    min-height: 300px
}

.msg-header {
    padding: var(--space-lg);
    background: rgba(255, 255, 255, 0.4);
    border-bottom: 1px solid var(--border-subtle)
}

.msg-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm)
}

.badge {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: var(--bg-secondary);
    color: var(--text-secondary)
}

.badge-count {
    background: var(--brand-purple);
    color: white;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px
}

.msg-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: var(--space-xs);
    line-height: 1.4
}

.msg-from {
    font-size: 14px
}

.divider {
    border: 0;
    height: 1px;
    background: var(--border-subtle);
    margin: 0
}

.msg-body {
    padding: var(--space-lg);
    overflow-x: auto;
    font-size: 15px;
    line-height: 1.6
}

.content-section {
    padding: var(--space-2xl) 0
}

.content-section h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: var(--space-md);
    color: var(--text-primary)
}

.content-section h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 32px 0 16px;
    color: var(--text-primary)
}

.content-section p {
    margin-bottom: 16px;
    color: var(--text-secondary)
}

.content-section ul {
    margin-bottom: 24px;
    padding-left: 24px;
    color: var(--text-secondary)
}

.content-section li {
    margin-bottom: 8px
}

.faq-section {
    padding: var(--space-2xl) 0;
    max-width: 800px;
    margin: 0 auto
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs)
}

.faq-item {
    border-bottom: 1px solid var(--border-subtle)
}

.faq-item:last-child {
    border-bottom: none
}

.faq-q {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: var(--space-md);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color var(--transition-fast)
}

.faq-q:hover {
    color: var(--brand-purple)
}

.chev {
    transition: transform var(--transition-normal);
    font-size: 20px;
    line-height: 1
}

.faq-item.open .chev {
    transform: rotate(90deg)
}

.faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
    background: rgba(255, 255, 255, 0.3)
}

.faq-a-inner {
    padding: 0 var(--space-md) var(--space-md);
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6
}

.ad {
    height: 120px;
    background: var(--bg-secondary);
    border: 1px dashed var(--border-default);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: var(--space-xl) auto;
    max-width: 800px
}

footer {
    margin-top: auto;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-default);
    padding: var(--space-xl) 0
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
    text-align: center
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-lg)
}

.footer-nav a {
    color: var(--text-secondary);
    font-size: 14px
}

.footer-nav a:hover {
    color: var(--brand-purple)
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm)
}

.footer-text {
    color: var(--text-muted);
    font-size: 14px
}

.footer-badge {
    display: inline-block;
    margin-top: var(--space-xs)
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(10px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.animate-fade-in {
    animation: fade-in 0.6s ease forwards
}

@keyframes slide-in {
    from {
        opacity: 0;
        transform: translateX(-10px)
    }

    to {
        opacity: 1;
        transform: translateX(0)
    }
}

.animate-slide-in {
    animation: slide-in 0.4s ease forwards;
    opacity: 0
}