/* ============================================
   Slay Station — Common Styles
   Light (default) + Dark Mode
   Material Icons · Hexagon BG · Glassmorphism
   ============================================ */

/* ─── LIGHT MODE (default) ────────────────── */
:root {
    --bg-primary: #f8f7f4;
    --bg-secondary: #efeee9;
    --bg-card: rgba(255,255,255,0.78);
    --bg-card-hover: #f5f3ef;
    --bg-card-solid: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #555555;
    --text-muted: #999999;
    --accent-yellow: #d4a000;
    --accent-orange: #e06610;
    --accent-amber: #c49a00;
    --accent-green: #16a34a;
    --accent-red: #dc2626;
    --gradient-1: linear-gradient(135deg, #f5c518, #f97316);
    --gradient-2: linear-gradient(135deg, #f97316, #ea580c);
    --gradient-subtle: linear-gradient(135deg, rgba(245,197,24,0.06), rgba(249,115,22,0.06));
    --border-color: rgba(0,0,0,0.07);
    --border-hover: rgba(230,180,0,0.35);
    --shadow-glow: 0 4px 24px rgba(249,115,22,0.10);
    --shadow-card: 0 1px 8px rgba(0,0,0,0.06);
    --shadow-card-hover: 0 8px 32px rgba(249,115,22,0.12);
    --nav-bg: rgba(255,255,255,0.82);
    --nav-border: rgba(0,0,0,0.06);
    --hex-color-1: rgba(245,197,24,0.15);
    --hex-color-2: rgba(249,115,22,0.12);
    --hex-color-3: rgba(245,197,24,0.08);
    --hex-blur: 60px;
    --hex-pattern-opacity: 0.03;
    --glass-bg: rgba(255,255,255,0.6);
    --glass-border: rgba(255,255,255,0.4);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    --font-main: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --nav-height: 48px;
    --max-width: 1280px;
    --transition-theme: 0.35s ease;
}

/* ─── DARK MODE ───────────────────────────── */
[data-theme="dark"] {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-card: rgba(26,26,26,0.82);
    --bg-card-hover: #242424;
    --bg-card-solid: #1a1a1a;
    --text-primary: #f5f5f5;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --accent-yellow: #f5c518;
    --accent-orange: #f97316;
    --accent-amber: #d4a810;
    --accent-green: #22c55e;
    --accent-red: #ef4444;
    --gradient-subtle: linear-gradient(135deg, rgba(245,197,24,0.04), rgba(249,115,22,0.04));
    --border-color: rgba(245,197,24,0.08);
    --border-hover: rgba(245,197,24,0.25);
    --shadow-glow: 0 0 30px rgba(249,115,22,0.12);
    --shadow-card: 0 2px 12px rgba(0,0,0,0.3);
    --shadow-card-hover: 0 8px 40px rgba(249,115,22,0.15);
    --nav-bg: rgba(10,10,10,0.88);
    --nav-border: rgba(245,197,24,0.06);
    --hex-color-1: rgba(245,197,24,0.08);
    --hex-color-2: rgba(249,115,22,0.06);
    --hex-color-3: rgba(245,197,24,0.04);
    --hex-blur: 70px;
    --hex-pattern-opacity: 0.04;
    --glass-bg: rgba(26,26,26,0.5);
    --glass-border: rgba(255,255,255,0.05);
}

/* ─── RESET ───────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    transition: background var(--transition-theme), color var(--transition-theme);
}
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ─── MATERIAL ICONS ──────────────────────── */
.mi {
    font-family: 'Material Symbols Rounded';
    font-weight: normal; font-style: normal;
    font-size: 20px; line-height: 1;
    letter-spacing: normal; text-transform: none;
    display: inline-block; white-space: nowrap;
    word-wrap: normal; direction: ltr;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: 'liga';
    vertical-align: middle;
}
.mi-sm { font-size: 16px; }
.mi-lg { font-size: 24px; }
.mi-xl { font-size: 32px; }

/* ─── HEXAGON BACKGROUND ──────────────────── */
body::before {
    content: '';
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    z-index: -2;
    background: var(--bg-primary);
    transition: background var(--transition-theme);
}
body::after {
    content: '';
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1; pointer-events: none;
    background:
        radial-gradient(ellipse 340px 340px at 6% 10%, var(--hex-color-1) 0%, transparent 70%),
        radial-gradient(ellipse 280px 280px at 90% 6%, var(--hex-color-2) 0%, transparent 70%),
        radial-gradient(ellipse 200px 200px at 12% 52%, var(--hex-color-3) 0%, transparent 70%),
        radial-gradient(ellipse 360px 360px at 80% 44%, var(--hex-color-1) 0%, transparent 70%),
        radial-gradient(ellipse 300px 300px at 20% 84%, var(--hex-color-2) 0%, transparent 70%),
        radial-gradient(ellipse 220px 220px at 92% 90%, var(--hex-color-3) 0%, transparent 70%),
        radial-gradient(ellipse 260px 260px at 50% 28%, var(--hex-color-1) 0%, transparent 70%);
    filter: blur(var(--hex-blur));
    animation: hexFloat 25s ease-in-out infinite alternate;
    transition: filter var(--transition-theme);
}
@keyframes hexFloat {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(-6px, 10px) scale(1.015); }
    100% { transform: translate(4px, -6px) scale(0.985); }
}

/* Hexagon wireframe pattern overlay */
.hex-pattern {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1; pointer-events: none;
    opacity: var(--hex-pattern-opacity);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100'%3E%3Cpath d='M28 66L0 50L0 16L28 0L56 16L56 50L28 66L28 100' fill='none' stroke='%23f5c518' stroke-width='1'/%3E%3Cpath d='M28 0L28 34L0 50L0 84L28 100L56 84L56 50L28 34' fill='none' stroke='%23f97316' stroke-width='0.5'/%3E%3C/svg%3E");
    background-size: 56px 100px;
    transition: opacity var(--transition-theme);
}

/* ─── NAVBAR ──────────────────────────────── */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px; height: var(--nav-height);
    background: var(--nav-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--nav-border);
    transition: background var(--transition-theme), border-color var(--transition-theme), box-shadow 0.3s;
}
.navbar.scrolled {
    box-shadow: 0 1px 12px rgba(0,0,0,0.06);
}
[data-theme="dark"] .navbar.scrolled {
    box-shadow: 0 1px 12px rgba(0,0,0,0.3);
}
.logo {
    display: flex; align-items: center; gap: 8px;
    text-decoration: none; color: var(--text-primary);
    font-family: var(--font-main); font-weight: 700; font-size: 1.15rem;
}
.logo-icon svg { width: 28px; height: 28px; }
.logo .slay { color: var(--accent-yellow); }
.logo .station { color: var(--accent-orange); }
.nav-right { display: flex; align-items: center; gap: 6px; }
.nav-link {
    color: var(--text-secondary); text-decoration: none; font-size: 0.78rem;
    font-weight: 500; padding: 6px 10px; border-radius: var(--radius-sm);
    transition: all 0.2s; display: inline-flex; align-items: center; gap: 4px;
}
.nav-link:hover { color: var(--accent-yellow); background: rgba(245,197,24,0.08); }
.nav-link .mi { font-size: 16px; }

/* ─── THEME TOGGLE ────────────────────────── */
.theme-toggle {
    width: 38px; height: 38px; border-radius: 50%;
    border: 1.5px solid var(--border-color);
    background: var(--bg-card-solid); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-card);
    color: var(--accent-yellow);
    position: relative; overflow: hidden;
}
.theme-toggle .mi { font-size: 20px; transition: transform 0.4s ease, opacity 0.3s ease; }
.theme-toggle:hover {
    border-color: var(--accent-yellow);
    transform: rotate(15deg) scale(1.08);
    box-shadow: 0 0 16px rgba(245,197,24,0.2);
}

/* ─── SEARCH ──────────────────────────────── */
.nav-center {
    flex: 1;
    display: flex;
    justify-content: center;
    max-width: 480px;
    margin: 0 auto;
}
.search-box {
    position: relative; display: flex; align-items: center;
    background: var(--bg-card-solid); border: 1px solid var(--border-color);
    border-radius: var(--radius-full); padding: 4px 12px;
    transition: all 0.2s; box-shadow: var(--shadow-card);
    width: 100%;
}
.search-box:focus-within { border-color: var(--accent-yellow); box-shadow: 0 0 0 3px rgba(245,197,24,0.1); }
.search-icon { width: 16px; height: 16px; color: var(--text-muted); flex-shrink: 0; }
.search-box input {
    flex: 1; border: none; background: none; outline: none;
    font-size: 0.8rem; color: var(--text-primary); padding: 0 8px; font-family: var(--font-body);
}
.search-box input::placeholder { color: var(--text-muted); }
.search-shortcut {
    font-size: 0.65rem; padding: 1px 5px; background: var(--bg-secondary);
    border: 1px solid var(--border-color); border-radius: 3px; color: var(--text-muted); font-family: monospace;
}
.search-results {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0;
    background: var(--bg-card-solid); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); box-shadow: 0 16px 48px rgba(0,0,0,0.12);
    max-height: 360px; overflow-y: auto; display: none; z-index: 1001;
}
[data-theme="dark"] .search-results { box-shadow: 0 16px 48px rgba(0,0,0,0.6); }
.search-results.active { display: block; }
.search-result-item {
    display: flex; align-items: center; gap: 10px; padding: 10px 14px;
    text-decoration: none; color: var(--text-primary); transition: background 0.15s;
    border-bottom: 1px solid var(--border-color);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--bg-card-hover); }
.search-result-item .result-icon { font-size: 1.3rem; }
.search-result-item .result-info h4 { font-size: 0.8rem; font-weight: 600; }
.search-result-item .result-info p { font-size: 0.7rem; color: var(--text-muted); }
.search-result-item .result-cat {
    margin-left: auto; font-size: 0.65rem; padding: 2px 7px;
    background: var(--bg-secondary); border-radius: var(--radius-full); color: var(--text-muted);
}

/* ─── MOBILE MENU ─────────────────────────── */
.menu-toggle {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 8px;
}
.menu-toggle span { width: 20px; height: 2px; background: var(--accent-yellow); border-radius: 2px; }
.mobile-menu {
    display: none; position: fixed; top: var(--nav-height); left: 0; right: 0; bottom: 0;
    background: var(--bg-primary); z-index: 999; padding: 16px; overflow-y: auto;
}
.mobile-menu.open { display: block; }
.mobile-search input {
    width: 100%; padding: 10px 14px; border: 1px solid var(--border-color);
    border-radius: var(--radius-md); font-size: 0.9rem; background: var(--bg-secondary);
    color: var(--text-primary); outline: none; margin-bottom: 16px;
}
.mobile-categories { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.mobile-links a {
    display: block; padding: 10px 0; color: var(--text-secondary);
    text-decoration: none; border-bottom: 1px solid var(--border-color); font-weight: 500; font-size: 0.85rem;
}

/* ─── GRADIENT TEXT ────────────────────────── */
.gradient-text {
    background: var(--gradient-1); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; background-clip: text;
}

/* ─── BUTTONS ─────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 20px; border: none; border-radius: var(--radius-md);
    font-family: var(--font-main); font-size: 0.85rem; font-weight: 600;
    cursor: pointer; transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none; color: #000; position: relative; overflow: hidden;
}
.btn .mi { font-size: 18px; }
.btn::after {
    content: ''; position: absolute; inset: 0;
    background: rgba(255,255,255,0); transition: background 0.2s;
}
.btn:active::after { background: rgba(0,0,0,0.08); }
.btn-primary {
    background: var(--gradient-1);
    box-shadow: 0 4px 16px rgba(249,115,22,0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(249,115,22,0.35); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
    background: var(--bg-card-solid); border: 1px solid var(--border-color);
    color: var(--text-primary);
}
.btn-secondary:hover { background: var(--bg-card-hover); border-color: var(--accent-yellow); transform: translateY(-1px); }
.btn-secondary:active { transform: translateY(0); }

/* ─── FORM ────────────────────────────────── */
label { display: block; font-size: 0.8rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 6px; }
input[type="text"],input[type="number"],input[type="date"],input[type="email"],select,textarea {
    width: 100%; padding: 10px 14px; background: var(--bg-primary);
    border: 1px solid var(--border-color); border-radius: var(--radius-md);
    color: var(--text-primary); font-family: var(--font-body); font-size: 0.9rem;
    transition: all 0.2s ease; outline: none;
}
input:focus,select:focus,textarea:focus {
    border-color: var(--accent-yellow);
    box-shadow: 0 0 0 3px rgba(245,197,24,0.12);
}
/* Floating label effect for filled inputs */
input:not(:placeholder-shown),select:not([value=""]),textarea:not(:placeholder-shown) {
    border-color: rgba(245,197,24,0.2);
}
/* Error state */
input:invalid:not(:placeholder-shown):not(:focus) {
    border-color: var(--accent-red);
    box-shadow: 0 0 0 3px rgba(239,68,68,0.08);
}

/* ─── CARD (glassmorphism) ────────────────── */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg); padding: 24px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-card);
    position: relative;
}
.card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-card-hover);
}

/* ─── RESULT BOX ──────────────────────────── */
.result-box {
    background: var(--gradient-subtle);
    border: 1px solid rgba(245,197,24,0.15); border-radius: var(--radius-lg);
    padding: 24px; text-align: center; margin-top: 20px;
}
.result-box .result-value {
    font-family: var(--font-main); font-size: 2.5rem; font-weight: 700;
    background: var(--gradient-1); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* ─── AD ──────────────────────────────────── */
.ad-container { max-width: var(--max-width); margin: 16px auto; padding: 0 24px; text-align: center; }

/* ─── TOOL PAGE ───────────────────────────── */
.tool-page {
    position: relative; min-height: 100vh;
    padding: calc(var(--nav-height) + 16px) 20px 32px; max-width: 900px; margin: 0 auto;
}
.tool-header { text-align: center; margin-bottom: 24px; }
.tool-header .tool-emoji { font-size: 2.5rem; margin-bottom: 8px; display: block; }
.tool-header .tool-icon-wrap {
    width: 56px; height: 56px; border-radius: 16px;
    background: var(--gradient-subtle); border: 1px solid var(--border-color);
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 10px;
}
.tool-header .tool-icon-wrap .mi { font-size: 28px; color: var(--accent-yellow); }
.tool-header h1 { font-family: var(--font-main); font-size: 1.8rem; font-weight: 700; margin-bottom: 6px; }
.tool-header p { color: var(--text-secondary); font-size: 0.9rem; max-width: 500px; margin: 0 auto; }

/* ─── FOOTER ──────────────────────────────── */
.footer {
    background: var(--bg-secondary); border-top: 1px solid var(--border-color);
    padding: 32px 24px 16px; margin-top: 32px;
    transition: background var(--transition-theme);
}
.footer-grid { max-width: var(--max-width); margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-col .footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1rem; margin-bottom: 10px; font-family: var(--font-main); }
.footer-col p { color: var(--text-muted); font-size: 0.8rem; line-height: 1.6; }
.footer-col h4 { font-size: 0.8rem; font-weight: 700; margin-bottom: 10px; color: var(--accent-yellow); }
.footer-col a { display: block; color: var(--text-muted); text-decoration: none; font-size: 0.78rem; padding: 3px 0; transition: color 0.2s; }
.footer-col a:hover { color: var(--accent-orange); }
.footer-bottom { max-width: var(--max-width); margin: 20px auto 0; padding-top: 16px; border-top: 1px solid var(--border-color); text-align: center; }
.footer-bottom p { color: var(--text-muted); font-size: 0.72rem; }
.footer-bottom a { color: var(--accent-orange); text-decoration: none; }

/* ─── FAQ ──────────────────────────────────── */
.faq-section { max-width: var(--max-width); margin: 32px auto; padding: 0 24px; }
.faq-section h2 { font-size: 1.4rem; font-weight: 700; text-align: center; margin-bottom: 24px; font-family: var(--font-main); }
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.faq-item { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 14px 18px; }
.faq-item summary { font-weight: 600; font-size: 0.85rem; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.faq-item summary::after { content: '+'; font-size: 1.1rem; color: var(--accent-yellow); }
.faq-item[open] summary::after { content: '\2212'; }
.faq-item p { margin-top: 10px; font-size: 0.8rem; color: var(--text-secondary); line-height: 1.6; }

/* ─── NETWORK STATUS BADGE ────────────────── */
.net-badge {
    position: fixed; top: calc(var(--nav-height) + 8px); right: 16px;
    z-index: 9999;
    display: flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: var(--radius-full);
    font-size: 0.72rem; font-weight: 600; font-family: var(--font-main);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
    transform: translateX(calc(100% + 20px));
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
    opacity: 0; pointer-events: none;
}
.net-badge.net-show {
    transform: translateX(0);
    opacity: 1; pointer-events: auto;
}
.net-badge.net-online {
    background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.3);
    color: #16a34a;
}
[data-theme="dark"] .net-badge.net-online {
    background: rgba(34,197,94,0.15); color: #22c55e;
}
.net-badge.net-slow {
    background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.3);
    color: #d97706;
}
[data-theme="dark"] .net-badge.net-slow {
    background: rgba(245,158,11,0.15); color: #f59e0b;
}
.net-badge.net-offline {
    background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.3);
    color: #dc2626;
}
[data-theme="dark"] .net-badge.net-offline {
    background: rgba(239,68,68,0.15); color: #ef4444;
}
/* Offline body indicator — subtle top bar (injected via JS as #offlineBar) */
body.is-offline #offlineBar {
    display: block;
}
#offlineBar {
    display: none;
    position: fixed; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, #ef4444, #f59e0b, #ef4444);
    background-size: 200% 100%;
    animation: offlineBar 2s linear infinite;
    z-index: 10001; pointer-events: none;
}
@keyframes offlineBar {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

/* ─── TOAST ───────────────────────────────── */
.toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(100px);
    background: var(--bg-card-solid); border: 1px solid var(--accent-yellow); color: var(--text-primary);
    padding: 12px 24px; border-radius: var(--radius-md); font-size: 0.85rem;
    z-index: 10000; transition: transform 0.4s ease; box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    display: flex; align-items: center; gap: 8px;
}
[data-theme="dark"] .toast { box-shadow: 0 8px 32px rgba(0,0,0,0.5); }
.toast.show { transform: translateX(-50%) translateY(0); }

/* ─── SKELETON LOADING ────────────────────── */
.skeleton {
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-card-hover) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skeleton-card {
    padding: 16px; border-radius: var(--radius-md);
    border: 1px solid var(--border-color); margin-bottom: 10px;
}
.skeleton-line { height: 12px; margin-bottom: 8px; border-radius: 6px; }
.skeleton-line.w-80 { width: 80%; }
.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-40 { width: 40%; }
.skeleton-line.w-30 { width: 30%; }
.skeleton-line.h-16 { height: 16px; }

/* ─── SCROLL TO TOP ───────────────────────── */
.scroll-top {
    position: fixed; bottom: 24px; right: 24px; z-index: 999;
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--gradient-1); border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 16px rgba(249,115,22,0.3);
    opacity: 0; transform: translateY(16px) scale(0.8);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none; color: #000;
}
.scroll-top.visible {
    opacity: 1; transform: translateY(0) scale(1); pointer-events: auto;
}
.scroll-top:hover {
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 6px 24px rgba(249,115,22,0.4);
}
.scroll-top .mi { font-size: 20px; }

/* ─── BREADCRUMB ──────────────────────────── */
.breadcrumb {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.72rem; color: var(--text-muted);
    margin-bottom: 12px; flex-wrap: wrap;
}
.breadcrumb a {
    color: var(--text-muted); text-decoration: none;
    transition: color 0.2s;
}
.breadcrumb a:hover { color: var(--accent-yellow); }
.breadcrumb .sep { color: var(--border-color); }
.breadcrumb .current { color: var(--text-secondary); font-weight: 500; }

/* ─── HELPERS ─────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.text-center { text-align: center; }

@keyframes fadeInUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

/* ─── SMOOTH PAGE TRANSITIONS ─────────────── */
.tool-page { animation: fadeInUp 0.4s ease-out; }
.card { animation: scaleIn 0.3s ease-out; }

/* ─── ACCESSIBILITY ───────────────────────── */
.btn:focus-visible, .theme-toggle:focus-visible, .nav-link:focus-visible, .cat-chip:focus-visible {
    outline: 2px solid var(--accent-yellow);
    outline-offset: 2px;
}
a:focus-visible { outline: 2px solid var(--accent-yellow); outline-offset: 2px; border-radius: 4px; }
input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: none;
    border-color: var(--accent-yellow);
    box-shadow: 0 0 0 3px rgba(245,197,24,0.15);
}

/* Skip to content link for screen readers */
.skip-link {
    position: absolute; top: -100%; left: 16px;
    background: var(--gradient-1); color: #000;
    padding: 8px 16px; border-radius: var(--radius-md);
    font-weight: 600; font-size: 0.85rem; z-index: 10000;
    text-decoration: none;
    transition: top 0.2s;
}
.skip-link:focus { top: 8px; }

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .tool-page, .card { animation: none; }
}

/* Disable hover transforms on touch devices */
@media (hover: none) {
    .card:hover { transform: none; box-shadow: var(--shadow-card); }
    .btn-primary:hover { transform: none; }
    .index-card:hover { transform: none; }
    .job-card:hover { transform: none; }
    .weather-card:hover { transform: none; }
    .tool-card:hover { transform: none; }
    .theme-toggle:hover { transform: none; }
}

/* ─── RESPONSIVE ──────────────────────────── */
@media (max-width: 1024px) { .footer-grid { grid-template-columns: 1fr 1fr; } .faq-grid { grid-template-columns: 1fr; } }
@media (max-width: 768px) {
    .navbar { padding: 0 14px; }
    .nav-center { display: none; }
    .nav-right .nav-link { display: none; }
    .menu-toggle { display: flex; }
    .footer-grid { grid-template-columns: 1fr; gap: 20px; }
    .tool-page { padding: calc(var(--nav-height) + 12px) 14px 32px; }
    .tool-header h1 { font-size: 1.4rem; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .scroll-top { bottom: 16px; right: 16px; width: 36px; height: 36px; }
}

/* ─── PWA INSTALL BANNER ──────────────────── */
.install-banner {
    position: fixed; bottom: 0; left: 0; right: 0;
    z-index: 9998;
    background: var(--bg-card-solid);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 32px rgba(0,0,0,0.12);
    padding: 16px 20px;
    display: flex; align-items: center; gap: 14px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
[data-theme="dark"] .install-banner {
    box-shadow: 0 -4px 32px rgba(0,0,0,0.5);
}
.install-banner.visible {
    transform: translateY(0);
}
.install-banner-icon {
    width: 48px; height: 48px; border-radius: 12px;
    background: var(--gradient-1);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.install-banner-icon svg { width: 28px; height: 28px; }
.install-banner-text {
    flex: 1; min-width: 0;
}
.install-banner-text h3 {
    font-family: var(--font-main);
    font-size: 0.9rem; font-weight: 700;
    margin-bottom: 2px;
    color: var(--text-primary);
}
.install-banner-text p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
}
.install-banner-actions {
    display: flex; align-items: center; gap: 8px;
    flex-shrink: 0;
}
.install-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 18px; border: none; border-radius: var(--radius-full);
    background: var(--gradient-1); color: #000;
    font-family: var(--font-main); font-size: 0.8rem; font-weight: 700;
    cursor: pointer; transition: all 0.25s;
    box-shadow: 0 4px 16px rgba(249,115,22,0.25);
    white-space: nowrap;
}
.install-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(249,115,22,0.35);
}
.install-btn .mi { font-size: 18px; }
.install-dismiss {
    width: 32px; height: 32px; border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); transition: all 0.2s;
    flex-shrink: 0;
}
.install-dismiss:hover {
    border-color: var(--accent-red);
    color: var(--accent-red);
    background: rgba(239,68,68,0.08);
}
.install-dismiss .mi { font-size: 18px; }

/* iOS install instructions modal */
.ios-install-modal {
    position: fixed; inset: 0; z-index: 10001;
    display: none; align-items: flex-end; justify-content: center;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    padding: 16px;
}
.ios-install-modal.visible {
    display: flex;
}
.ios-install-sheet {
    background: var(--bg-card-solid);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 24px 20px 32px;
    max-width: 400px; width: 100%;
    text-align: center;
    animation: slideUp 0.35s ease-out;
}
@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.ios-install-sheet h3 {
    font-family: var(--font-main);
    font-size: 1.1rem; font-weight: 700;
    margin-bottom: 16px;
}
.ios-install-steps {
    text-align: left; padding: 0;
    list-style: none; margin: 0 0 20px;
}
.ios-install-steps li {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem; color: var(--text-secondary);
}
.ios-install-steps li:last-child { border-bottom: none; }
.ios-install-steps .step-num {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--gradient-1); color: #000;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.8rem; flex-shrink: 0;
}
.ios-install-sheet .ios-close-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 28px; border: none; border-radius: var(--radius-full);
    background: var(--bg-secondary); color: var(--text-primary);
    font-family: var(--font-main); font-size: 0.85rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
}
.ios-install-sheet .ios-close-btn:hover {
    background: var(--bg-card-hover);
}

/* Nav install button (persistent after banner dismissed) */
.nav-install-btn {
    display: none; align-items: center; gap: 5px;
    padding: 5px 12px; border: 1.5px solid var(--accent-yellow);
    border-radius: var(--radius-full);
    background: rgba(245,197,24,0.08); color: var(--accent-yellow);
    font-family: var(--font-main); font-size: 0.72rem; font-weight: 700;
    cursor: pointer; transition: all 0.25s;
    text-decoration: none; white-space: nowrap;
}
.nav-install-btn:hover {
    background: rgba(245,197,24,0.15);
    box-shadow: 0 0 12px rgba(245,197,24,0.2);
}
.nav-install-btn .mi { font-size: 16px; }
.nav-install-btn.show { display: inline-flex; }

@media (max-width: 768px) {
    .install-banner {
        flex-wrap: wrap; gap: 10px;
        padding: 14px 16px;
    }
    .install-banner-icon { width: 40px; height: 40px; border-radius: 10px; }
    .install-banner-icon svg { width: 22px; height: 22px; }
    .install-banner-text h3 { font-size: 0.82rem; }
    .install-banner-text p { font-size: 0.7rem; }
    .install-btn { padding: 8px 14px; font-size: 0.75rem; }
    .nav-install-btn { padding: 4px 10px; font-size: 0.68rem; }
}
