/* ═══════════════════════════════════════════
   Wed Terminal – Premium Dark Terminal UI
   ═══════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600;700&family=Share+Tech+Mono&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg: #000000cb;
    --bg-card: rgba(13,13,13,.8);
    --bg-card-solid: #0d0d0d;
    --bg-hover: rgba(230,230,230,.05);
    --bg-input: rgba(0,0,0,.4);
    --border: rgba(230,230,230,.1);
    --border-hover: rgba(230,230,230,.25);
    --border-focus: rgba(230,230,230,.5);
    --text: #e6e6e6;
    --text-dim: rgba(230,230,230,.6);
    --text-muted: rgba(230,230,230,.3);
    --primary: #22c55e;
    --primary-rgb: 34,197,94;
    --primary-hover: #16a34a;
    --primary-faint: rgba(34,197,94,.08);
    --danger: #ef5350;
    --danger-rgb: 239,83,80;
    --success: #22c55e;
    --success-rgb: 34,197,94;
    --warning: #ffa726;
    --purple: #a78bfa;
    --purple-rgb: 167,139,250;
    --cyan: #22d3ee;
    --sidebar-w: 260px;
    --topbar-h: 56px;
    --radius: 10px;
    --radius-sm: 6px;
    --font: 'Inter', system-ui, -apple-system, sans-serif;
    --mono: 'Fira Code', 'Share Tech Mono', 'Consolas', monospace;
    --glow-sm: 0 0 10px rgba(var(--primary-rgb),.15);
    --glow-md: 0 0 20px rgba(var(--primary-rgb),.2);
    --glow-lg: 0 0 40px rgba(var(--primary-rgb),.15), 0 0 80px rgba(var(--primary-rgb),.05);
    --shadow-card: 0 4px 24px rgba(0,0,0,.4), 0 0 1px rgba(var(--primary-rgb),.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
    height: 100%; background: var(--bg); color: var(--text);
    font-family: var(--font); font-size: 14px; line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

#particles-js {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}
#particles-js canvas {
    filter: drop-shadow(0 0 5px rgba(255, 0, 244, 0.8)) drop-shadow(0 0 10px rgba(0, 174, 255, 0.8));
}

#app { position: relative; z-index: 1; }
a { color: var(--primary); text-decoration: none; transition: all .2s; }
a:hover { color: var(--primary-hover); text-shadow: 0 0 8px rgba(var(--primary-rgb),.4); }
input, textarea, select, button { font-family: inherit; font-size: inherit; }
::selection { background: rgba(var(--primary-rgb),.25); color: #fff; }

/* ── Background effects ── */
body::before {
    content: ''; position: fixed; inset: 0; z-index: -1;
    background:
        radial-gradient(circle at 1% 1%, rgba(255, 0, 244, 0.2) 0%, transparent 60%),
        radial-gradient(circle at 100% 100%, rgba(0, 174, 255, 0.25), transparent 60%),
        radial-gradient(circle at 90% 90%, rgba(0, 0, 0, 0.34) 0%, transparent 60%),
        linear-gradient(135deg, #000000 10%, #000000 50%, #000000 100%);
    pointer-events: none;
}

/* ── Layout ── */
#app { display: flex; height: 100vh; }

/* ── Sidebar ── */
.sidebar {
    width: var(--sidebar-w); background: rgba(8,8,8,.95); border-right: 1px solid var(--border);
    display: flex; flex-direction: column; overflow: hidden; flex-shrink: 0;
    transition: width .3s cubic-bezier(.4,0,.2,1);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    position: relative;
}
.sidebar::after {
    content: ''; position: absolute; top: 0; right: 0; width: 1px; height: 100%;
    background: linear-gradient(to bottom, rgba(var(--primary-rgb),.2), transparent 30%, transparent 70%, rgba(var(--primary-rgb),.1));
    pointer-events: none;
}
.sidebar.collapsed { width: 0; border-right: none; }
.sidebar-header {
    height: var(--topbar-h); display: flex; align-items: center; justify-content: space-between;
    padding: 0 16px; border-bottom: 1px solid var(--border);
    background: linear-gradient(to right, rgba(var(--primary-rgb),.03), transparent);
}
.logo {
    font-size: 20px; font-weight: 700; color: #ffffff;
    font-family: var(--mono); text-shadow: 0 0 12px rgba(255,255,255,.2);
    letter-spacing: -0.5px;
}
.sidebar nav { flex: 1; overflow-y: auto; padding: 12px 0; }
.sidebar-footer {
    padding: 12px 16px; border-top: 1px solid var(--border); font-size: 13px;
    background: linear-gradient(to right, rgba(var(--primary-rgb),.02), transparent);
}

/* ── Nav items ── */
.nav-section { margin-bottom: 2px; }
.nav-section-title {
    display: flex; align-items: center; gap: 11px; padding: 6px 14px 6px 12px;
    cursor: pointer; margin: 2px 6px; border-radius: 8px; border-left: 2px solid transparent;
    color: var(--text-dim); transition: all .2s; -webkit-user-select: none; user-select: none;
}
.nav-section-title:hover {
    background: rgba(var(--ni-rgb, var(--primary-rgb)),.04); color: var(--text);
    border-left-color: rgba(var(--ni-rgb, var(--primary-rgb)),.3);
}
.nav-section-title .nav-icon { flex-shrink: 0; }
.nav-section-title .nav-label { flex: 1; font-size: 13px; font-weight: 500; }
.nav-section-title .arrow { font-size: 10px; color: rgba(var(--ni-rgb, var(--primary-rgb)),.5); transition: transform .25s cubic-bezier(.4,0,.2,1); }
.nav-section-title .arrow.open { transform: rotate(180deg); }
.nav-children { padding-left: 12px; }
.nav-child { padding-left: 14px !important; }
.nav-child-dot {
    width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
    margin-left: 7px; margin-right: 4px; transition: all .2s;
}
.nav-child.active .nav-child-dot {
    background: var(--ni-color, var(--primary)) !important;
    box-shadow: 0 0 6px var(--ni-color, var(--primary));
}

.nav-item {
    display: flex; align-items: center; gap: 11px; padding: 6px 16px 6px 12px;
    color: var(--text-dim); cursor: pointer; transition: all .2s; font-size: 13px;
    white-space: nowrap; border-left: 2px solid transparent; margin: 2px 6px;
    border-radius: 8px; position: relative;
}
.nav-item:hover {
    background: rgba(255,255,255,.04); color: #fff;
    border-left-color: rgba(var(--ni-rgb, var(--primary-rgb)),.4);
}
.nav-item:hover .nav-icon {
    background: rgba(var(--ni-rgb, var(--primary-rgb)),.18);
    box-shadow: 0 0 10px rgba(var(--ni-rgb, var(--primary-rgb)),.35);
}
.nav-item.active {
    color: #fff;
    background: rgba(var(--ni-rgb, var(--primary-rgb)),.1);
    border-left-color: var(--ni-color, var(--primary));
}
.nav-item.active .nav-icon {
    background: rgba(var(--ni-rgb, var(--primary-rgb)),.2);
    border-color: rgba(var(--ni-rgb, var(--primary-rgb)),.45);
    box-shadow: 0 0 12px rgba(var(--ni-rgb, var(--primary-rgb)),.5);
}
.nav-item.active::after {
    content: ''; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
    width: 3px; height: 55%; border-radius: 3px 0 0 3px;
    background: var(--ni-color, var(--primary));
    box-shadow: 0 0 8px var(--ni-color, var(--primary));
}
.nav-icon {
    width: 28px; height: 28px; flex-shrink: 0;
    border-radius: 7px; display: flex; align-items: center; justify-content: center;
    background: rgba(var(--ni-rgb, var(--primary-rgb)),.1);
    border: 1px solid rgba(var(--ni-rgb, var(--primary-rgb)),.22);
    transition: all .2s;
}
.nav-icon svg { width: 14px; height: 14px; }
.nav-label { font-size: 13px; font-weight: 500; }

/* ── Main ── */
#main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
#topbar {
    height: var(--topbar-h); display: flex; align-items: center; gap: 12px;
    padding: 0 28px; border-bottom: 1px solid var(--border);
    background: rgba(8,8,8,.85); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    flex-shrink: 0;
}
#breadcrumb { flex: 1; font-size: 13px; color: var(--text-muted); font-family: var(--mono); letter-spacing: .5px; }
#page-content {
    flex: 1; overflow-y: auto; padding: 28px;
    scroll-behavior: smooth;
    display: flex; flex-direction: column;
}

/* ── Glass Card ── */
.card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px; margin-bottom: 20px;
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-card);
    transition: border-color .3s, box-shadow .3s;
    position: relative; overflow: hidden;
}
.card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(to right, transparent, rgba(var(--primary-rgb),.2), transparent);
    pointer-events: none;
}
.card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-card), var(--glow-sm);
}
.card-header {
    font-size: 15px; font-weight: 600; margin-bottom: 16px;
    display: flex; align-items: center; gap: 10px;
    font-family: var(--mono); letter-spacing: .3px;
}

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px;
    border-radius: var(--radius-sm); border: 1px solid var(--border);
    background: rgba(255,255,255,.03); color: var(--text); cursor: pointer;
    font-size: 13px; font-weight: 500; transition: all .25s; white-space: nowrap;
    position: relative; overflow: hidden;
    backdrop-filter: blur(4px);
}
.btn::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,.03), transparent);
    pointer-events: none;
}
.btn:hover {
    border-color: var(--border-hover); background: rgba(255,255,255,.06);
    box-shadow: var(--glow-sm);
    transform: translateY(-1px);
}
.btn:active { transform: translateY(0); }
.btn-primary {
    background: rgba(34,197,94,0.14);
    color: #22c55e; border-color: rgba(34,197,94,.4); font-weight: 600;
    box-shadow: 0 0 10px rgba(34,197,94,.15);
}
.btn-primary:hover {
    background: rgba(34,197,94,.22);
    border-color: rgba(34,197,94,.7);
    box-shadow: 0 0 18px rgba(34,197,94,.3), 0 0 40px rgba(34,197,94,.1);
    transform: translateY(-2px);
    color: #4ade80;
}
.btn-danger {
    background: linear-gradient(135deg, var(--danger), #d32f2f);
    color: #fff; border-color: var(--danger);
    box-shadow: 0 2px 12px rgba(var(--danger-rgb),.2);
}
.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 5px; }
.btn-icon {
    background: none; border: none; color: var(--text-muted); cursor: pointer;
    font-size: 18px; padding: 6px 8px; transition: all .2s; border-radius: 6px;
}
.btn-icon:hover { color: var(--primary); background: var(--primary-faint); }

/* ── Tool Icon Badge ── */
.tool-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 10px; font-size: 17px; flex-shrink: 0;
    background: linear-gradient(135deg, rgba(var(--primary-rgb),.12), rgba(var(--primary-rgb),.04));
    border: 1px solid rgba(var(--primary-rgb),.2);
    box-shadow: 0 0 12px rgba(var(--primary-rgb),.1);
}

/* ── Inputs ── */
.input, input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="search"], input[type="datetime-local"],
textarea, select {
    width: 100%; padding: 10px 14px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); background: var(--bg-input);
    color: var(--text); outline: none; transition: all .25s;
    font-family: var(--font);
    backdrop-filter: blur(4px);
}
.input:focus, input:focus, textarea:focus, select:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb),.08), var(--glow-sm);
    background: rgba(0,0,0,.6);
}
textarea { resize: vertical; min-height: 80px; }
select { cursor: pointer; -webkit-appearance: none; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2322c55e' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
    padding-right: 32px;
}

.form-group { margin-bottom: 16px; }
.form-label {
    display: block; margin-bottom: 6px; font-size: 12px;
    color: var(--text-dim); font-weight: 500; text-transform: uppercase;
    letter-spacing: .8px; font-family: var(--mono);
}

/* ── Grid ── */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ── Flex ── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.text-center { text-align: center; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-dim { color: var(--text-dim); }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.mono { font-family: var(--mono); }
.w-full { width: 100%; }
.hidden { display: none !important; }
.glow-text { color: #ffffff; text-shadow: 0 0 10px rgba(255,255,255,.4); }

/* ── Tool Cards ── */
.tool-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px; cursor: pointer;
    transition: all .3s cubic-bezier(.4,0,.2,1);
    display: flex; flex-direction: column; gap: 8px;
    position: relative; overflow: hidden;
    backdrop-filter: blur(8px);
}
.tool-card::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(var(--primary-rgb),.03), transparent 60%);
    opacity: 0; transition: opacity .3s; pointer-events: none;
}
.tool-card::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(to right, transparent, rgba(var(--primary-rgb),.15), transparent);
    pointer-events: none;
}
.tool-card:hover {
    border-color: rgba(var(--primary-rgb),.35);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,.3), 0 0 20px rgba(var(--primary-rgb),.1);
}
.tool-card:hover::before { opacity: 1; }
.tool-card .tool-icon {
    width: 36px; height: 36px; border-radius: 8px;
    background: linear-gradient(135deg, rgba(var(--primary-rgb),.15), rgba(var(--primary-rgb),.05));
    display: flex; align-items: center; justify-content: center; font-size: 16px;
    border: 1px solid rgba(var(--primary-rgb),.15);
}
.tool-card .title { font-weight: 600; font-size: 14px; }
.tool-card .desc { font-size: 12px; color: var(--text-dim); line-height: 1.5; }

/* ── Table ── */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 13px; }
th {
    color: var(--text-muted); font-weight: 600; font-size: 11px; text-transform: uppercase;
    letter-spacing: 1px; font-family: var(--mono);
    background: rgba(var(--primary-rgb),.02);
}
tr { transition: background .15s; }
tr:hover td { background: var(--bg-hover); }

/* ── Stat Cards ── */
.stat-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 24px; text-align: center; position: relative; overflow: hidden;
    backdrop-filter: blur(8px); transition: all .3s;
}
.stat-card::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle at center, rgba(var(--primary-rgb),.04), transparent 40%);
    pointer-events: none;
}
.stat-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--glow-sm);
    transform: translateY(-2px);
}
.stat-card .value {
    font-size: 32px; font-weight: 700; color: var(--primary);
    font-family: var(--mono); text-shadow: 0 0 20px rgba(var(--primary-rgb),.3);
}
.stat-card .label { font-size: 11px; color: var(--text-muted); margin-top: 6px; text-transform: uppercase; letter-spacing: 1px; }

/* ── Toast ── */
#toast-container {
    position: fixed; top: 24px; right: 24px; z-index: 9999;
    display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.toast {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px 16px; border-radius: 12px;
    min-width: 270px; max-width: 360px;
    background: rgba(12, 12, 22, .92);
    border: 1px solid rgba(255,255,255,.07);
    -webkit-backdrop-filter: blur(24px) saturate(1.6);
    backdrop-filter: blur(24px) saturate(1.6);
    box-shadow: 0 12px 40px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.06);
    position: relative; overflow: hidden;
    animation: toastSlideIn .35s cubic-bezier(.21,1.02,.73,1) forwards;
    pointer-events: all;
}
.toast::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; border-radius: 12px 0 0 12px;
}
.toast.success::before { background: linear-gradient(180deg,#22c55e,#16a34a); }
.toast.error::before   { background: linear-gradient(180deg,#ef4444,#dc2626); }
.toast.info::before    { background: linear-gradient(180deg,#3b82f6,#2563eb); }
.toast.warning::before { background: linear-gradient(180deg,#f59e0b,#d97706); }
.toast-icon {
    width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 800;
}
.toast.success .toast-icon { background: rgba(34,197,94,.15); color: #22c55e; }
.toast.error   .toast-icon { background: rgba(239,68,68,.15);  color: #ef4444; }
.toast.info    .toast-icon { background: rgba(59,130,246,.15); color: #3b82f6; }
.toast.warning .toast-icon { background: rgba(245,158,11,.15); color: #f59e0b; }
.toast-body { flex: 1; min-width: 0; }
.toast-msg { font-size: 13px; font-weight: 500; color: #e8e8f0; line-height: 1.4; }
.toast-close {
    background: none; border: none; color: rgba(255,255,255,.25);
    cursor: pointer; font-size: 18px; padding: 0; line-height: 1;
    transition: color .2s; flex-shrink: 0; align-self: flex-start;
}
.toast-close:hover { color: #fff; }
/* progress bar */
.toast-bar {
    position: absolute; bottom: 0; left: 3px; right: 0; height: 2px;
    border-radius: 0 0 12px 0; transform-origin: left;
    animation: toastBar 3.4s linear forwards;
}
.toast.success .toast-bar { background: rgba(34,197,94,.6); }
.toast.error   .toast-bar { background: rgba(239,68,68,.6); }
.toast.info    .toast-bar { background: rgba(59,130,246,.6); }
.toast.warning .toast-bar { background: rgba(245,158,11,.6); }
@keyframes toastSlideIn {
    from { transform: translateX(110%) scale(.92); opacity: 0; }
    to   { transform: none; opacity: 1; }
}
@keyframes toastBar {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}
.toast-out {
    animation: toastSlideOut .3s ease-in forwards !important;
}
@keyframes toastSlideOut {
    to { transform: translateX(112%); opacity: 0; }
}

/* ── Badge ── */
.badge {
    display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600;
    letter-spacing: .3px;
}
.badge-primary { background: rgba(255,255,255,.08); color: #ffffff; border: 1px solid rgba(255,255,255,.25); }
.badge-danger { background: rgba(var(--danger-rgb),.12); color: var(--danger); border: 1px solid rgba(var(--danger-rgb),.2); }
.badge-success { background: rgba(var(--success-rgb),.12); color: var(--success); border: 1px solid rgba(var(--success-rgb),.2); }

/* ── Tabs ── */
.tabs {
    display: flex; border-bottom: 1px solid var(--border); margin-bottom: 20px;
    gap: 4px; padding: 0 4px;
}
.tab {
    padding: 11px 22px; cursor: pointer; font-size: 13px; color: var(--text-muted);
    border-bottom: 2px solid transparent; transition: all .25s;
    font-weight: 500; border-radius: 6px 6px 0 0;
}
.tab:hover { color: var(--text); background: var(--primary-faint); }
.tab.active {
    color: var(--primary); border-bottom-color: var(--primary);
    background: rgba(var(--primary-rgb),.05);
    text-shadow: 0 0 8px rgba(var(--primary-rgb),.3);
}

/* ── Auth Page ── */
.auth-page {
    display: flex; align-items: center; justify-content: center; min-height: 100vh;
    background: var(--bg); position: relative;
}
.auth-page::before {
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 50% 50% at 50% 30%, rgba(var(--primary-rgb),.1) 0%, transparent 60%),
        radial-gradient(ellipse 40% 40% at 70% 70%, rgba(var(--purple-rgb),.06) 0%, transparent 50%);
    pointer-events: none;
}
.auth-box {
    width: 420px; max-width: 95vw; position: relative; z-index: 1;
}
.auth-box .card {
    box-shadow: 0 20px 60px rgba(0,0,0,.5), 0 0 40px rgba(var(--primary-rgb),.05);
    border-color: rgba(var(--primary-rgb),.15);
}

/* ── Terminal Cursor ── */
.terminal-cursor::after {
    content: '▋'; margin-left: 2px; color: var(--primary);
    animation: cursor-blink 1s step-end infinite;
}
@keyframes cursor-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(var(--primary-rgb),.15); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(var(--primary-rgb),.3); }

/* ── Code Block ── */
.code-block {
    background: rgba(0,0,0,.5); border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 16px; font-family: var(--mono); font-size: 12px; overflow-x: auto;
    white-space: pre-wrap; word-break: break-all; max-height: 300px; overflow-y: auto;
    line-height: 1.7; color: rgba(var(--primary-rgb),.8);
}

/* ── Mobile ── */
.mobile-only { display: none; }
@media (max-width: 768px) {
    .sidebar {
        position: fixed; z-index: 100; height: 100vh; left: 0; top: 0;
        transform: translateX(-100%); transition: transform .3s cubic-bezier(.4,0,.2,1);
    }
    .sidebar.open { transform: none; box-shadow: 20px 0 60px rgba(0,0,0,.5); }
    .sidebar.collapsed { transform: translateX(-100%); }
    .mobile-only { display: inline-flex; }
    #page-content { padding: 16px; }
}

/* ── Encrypt Form ── */
.encrypt-form { max-width: 640px; }
.result-box {
    background: rgba(0,0,0,.5); border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 20px; margin-top: 16px; font-family: var(--mono); font-size: 12px;
    word-break: break-all; white-space: pre-wrap; max-height: 400px; overflow-y: auto;
    position: relative; color: rgba(var(--primary-rgb),.8); line-height: 1.7;
}
.copy-btn {
    position: absolute; top: 10px; right: 10px; padding: 5px 12px; font-size: 11px;
    background: rgba(var(--primary-rgb),.1); border: 1px solid rgba(var(--primary-rgb),.2);
    border-radius: 5px; color: var(--primary); cursor: pointer; transition: all .2s;
    font-weight: 500; font-family: var(--mono);
}
.copy-btn:hover {
    background: rgba(var(--primary-rgb),.2); box-shadow: var(--glow-sm);
}

/* ── Glow Line Separator ── */
.glow-line {
    height: 1px; border: none; margin: 24px 0;
    background: linear-gradient(to right, transparent, rgba(var(--primary-rgb),.3), transparent);
}

/* ── Loading Animation ── */
.loading-spinner {
    width: 24px; height: 24px; border: 2px solid var(--border);
    border-top-color: var(--primary); border-radius: 50%;
    animation: spin .8s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Pulse Dot ── */
.pulse-dot {
    width: 8px; height: 8px; border-radius: 50%; background: var(--primary);
    box-shadow: 0 0 8px rgba(var(--primary-rgb),.5);
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .5; transform: scale(.8); } }

/* ── Page Enter Animation ── */
#page-content > * {
    animation: pageIn .35s cubic-bezier(.21,1.02,.73,1);
}
@keyframes pageIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

/* ── Gradient Text ── */
.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--purple));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Hover Glow Effects ── */
.glow-hover { transition: all .3s; }
.glow-hover:hover { box-shadow: var(--glow-md); }

hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

/* ── Terminal Tool Output ── */
.t-out {
    background: rgba(0,0,0,.45); border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 18px 20px; font-family: var(--mono); font-size: 13px; line-height: 2;
    color: var(--text); max-height: 500px; overflow-y: auto;
}
.t-out .t-head {
    font-weight: 700; font-size: 15px; color: var(--primary);
    text-shadow: 0 0 8px rgba(var(--primary-rgb),.3);
}
.t-out .t-sep { color: rgba(var(--primary-rgb),.25); -webkit-user-select: none; user-select: none; }
.t-out .t-key { color: var(--text-muted); font-weight: 600; }
.t-out .t-val { color: var(--primary); }
.t-out .t-dim { color: var(--text-dim); font-style: italic; }
.t-out .t-ok { color: var(--success); font-weight: 600; }
.t-out .t-err { color: var(--danger); }
.t-out .t-warn { color: #f0ad4e; }
.t-out .t-section { color: var(--text-muted); font-weight: 700; margin-top: 4px; }
.t-out a { color: var(--primary); text-decoration: underline; }
.t-out a:hover { color: #fff; }
.t-row { display: flex; gap: 8px; align-items: baseline; }
.t-row .t-key { min-width: 120px; text-align: right; flex-shrink: 0; }
.t-row .t-key::after { content: ' :'; }
