:root{
    --bg: #0b0d12;
    --bg-2: #0f1320;
    --panel: rgba(20, 24, 38, 0.72);
    --panel-2: rgba(28, 33, 52, 0.6);
    --border: rgba(255,255,255,0.08);
    --border-strong: rgba(255,255,255,0.16);
    --text: #e8ecf5;
    --muted: #9aa3b8;
    --muted-2: #6b7390;
    --accent: #7c5cff;
    --accent-2: #00d4ff;
    --accent-3: #ff6ad5;
    --ok: #2ecc71;
    --warn: #f5b73c;
    --err: #ff5d6c;
    --radius: 16px;
    --radius-lg: 22px;
    --shadow: 0 20px 60px rgba(0,0,0,0.45), 0 2px 0 rgba(255,255,255,0.04) inset;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
html{color-scheme: dark}
body{
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    background: radial-gradient(1200px 800px at 80% -10%, #1a1640 0%, transparent 60%),
                            radial-gradient(900px 700px at -10% 10%, #052033 0%, transparent 55%),
                            linear-gradient(180deg, #07090f 0%, #0b0d12 100%);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

a{color: inherit}

.bg-aurora{
    position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.bg-aurora span{
    position:absolute; display:block; filter: blur(80px); opacity:.55; border-radius: 50%;
}
.bg-aurora span:nth-child(1){width:520px;height:520px;background:#7c5cff;top:-120px;left:-120px;animation:float 16s ease-in-out infinite}
.bg-aurora span:nth-child(2){width:420px;height:420px;background:#00d4ff;top:30%;right:-140px;animation:float 18s ease-in-out infinite reverse}
.bg-aurora span:nth-child(3){width:360px;height:360px;background:#ff6ad5;bottom:-160px;left:30%;opacity:.35;animation:float 22s ease-in-out infinite}
@keyframes float{
    0%,100%{transform:translate3d(0,0,0)}
    50%{transform:translate3d(40px,-30px,0)}
}

.topbar{
    position: relative; z-index: 2;
    display:flex; justify-content:space-between; align-items:center;
    padding: 22px clamp(18px, 4vw, 48px);
}
.brand{display:flex; align-items:center; gap:12px; text-decoration:none; color:var(--text)}
.brand-mark{display:inline-flex; align-items:center; justify-content:center; box-shadow: 0 10px 30px rgba(124,92,255,.35); border-radius: 12px;}
.brand-text{display:flex; flex-direction:column; line-height:1}
.brand-text strong{font-weight:800; letter-spacing:.2px; font-size:18px}
.brand-text span{color:var(--muted); font-size:12px; margin-top:3px; text-transform:uppercase; letter-spacing:.18em}

.topbar-meta{display:flex; align-items:center; gap:8px; color:var(--muted); font-size:13px;
    background: var(--panel); border:1px solid var(--border); padding: 8px 12px; border-radius:999px;
    backdrop-filter: blur(10px);
}
.topbar-right{display:flex; align-items:center; gap:10px}
.lang-switch{
    display:inline-flex; background: var(--panel); border:1px solid var(--border);
    border-radius: 999px; padding: 3px; backdrop-filter: blur(10px);
}
.lang-btn{
    appearance:none; border:0; background: transparent; color: var(--muted);
    font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .08em;
    padding: 6px 12px; border-radius: 999px; cursor: pointer;
    transition: color .15s ease, background .15s ease, box-shadow .15s ease;
}
.lang-btn:hover{color: var(--text)}
.lang-btn.is-active{
    color:#0a0c14;
    background: linear-gradient(135deg, #c8b8ff 0%, #7c5cff 50%, #00d4ff 100%);
    box-shadow: 0 6px 16px rgba(124,92,255,.35), inset 0 1px 0 rgba(255,255,255,.5);
}
@media (max-width: 520px){
    .topbar-meta{display:none}
}
.dot{width:8px;height:8px;border-radius:50%;background:var(--ok); box-shadow: 0 0 0 4px rgba(46,204,113,.18); animation: pulse 2s ease-in-out infinite}
@keyframes pulse{50%{box-shadow:0 0 0 8px rgba(46,204,113,0)}}

.container{
    position: relative; z-index: 1;
    max-width: 1080px; margin: 0 auto; padding: 24px clamp(18px, 4vw, 48px) 80px;
}

.hero{ padding: 28px 0 8px;}
.eyebrow{
    display:inline-block;
    font-size:12px; letter-spacing:.22em; text-transform:uppercase;
    color:#cdd3e6; padding:6px 12px; border-radius:999px;
    background: linear-gradient(135deg, rgba(124,92,255,.18), rgba(0,212,255,.18));
    border: 1px solid var(--border-strong);
}
.hero h1{
    margin: 18px 0 14px;
    font-size: clamp(34px, 5.4vw, 56px);
    line-height: 1.05; letter-spacing: -0.02em; font-weight: 800;
}
.grad{
    background: linear-gradient(90deg, #c4b5ff 0%, #7c5cff 35%, #00d4ff 75%, #7af0ff 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede{
    color: var(--muted); max-width: 720px; font-size: clamp(15px, 1.6vw, 18px); line-height: 1.6;
}

.notice{
    display:flex; align-items:flex-start; gap:12px;
    margin-top: 18px; max-width: 760px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(245,183,60,.10), rgba(255,93,108,.08));
    border: 1px solid rgba(245,183,60,.35);
    border-radius: 14px;
    color: #ffe6b0; font-size: 14px; line-height: 1.55;
    backdrop-filter: blur(10px);
}
.notice-icon{
    flex: 0 0 auto; display:inline-flex; align-items:center; justify-content:center;
    width:32px; height:32px; border-radius: 10px;
    background: rgba(245,183,60,.18); color:#ffd98a;
    border: 1px solid rgba(245,183,60,.35);
}
.notice b{color:#fff; font-weight:700}

.mode-switch{
    display:inline-flex; gap:4px; margin-top: 26px;
    background: var(--panel); border:1px solid var(--border-strong);
    padding: 4px; border-radius: 14px; backdrop-filter: blur(10px);
}
.mode-btn{
    appearance:none; border:0; background:transparent; color: var(--muted);
    font: inherit; font-weight:600; font-size: 13.5px;
    display:inline-flex; align-items:center; gap:8px;
    padding: 9px 14px; border-radius: 10px; cursor:pointer;
    transition: color .15s ease, background .15s ease, box-shadow .15s ease;
}
.mode-btn:hover{color: var(--text)}
.mode-btn.is-active{
    color:#0a0c14;
    background: linear-gradient(135deg, #c8b8ff 0%, #7c5cff 50%, #00d4ff 100%);
    box-shadow: 0 6px 16px rgba(124,92,255,.35), inset 0 1px 0 rgba(255,255,255,.5);
}
.mode-btn svg{flex:0 0 auto}

.token-card{
    margin-top: 18px;
    background: linear-gradient(180deg, rgba(20,24,38,.78), rgba(20,24,38,.55));
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}
.token-label{
    display:block; font-weight:600; margin-bottom:10px; color:#dfe4f3;
}
.token-row{
    display:flex; align-items:stretch; gap:10px;
    background: rgba(8,10,18,.55);
    border:1px solid var(--border-strong);
    border-radius: 14px; padding: 6px;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.token-row:focus-within{
    border-color: rgba(124,92,255,.6);
    box-shadow: 0 0 0 4px rgba(124,92,255,.15);
}
.token-prefix{
    display:flex; align-items:center; justify-content:center;
    width:42px; color: var(--muted);
}
.token-row input{
    flex: 1; min-width: 0;
    background: transparent; border: 0; outline: none; color: var(--text);
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 15px; letter-spacing: .02em;
    padding: 14px 4px;
}
.token-row input::placeholder{color:#5a6280}

.btn-primary{
    --h: 48px;
    height: var(--h); padding: 0 18px;
    display:inline-flex; align-items:center; gap:10px; cursor:pointer;
    border: 0; border-radius: 12px; color:#0a0c14; font-weight: 700; font-size: 14.5px; letter-spacing:.01em;
    background: linear-gradient(135deg, #c8b8ff 0%, #7c5cff 50%, #00d4ff 100%);
    box-shadow: 0 8px 24px rgba(124,92,255,.35), inset 0 1px 0 rgba(255,255,255,.5);
    transition: transform .08s ease, filter .2s ease, box-shadow .2s ease;
    position: relative;
}
.btn-primary:hover{filter: brightness(1.06); box-shadow: 0 14px 30px rgba(124,92,255,.45)}
.btn-primary:active{transform: translateY(1px)}
.btn-primary:disabled{opacity:.85; cursor: progress}
.btn-primary .btn-arrow{transition: transform .2s ease}
.btn-primary:hover .btn-arrow{transform: translateX(3px)}

.btn-spinner{
    display:none; width:16px; height:16px; border-radius:50%;
    border:2px solid rgba(0,0,0,.25); border-top-color:#0a0c14;
    animation: spin .9s linear infinite;
}
@keyframes spin{to{transform: rotate(360deg)}}
.btn-primary.is-loading .btn-spinner{display:inline-block}
.btn-primary.is-loading .btn-arrow{display:none}

.token-hint{margin: 12px 4px 0; color: var(--muted-2); font-size: 13px}
.token-hint code{
    background: rgba(255,255,255,.06); padding: 2px 6px; border-radius: 6px;
    font-family: 'JetBrains Mono', ui-monospace, monospace; color:#cdd3e6;
}

.features{
    list-style:none; padding:0; margin: 30px 0 0;
    display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px;
}
.features li{
    display:flex; gap:12px; align-items:flex-start;
    background: var(--panel-2); border:1px solid var(--border);
    border-radius: 14px; padding: 14px 14px;
    color: var(--muted); font-size: 13.5px;
}
.features li svg{color:#a9b3d0; flex:0 0 auto; margin-top:2px}
.features li strong{display:block; color:var(--text); font-weight:600; margin-bottom:2px; font-size:14px}
.features li span{display:block; line-height:1.45}

@media (max-width: 760px){
    .features{grid-template-columns: 1fr}
    .token-row{flex-direction: column; padding: 10px}
    .token-prefix{display:none}
    .token-row input{padding: 8px 12px}
    .btn-primary{width:100%; justify-content:center}
}

.result{ margin-top: 36px; }
.result[hidden]{display:none}

.mailbox-card{
    background: linear-gradient(180deg, rgba(20,24,38,.85), rgba(20,24,38,.55));
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}
.mailbox-head{
    display:flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
}
.mb-left{display:flex; align-items:center; gap:14px; min-width:0}
.avatar{
    width:48px; height:48px; border-radius: 14px; flex:0 0 auto;
    display:flex; align-items:center; justify-content:center; font-weight: 800; color:#0a0c14;
    background: linear-gradient(135deg, #c8b8ff, #7c5cff 60%, #00d4ff);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}
.mb-meta{min-width:0}
.mb-meta .email{font-weight:700; font-size:16px; word-break: break-all}
.mb-meta .sub{color:var(--muted); font-size:13px; margin-top:2px}
.badges{display:flex; gap:8px; flex-wrap:wrap}
.badge{
    display:inline-flex; align-items:center; gap:6px;
    background: rgba(255,255,255,.05); border:1px solid var(--border);
    color: #cdd3e6; padding:6px 10px; border-radius:999px; font-size:12.5px;
}
.badge.ok{color:#a8f0c5; background:rgba(46,204,113,.1); border-color: rgba(46,204,113,.3)}
.badge.warn{color:#ffd98a; background:rgba(245,183,60,.1); border-color: rgba(245,183,60,.3)}
.badge.err{color:#ffb3bb; background: rgba(255,93,108,.1); border-color: rgba(255,93,108,.3)}
.badge.muted{color:var(--muted)}

.mails{
    margin-top: 18px;
    display:flex; flex-direction:column; gap: 10px;
}
.section-title{
    display:flex; align-items:center; gap:10px; margin: 6px 4px 4px;
    color: var(--muted); font-size:13px; text-transform:uppercase; letter-spacing:.18em;
}
.section-title .count{
    background:rgba(255,255,255,.06); color:#dfe4f3; padding:2px 8px; border-radius:999px; font-size:12px; letter-spacing:0;
}

.mail{
    border:1px solid var(--border);
    background: var(--panel-2);
    border-radius: 14px; overflow:hidden;
    transition: border-color .2s ease, transform .15s ease, background .2s ease;
}
.mail:hover{border-color: var(--border-strong)}
.mail.matched{border-color: rgba(124,92,255,.45); background: linear-gradient(180deg, rgba(124,92,255,.08), rgba(0,212,255,.04))}

.mail-head{
    display:flex; align-items:center; gap:14px; padding: 14px 16px; cursor:pointer; user-select:none;
}
.mail-head .from{
    display:flex; flex-direction:column; min-width:0; flex: 1;
}
.mail .from-name{font-weight:600; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.mail .subject{color:var(--muted); font-size:13.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-top:2px}
.mail .when{color:var(--muted-2); font-size:12.5px; white-space:nowrap}
.mail .chev{color:var(--muted-2); transition: transform .2s ease}
.mail.open .chev{transform: rotate(180deg)}

.code-pill{
    display:inline-flex; align-items:center; gap:8px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    background: linear-gradient(135deg, rgba(124,92,255,.18), rgba(0,212,255,.16));
    border: 1px solid rgba(124,92,255,.45);
    padding: 6px 10px; border-radius: 10px; color:#fff; font-weight:600;
    cursor: pointer; transition: filter .15s ease, transform .1s ease;
}
.code-pill:hover{filter: brightness(1.1)}
.code-pill:active{transform: translateY(1px)}
.code-pill svg{opacity:.9}

.mail-body{
    display:none; border-top:1px solid var(--border); padding: 14px 16px 16px; background: rgba(8,10,18,.4);
}
.mail.open .mail-body{display:block}

.mail-body .meta{
    display:grid; grid-template-columns: 90px 1fr; gap: 6px 14px; color: var(--muted); font-size: 13px; margin-bottom: 12px;
}
.mail-body .meta b{color:#cdd3e6; font-weight:600}
.mail-body .meta .v{color: var(--text); word-break: break-word}

.preview{color:var(--muted); font-size:14px; line-height:1.55}

.html-frame{
    width:100%; min-height: 360px; border: 1px solid var(--border); border-radius: 12px;
    background: #fff;
}

.empty{
    text-align:center; padding: 30px 16px; color: var(--muted);
}

.alert{
    border-radius: 14px; padding: 14px 16px; border: 1px solid var(--border-strong);
    background: rgba(255,93,108,.08); color: #ffd0d4;
}
.alert.warn{background: rgba(245,183,60,.08); color:#ffe6b0; border-color: rgba(245,183,60,.35)}
.alert b{color:#fff}

.skeleton{
    height:74px; border-radius: 14px;
    background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.09), rgba(255,255,255,.04));
    background-size: 200% 100%;
    animation: shimmer 1.4s ease-in-out infinite;
    border:1px solid var(--border);
}
@keyframes shimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}

.foot{
    position: relative; z-index: 1;
    color: var(--muted-2); font-size: 13px; text-align:center; padding: 30px 16px 40px;
    display:flex; gap: 8px; justify-content:center; align-items:center; flex-wrap:wrap;
}
.foot-sep{opacity:.5}

.toast{
    position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 30px);
    background: rgba(20,24,38,.95); color:#fff; border:1px solid var(--border-strong);
    padding: 10px 14px; border-radius: 12px; font-size: 13.5px;
    box-shadow: 0 10px 30px rgba(0,0,0,.5);
    opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
    z-index: 50;
}
.toast.show{opacity: 1; transform: translate(-50%, 0)}
.toast.ok{border-color: rgba(46,204,113,.5)}
.toast.err{border-color: rgba(255,93,108,.5)}

.sms-card{
    background: linear-gradient(180deg, rgba(20,24,38,.85), rgba(20,24,38,.55));
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}
.sms-head{
    display:flex; gap:14px; align-items:center; flex-wrap:wrap; justify-content:space-between;
}
.sms-head .left{display:flex; align-items:center; gap:14px; min-width:0}
.sms-head .avatar{
    width:48px; height:48px; border-radius:14px;
    display:flex; align-items:center; justify-content:center; color:#0a0c14;
    background: linear-gradient(135deg, #c8b8ff, #7c5cff 60%, #00d4ff);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}
.sms-head .label{color: var(--muted); font-size:12px; text-transform:uppercase; letter-spacing:.18em}
.sms-phone{
    display:flex; align-items:center; gap:10px;
    font-family:'JetBrains Mono', ui-monospace, monospace;
    font-weight:700; font-size: clamp(20px, 3vw, 28px); color: var(--text);
    margin-top: 4px; word-break: break-all;
}
.icon-btn{
    appearance:none; border:1px solid var(--border-strong); background: rgba(255,255,255,.04);
    color: var(--muted); border-radius: 10px; padding:6px 8px; cursor:pointer; display:inline-flex;
    transition: color .15s ease, background .15s ease, transform .1s ease;
}
.icon-btn:hover{color: var(--text); background: rgba(255,255,255,.08)}
.icon-btn:active{transform: translateY(1px)}

.sms-body{
    margin-top: 18px;
    display:grid; gap: 14px;
}
.sms-status{
    display:flex; align-items:center; gap:10px;
    padding: 12px 14px; border-radius: 12px;
    background: var(--panel-2); border:1px solid var(--border);
    color: var(--text); font-size: 14px;
}
.sms-status .spin{
    width:14px; height:14px; border-radius:50%;
    border:2px solid rgba(124,92,255,.25); border-top-color:#7c5cff;
    animation: spin 1s linear infinite;
}
.sms-status.ok{background: rgba(46,204,113,.08); border-color: rgba(46,204,113,.3); color:#a8f0c5}
.sms-status.err{background: rgba(255,93,108,.08); border-color: rgba(255,93,108,.3); color:#ffb3bb}
.sms-status .msg{flex:1; min-width:0}
.sms-status .reason{color: var(--muted-2); font-size: 12.5px; margin-left:6px}

.sms-code-card{
    display:flex; align-items:center; gap:14px; flex-wrap:wrap;
    padding: 18px 18px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(124,92,255,.18), rgba(0,212,255,.14));
    border: 1px solid rgba(124,92,255,.45);
}
.sms-code-card .label{color:#cdd3e6; font-size:12px; text-transform:uppercase; letter-spacing:.18em}
.sms-code{
    font-family:'JetBrains Mono', ui-monospace, monospace;
    font-weight:800; font-size: clamp(28px, 5vw, 40px); letter-spacing: .12em; color:#fff;
    flex: 1; word-break: break-all;
}
.sms-code-card .copy{
    appearance:none; border:0; cursor:pointer;
    background: rgba(255,255,255,.14); color:#fff;
    padding: 10px 14px; border-radius: 10px; font-weight:600;
    display:inline-flex; align-items:center; gap:8px;
}
.sms-code-card .copy:hover{background: rgba(255,255,255,.22)}

.sms-meta{
    display:grid; grid-template-columns: 140px 1fr; gap: 6px 14px;
    color: var(--muted); font-size: 13px;
}
.sms-meta b{color:#cdd3e6; font-weight:600}
.sms-meta .v{color: var(--text); word-break: break-word}
.sms-meta .v.mono{font-family:'JetBrains Mono', ui-monospace, monospace; font-size:12.5px}

.sms-actions{display:flex; gap:10px; flex-wrap:wrap}
.btn-ghost{
    appearance:none; cursor:pointer; font: inherit; font-weight:600;
    border:1px solid var(--border-strong); background: rgba(255,255,255,.04);
    color: var(--text); padding: 10px 14px; border-radius: 12px;
    display:inline-flex; align-items:center; gap:8px;
    transition: background .15s ease, transform .1s ease;
}
.btn-ghost:hover{background: rgba(255,255,255,.08)}
.btn-ghost:active{transform: translateY(1px)}
.btn-ghost.danger{color:#ffb3bb; border-color: rgba(255,93,108,.35); background: rgba(255,93,108,.08)}
.btn-ghost.danger:hover{background: rgba(255,93,108,.14)}
