/* ==========================================
   toolsio.click  Professional Theme v2
   ========================================== */
:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --primary-darker: #047857;
    --primary-light: #d1fae5;
    --primary-50: #ecfdf5;
    --bg: #f0f4f8;
    --white: #ffffff;
    --text: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --surface: #ffffff;
    --surface-hover: #f8fafc;
    --surface-glass: rgba(255, 255, 255, 0.75);
    --surface-glass-hover: rgba(255, 255, 255, 0.9);
    --gradient-primary: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-hero: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 50%, #f0fdf4 100%);
    --gradient-dark: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --shadow-xs: 0 1px 2px rgba(0,0,0,.04);
    --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.04);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.08), 0 8px 10px -6px rgba(0,0,0,.04);
    --shadow-glow: 0 0 20px rgba(16,185,129,.15);
    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --max-w: 1280px;
    --sidebar-w: 280px;
    --header-h: 64px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
button, input, textarea, select { font-family: inherit; font-size: inherit; }
img { max-width: 100%; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* ===== LOADING OVERLAY ===== */
.loading-overlay { display:none; position:fixed; inset:0; background:rgba(15,23,42,.5); backdrop-filter:blur(4px); z-index:9999; justify-content:center; align-items:center; flex-direction:column; gap:1rem; }
.loading-overlay.active { display:flex; }
.loading-spinner { width:44px; height:44px; border:3px solid rgba(255,255,255,.2); border-top-color:var(--primary); border-radius:50%; animation:spin .7s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
#loadingText { color:#fff; font-size:.9rem; font-weight:500; background:rgba(0,0,0,.3); padding:.35rem 1rem; border-radius:var(--radius-full); }

/* ===== TOAST ===== */
.toast { position:fixed; bottom:2rem; left:50%; transform:translateX(-50%) translateY(120px); padding:.75rem 1.5rem; border-radius:var(--radius-full); color:#fff; font-weight:600; font-size:.88rem; z-index:10000; transition:transform .4s cubic-bezier(0.34,1.56,0.64,1); box-shadow:var(--shadow-xl); display:flex; align-items:center; gap:.5rem; }
.toast.show { transform:translateX(-50%) translateY(0); }
.toast.success { background:var(--primary); }
.toast.error { background:#ef4444; }
.toast i { font-size:1rem; }

/* ===== HEADER ===== */
.header { background:var(--surface-glass); backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px); border-bottom:1px solid var(--border); position:sticky; top:0; z-index:100; height:var(--header-h); }
.header-inner { max-width:1440px; margin:0 auto; padding:0 1.5rem; height:100%; display:flex; align-items:center; gap:1.5rem; }
.hamburger { display:none; background:none; border:none; font-size:1.25rem; color:var(--text); cursor:pointer; padding:.5rem; border-radius:var(--radius-sm); transition:var(--transition); }
.hamburger:hover { background:var(--surface-hover); }
.logo { display:flex; align-items:center; gap:.6rem; font-weight:800; font-size:1.3rem; letter-spacing:-.5px; color:var(--text); flex-shrink:0; }
.logo img { width:32px; height:32px; }
.logo i { color:var(--primary); font-size:1.3rem; }
.nav-links { display:flex; gap:.25rem; align-items:center; margin-left:auto; }
.nav-links a { font-size:.875rem; font-weight:500; color:var(--text-muted); transition:var(--transition); display:flex; align-items:center; gap:.4rem; padding:.45rem .875rem; border-radius:var(--radius-sm); }
.nav-links a:hover { color:var(--text); background:var(--surface-hover); }
.nav-links a.active { color:var(--primary); background:var(--primary-50); }

/* ===== MOBILE DRAWER ===== */
.mobile-drawer { display:none; position:fixed; inset:0; z-index:200; }
.mobile-drawer.open { display:block; }
.drawer-overlay { position:absolute; inset:0; background:rgba(15,23,42,.5); backdrop-filter:blur(2px); animation:fadeIn .2s ease; }
.drawer-panel { position:absolute; left:0; top:0; bottom:0; width:300px; background:var(--white); box-shadow:var(--shadow-xl); overflow-y:auto; animation:slideIn .3s cubic-bezier(0.32,0.72,0,1); }
@keyframes slideIn { from { transform:translateX(-100%); } to { transform:translateX(0); } }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
.drawer-header { display:flex; justify-content:space-between; align-items:center; padding:1.25rem 1.5rem; border-bottom:1px solid var(--border); }
.drawer-header .logo { font-size:1.1rem; }
.drawer-header button { background:none; border:none; font-size:1.2rem; cursor:pointer; color:var(--text-muted); padding:.25rem; border-radius:var(--radius-xs); }
.drawer-header button:hover { background:var(--surface-hover); }
.drawer-panel > a { display:flex; align-items:center; gap:.75rem; padding:.75rem 1.5rem; color:var(--text-secondary); font-weight:500; font-size:.9rem; transition:var(--transition); }
.drawer-panel > a:hover { background:var(--primary-50); color:var(--primary-dark); }
.drawer-divider { height:1px; background:var(--border-light); margin:.5rem 0; }
.drawer-label { padding:.5rem 1.5rem; font-size:.7rem; font-weight:700; text-transform:uppercase; letter-spacing:.8px; color:var(--text-light); }

/* ===== HERO ===== */
.hero-section { padding:3rem 1.5rem 2rem; text-align:center; background:var(--gradient-hero); position:relative; overflow:hidden; }
.hero-section::before { content:''; position:absolute; top:-200px; right:-200px; width:500px; height:500px; background:radial-gradient(circle, rgba(16,185,129,.15), transparent 70%); pointer-events:none; animation: float 15s ease-in-out infinite alternate; }
.hero-section::after { content:''; position:absolute; bottom:-150px; left:-150px; width:400px; height:400px; background:radial-gradient(circle, rgba(5,150,105,.12), transparent 70%); pointer-events:none; animation: float 12s ease-in-out infinite alternate-reverse; }
@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, -40px) scale(1.1); }
    100% { transform: translate(-20px, 20px) scale(0.9); }
}
.hero-inner { max-width:680px; margin:0 auto; position:relative; }
.hero-badge { display:inline-flex; align-items:center; gap:.5rem; background:var(--white); color:var(--primary-dark); padding:.4rem 1rem; border-radius:var(--radius-full); font-size:.8rem; font-weight:600; margin-bottom:1.25rem; box-shadow:var(--shadow-sm); border:1px solid var(--primary-light); }
.hero-badge i { font-size:.7rem; }
.gradient-text { background:var(--gradient-primary); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }
.hero-section h1 { font-size:2.5rem; font-weight:800; line-height:1.1; letter-spacing:-.03em; margin-bottom:.75rem; }
.hero-section p { color:var(--text-muted); font-size:1.05rem; max-width:480px; margin:0 auto 1.5rem; line-height:1.7; }
.hero-search { display:flex; align-items:center; background:var(--white); border:2px solid var(--border); border-radius:var(--radius-lg); padding:0 1rem; max-width:460px; margin:0 auto 1.5rem; transition:var(--transition); box-shadow:var(--shadow-md); }
.hero-search:focus-within { border-color:var(--primary); box-shadow:var(--shadow-glow); }
.hero-search i { color:var(--text-light); }
.hero-search input { border:none; outline:none; padding:.8rem; flex:1; background:transparent; font-size:.9rem; color:var(--text); }
.hero-search input::placeholder { color:var(--text-light); }
.hero-stats { display:flex; justify-content:center; gap:2rem; }
.hero-stats div { text-align:center; }
.hero-stats strong { display:block; font-size:1.35rem; font-weight:800; color:var(--text); }
.hero-stats span { font-size:.78rem; color:var(--text-light); font-weight:500; }

/* ===== AD BANNERS ===== */
.ad-banner { background:var(--white); border:1.5px dashed var(--border); border-radius:var(--radius-md); text-align:center; padding:1rem; margin:1rem auto; max-width:728px; min-height:90px; display:flex; align-items:center; justify-content:center; transition:var(--transition); }
.ad-banner:hover { border-color:var(--text-light); }
.ad-banner span { color:var(--text-light); font-size:.75rem; font-weight:500; letter-spacing:.3px; text-transform:uppercase; }
.ad-banner-sm { max-width:468px; min-height:60px; }
.ad-sidebar-ad { max-width:260px; margin:.75rem auto; padding:.75rem; }
.ad-inline { background:var(--white); border:1.5px dashed var(--border); border-radius:var(--radius-md); padding:1rem; margin:1.5rem auto; max-width:728px; text-align:center; min-height:100px; display:flex; align-items:center; justify-content:center; }
.ad-inline span { color:var(--text-light); font-size:.75rem; font-weight:500; letter-spacing:.3px; text-transform:uppercase; }

/* ===== MAIN LAYOUT ===== */
.main-layout { max-width:1440px; margin:0 auto; display:flex; padding:0 1rem 3rem; gap:0; }

/* ===== SIDEBAR ===== */
.sidebar { width:var(--sidebar-w); flex-shrink:0; position:sticky; top:calc(var(--header-h) + 8px); height:calc(100vh - var(--header-h) - 16px); background:var(--surface-glass); backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px); border:1px solid var(--border); border-radius:var(--radius-lg); overflow:hidden; display:flex; flex-direction:column; box-shadow:var(--shadow-sm); margin-top:8px; }
.sidebar-close { display:none; background:none; border:none; font-size:1.1rem; cursor:pointer; padding:.6rem; text-align:right; color:var(--text-muted); border-bottom:1px solid var(--border-light); }
.sidebar-scroll { overflow-y:auto; flex:1; padding:.75rem .5rem; }
.sb-group { margin-bottom:.25rem; }
.sb-label { font-size:.65rem; font-weight:700; text-transform:uppercase; letter-spacing:.7px; color:var(--text-light); padding:.5rem .75rem .25rem; display:flex; align-items:center; gap:.35rem; }
.sb-link { display:flex; align-items:center; gap:.55rem; padding:.4rem .75rem; border-radius:var(--radius-sm); font-size:.82rem; font-weight:500; color:var(--text-muted); transition:var(--transition); cursor:pointer; }
.sb-link:hover { background:var(--primary-50); color:var(--primary-dark); }
.sb-link.active { background:var(--primary); color:#fff; box-shadow:var(--shadow-sm); }
.sb-link i { width:16px; text-align:center; font-size:.8rem; }

/* ===== CONTENT AREA ===== */
.content-area { flex:1; min-width:0; margin-left:1rem; }

/* ===== TOOL PANELS ===== */
.tool-panel { display:none; padding:1.5rem; }
.tool-panel.active { display:block; animation:panelIn .35s cubic-bezier(0.32,0.72,0,1); }
@keyframes panelIn { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
.panel-header { margin-bottom:1.5rem; }
.panel-header-top { display:flex; align-items:center; gap:.75rem; margin-bottom:.25rem; }
.panel-header h2 { font-size:1.4rem; font-weight:700; display:flex; align-items:center; gap:.6rem; flex:1; }
.panel-header h2 i { color:var(--primary); font-size:1.2rem; }
.panel-header p { color:var(--text-muted); font-size:.88rem; margin-top:.25rem; }
.back-btn { display:inline-flex; align-items:center; gap:.4rem; padding:.45rem .9rem; background:var(--white); border:1px solid var(--border); border-radius:var(--radius-sm); font-size:.82rem; font-weight:500; cursor:pointer; color:var(--text-muted); transition:var(--transition); box-shadow:var(--shadow-xs); }
.back-btn:hover { background:var(--surface-hover); color:var(--text); border-color:var(--text-light); }

/* ===== TOOL GRID ===== */
.filter-bar { display:flex; flex-wrap:wrap; gap:.4rem; margin-bottom:1.25rem; }
.fchip { padding:.4rem .9rem; border-radius:var(--radius-full); border:1px solid var(--border); background:var(--white); color:var(--text-muted); font-size:.8rem; font-weight:500; cursor:pointer; transition:var(--transition); display:flex; align-items:center; gap:.35rem; }
.fchip:hover { border-color:var(--primary); color:var(--primary); background:var(--primary-50); }
.fchip.active { background:var(--gradient-primary); color:#fff; border-color:transparent; box-shadow:0 2px 8px rgba(16,185,129,.3); }
.tool-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); gap:.875rem; perspective: 1000px; }
.tcard { background:var(--surface-glass); backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px); border:1px solid var(--border); border-radius:var(--radius-md); padding:1.1rem; cursor:pointer; transition:border-color 0.3s, box-shadow 0.3s, transform 0.1s; display:flex; align-items:flex-start; gap:.85rem; position:relative; overflow:hidden; transform-style: preserve-3d; }
.tcard::before { content:''; position:absolute; inset:0; background:var(--gradient-primary); opacity:0; transition:opacity .3s; pointer-events:none; }
.tcard::after { content: ''; position: absolute; top: var(--y, 50%); left: var(--x, 50%); transform: translate(-50%, -50%); width: 250px; height: 250px; background: radial-gradient(circle closest-side, rgba(16, 185, 129, 0.15), transparent); opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.tcard:hover { border-color:var(--primary); box-shadow:var(--shadow-lg), var(--shadow-glow); background:var(--surface-glass-hover); z-index: 2; }
.tcard:hover::after { opacity: 1; }
.tcard:hover::before { opacity:.02; }
.tcard-icon { width:42px; height:42px; border-radius:var(--radius-sm); display:flex; align-items:center; justify-content:center; font-size:1rem; flex-shrink:0; }
.tcard-icon.blue { background:#dbeafe; color:#2563eb; }
.tcard-icon.pink { background:#fce7f3; color:#db2777; }
.tcard-icon.purple { background:#ede9fe; color:#7c3aed; }
.tcard-icon.teal { background:#ccfbf1; color:#0d9488; }
.tcard-icon.red { background:#fee2e2; color:#dc2626; }
.tcard-icon.indigo { background:#e0e7ff; color:#4f46e5; }
.tcard-icon.green { background:#d1fae5; color:#059669; }
.tcard-icon.amber { background:#fef3c7; color:#d97706; }
.tcard-icon.orange { background:#ffedd5; color:#ea580c; }
.tcard-icon.cyan { background:#cffafe; color:#0891b2; }
.tcard-icon.emerald { background:#d1fae5; color:#10b981; }
.tcard-icon.slate { background:#f1f5f9; color:#475569; }
.tcard-body { flex:1; min-width:0; position:relative; z-index:1; }
.tcard-body h3 { font-size:.88rem; font-weight:600; margin-bottom:.15rem; color:var(--text); }
.tcard-body p { font-size:.78rem; color:var(--text-muted); line-height:1.4; }
.tcat { position:absolute; top:8px; right:8px; font-size:.6rem; font-weight:700; text-transform:uppercase; letter-spacing:.4px; padding:2px 7px; border-radius:var(--radius-full); }
.tcat.email { background:#dbeafe; color:#2563eb; }
.tcat.image { background:#fce7f3; color:#db2777; }
.tcat.developer { background:#ede9fe; color:#7c3aed; }
.tcat.seo { background:#d1fae5; color:#059669; }
.tcat.network { background:#e0e7ff; color:#4f46e5; }
.tcat.utility { background:#fef3c7; color:#d97706; }
.tcat.pdf { background:#fed7aa; color:#d97706; }
.tcat.html { background:#c7d2fe; color:#4f46e5; }
.tcat.random { background:#fbcfe8; color:#be185d; }
.tcat.email { background:#cffafe; color:#0891b2; }
.tcat.seo { background:#ccfbf1; color:#0d9488; }

/* ===== TOOL BODY ===== */
.tool-body { max-width:800px; }
.input-group { margin-bottom:1rem; }
.input-group > label { display:block; font-size:.84rem; font-weight:600; color:var(--text-secondary); margin-bottom:.35rem; }
.input-field { width:100%; padding:.6rem .875rem; border:1.5px solid var(--border); border-radius:var(--radius-sm); font-size:.88rem; color:var(--text); background:var(--white); transition:var(--transition); outline:none; }
.input-field:focus { border-color:var(--primary); box-shadow:0 0 0 3px rgba(16,185,129,.1); }
textarea.input-field { resize:vertical; min-height:80px; font-family:'SF Mono','Fira Code','Courier New',monospace; font-size:.82rem; line-height:1.6; }
.btn-row { display:flex; flex-wrap:wrap; gap:.6rem; margin-bottom:1rem; }
.btn-primary { display:inline-flex; align-items:center; gap:.5rem; padding:.6rem 1.2rem; background:var(--gradient-primary); color:#fff; border:none; border-radius:var(--radius-sm); font-weight:600; font-size:.88rem; cursor:pointer; transition:var(--transition); box-shadow:0 2px 8px rgba(16,185,129,.25); }
.btn-primary:hover { transform:translateY(-1px); box-shadow:0 4px 14px rgba(16,185,129,.35); }
.btn-primary:active { transform:translateY(0); }
.btn-secondary { display:inline-flex; align-items:center; gap:.5rem; padding:.6rem 1.2rem; background:var(--white); color:var(--text-muted); border:1.5px solid var(--border); border-radius:var(--radius-sm); font-weight:600; font-size:.88rem; cursor:pointer; transition:var(--transition); }
.btn-secondary:hover { border-color:var(--text-light); color:var(--text); background:var(--surface-hover); }
.btn-sm { display:inline-flex; align-items:center; gap:.35rem; padding:.35rem .75rem; background:var(--primary-50); color:var(--primary-dark); border:1px solid var(--primary-light); border-radius:var(--radius-sm); font-size:.78rem; font-weight:600; cursor:pointer; transition:var(--transition); }
.btn-sm:hover { background:var(--primary); color:#fff; border-color:var(--primary); }
.select-row { display:flex; flex-wrap:wrap; align-items:center; gap:1rem; margin-bottom:1rem; }
.select-row label { display:flex; align-items:center; gap:.4rem; font-size:.86rem; font-weight:500; color:var(--text-secondary); }
.select-row .input-field { width:auto; min-width:140px; }
.checkbox-row { display:flex; flex-wrap:wrap; gap:1rem; margin-bottom:1rem; }
.checkbox-row label { display:flex; align-items:center; gap:.4rem; font-size:.86rem; color:var(--text-muted); cursor:pointer; padding:.35rem .75rem; border-radius:var(--radius-sm); border:1px solid var(--border); transition:var(--transition); }
.checkbox-row label:hover { border-color:var(--primary); background:var(--primary-50); }
.checkbox-row input[type="checkbox"] { accent-color:var(--primary); width:15px; height:15px; }

/* Results */
.results-box { background:var(--white); border:1px solid var(--border); border-radius:var(--radius-md); padding:1rem; margin-top:1rem; box-shadow:var(--shadow-xs); }
.results-box pre { white-space:pre-wrap; word-break:break-all; font-size:.83rem; line-height:1.6; max-height:400px; overflow-y:auto; color:var(--text); font-family:'SF Mono','Fira Code','Courier New',monospace; background:var(--bg); padding:.75rem; border-radius:var(--radius-sm); }
.results-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:.75rem; }
.results-header h3 { font-size:.9rem; font-weight:600; }
.stats-bar { display:flex; gap:1rem; padding-top:.75rem; margin-top:.75rem; border-top:1px solid var(--border-light); font-size:.83rem; color:var(--text-muted); }
.stats-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(90px, 1fr)); gap:.6rem; margin-top:1rem; }
.stat-card { background:var(--white); border:1px solid var(--border); border-radius:var(--radius-sm); padding:.65rem; text-align:center; transition:var(--transition); }
.stat-card:hover { border-color:var(--primary); box-shadow:var(--shadow-sm); }
.stat-card strong { display:block; font-size:1.2rem; font-weight:700; color:var(--text); }
.stat-card span { font-size:.7rem; color:var(--text-light); text-transform:uppercase; letter-spacing:.3px; font-weight:600; }

/* Upload Zone */
.upload-zone { border:2px dashed var(--border); border-radius:var(--radius-md); padding:2.5rem 1.5rem; text-align:center; cursor:pointer; transition:var(--transition); background:var(--white); }
.upload-zone:hover { border-color:var(--primary); background:var(--primary-50); }
.upload-zone.dragover { border-color:var(--primary); background:var(--primary-50); box-shadow:var(--shadow-glow); }
.upload-zone i { font-size:2rem; color:var(--primary); margin-bottom:.5rem; display:block; }
.upload-zone p { color:var(--text-muted); font-size:.88rem; }
.preview-box { margin-top:1rem; text-align:center; }
.preview-box img { max-width:100%; max-height:300px; border-radius:var(--radius-sm); border:1px solid var(--border); box-shadow:var(--shadow-sm); }
.file-info { font-size:.82rem; color:var(--text-muted); margin:.5rem 0; font-weight:500; }

/* Password */
.password-display { background:var(--bg); padding:.875rem 1rem; border-radius:var(--radius-sm); font-family:'SF Mono','Fira Code','Courier New',monospace; display:flex; justify-content:space-between; align-items:center; gap:1rem; border:1px solid var(--border); }
.strength-bar { height:5px; border-radius:var(--radius-full); background:var(--border); margin-top:.75rem; overflow:hidden; }
.strength-bar::after { content:''; display:block; height:100%; border-radius:var(--radius-full); transition:width .4s cubic-bezier(0.32,0.72,0,1); }

/* Progress */
.progress-bar { height:6px; background:var(--border); border-radius:var(--radius-full); overflow:hidden; }
.progress-fill { height:100%; background:var(--gradient-primary); border-radius:var(--radius-full); transition:width .3s; width:0; }

/* ===== FOOTER ===== */
.site-footer { background:var(--text); color:#94a3b8; margin-top:3rem; }
.footer-inner { max-width:var(--max-w); margin:0 auto; padding:3rem 1.5rem 1.5rem; }
.footer-grid { display:grid; grid-template-columns:2fr 1fr 1fr 1fr; gap:2rem; margin-bottom:2rem; }
.footer-col .logo { color:#fff; margin-bottom:.75rem; }
.footer-col p { font-size:.84rem; line-height:1.6; max-width:280px; }
.footer-col h4 { color:#fff; font-size:.85rem; font-weight:600; margin-bottom:.75rem; text-transform:uppercase; letter-spacing:.5px; }
.footer-col a { display:block; font-size:.84rem; color:#94a3b8; padding:.25rem 0; transition:var(--transition); }
.footer-col a:hover { color:var(--primary); }
.footer-bottom { border-top:1px solid rgba(255,255,255,.08); padding-top:1.5rem; text-align:center; font-size:.8rem; }

/* ===== RESPONSIVE ===== */
@media (max-width:1024px) {
    .sidebar { display:none; }
    .content-area { margin-left:0; }
    .footer-grid { grid-template-columns:1fr 1fr; }
}
@media (max-width:768px) {
    .hamburger { display:flex; }
    .nav-links { display:none; }
    .hero-section { padding:2rem 1rem 1.5rem; }
    .hero-section h1 { font-size:1.85rem; }
    .hero-stats { gap:1.25rem; flex-wrap:wrap; }
    .hero-stats strong { font-size:1.1rem; }
    .tool-grid { grid-template-columns:1fr 1fr; gap:.6rem; }
    .filter-bar { gap:.3rem; }
    .fchip { font-size:.72rem; padding:.3rem .7rem; }
    .panel-header h2 { font-size:1.15rem; }
    .footer-grid { grid-template-columns:1fr; gap:1.5rem; }
    .main-layout { padding:0 .75rem 2rem; }
    .tool-panel { padding:1rem; }
    .sidebar { display:none; position:fixed; left:.5rem; top:calc(var(--header-h) + 8px); height:calc(100vh - var(--header-h) - 16px); z-index:150; border-radius:var(--radius-lg); box-shadow:var(--shadow-xl); }
    .sidebar.open { display:flex; }
    .sidebar-close { display:block; }
    .tcard { padding:.875rem; gap:.65rem; }
    .tcard-icon { width:36px; height:36px; font-size:.85rem; }
}
@media (max-width:480px) {
    .hero-section h1 { font-size:1.55rem; }
    .hero-search { padding:0 .75rem; }
    .hero-stats { gap:1rem; }
    .tool-grid { grid-template-columns:1fr; }
    .btn-row { flex-direction:column; }
    .btn-primary, .btn-secondary { width:100%; justify-content:center; }
    .stats-grid { grid-template-columns:repeat(3, 1fr); }
    .content-area { margin-left:0; }
}\n\n/* ==========================================
   Tool Panel Professional Styles
   ========================================== */

/* --- Section Divider --- */
.tp-section {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1rem;
}
.tp-section-title {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .7px;
    color: var(--text-light);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.tp-section-title i { color: var(--primary); font-size: .82rem; }

/* --- Form Grid Layouts --- */
.tp-form-grid { display: flex; flex-direction: column; gap: .75rem; }
.tp-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.tp-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .75rem; }

/* --- Hint Text --- */
.tp-hint { color: var(--text-light); font-weight: 400; font-size: .78rem; }
.tp-tip {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    padding: .75rem 1rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: var(--radius-sm);
    font-size: .82rem;
    color: #1e40af;
    line-height: 1.5;
    margin-bottom: 1rem;
}
.tp-tip i { margin-top: 2px; flex-shrink: 0; }
.tp-tip strong { font-weight: 600; }

/* --- Badge --- */
.tp-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-full);
    font-size: .7rem;
    font-weight: 700;
}

/* --- Spec Info --- */
.tp-spec-info {
    font-size: .82rem;
    color: var(--text-muted);
    padding: .5rem .75rem;
    background: var(--bg);
    border-radius: var(--radius-xs);
    margin-top: .5rem;
    font-weight: 500;
}

/* --- Checkbox Group --- */
.tp-check-group { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.tp-check {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .84rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: .4rem .75rem;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    transition: var(--transition);
    font-weight: 500;
    background: var(--white);
}
.tp-check:hover { border-color: var(--primary); background: var(--primary-50); }
.tp-check input[type="checkbox"] { accent-color: var(--primary); width: 15px; height: 15px; cursor: pointer; }

/* --- Preview Card --- */
.tp-preview-card {
    margin-top: 1rem;
    text-align: center;
}
.tp-preview-card img {
    max-width: 100%;
    max-height: 300px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    margin-bottom: .75rem;
}
.tp-file-info {
    font-size: .82rem;
    color: var(--text-muted);
    margin-bottom: .75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: .5rem;
    justify-content: center;
}
.tp-file-info::before {
    content: '\f15c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--primary);
}

/* --- Slider Row --- */
.tp-slider-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: .75rem;
}
.tp-slider-row label { font-size: .84rem; font-weight: 500; color: var(--text-secondary); white-space: nowrap; min-width: 160px; }
.tp-slider-row input[type="range"] {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border);
    border-radius: var(--radius-full);
    outline: none;
}
.tp-slider-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(16,185,129,.3);
    transition: var(--transition);
}
.tp-slider-row input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 10px rgba(16,185,129,.5);
}

/* --- Code Textarea --- */
.tp-code-area {
    font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace !important;
    font-size: .82rem !important;
    line-height: 1.7 !important;
    tab-size: 2;
    background: #1e293b !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}
.tp-code-area:focus { box-shadow: 0 0 0 3px rgba(16,185,129,.2) !important; }
.tp-code-area::placeholder { color: #64748b; }

/* --- Compare Cards --- */
.tp-compare {
    display: grid;
    grid-template-columns: 1fr auto 1fr 1fr;
    gap: .75rem;
    align-items: center;
    margin-bottom: .75rem;
}
.tp-compare-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .75rem;
    text-align: center;
}
.tp-compare-card span { display: block; font-size: .72rem; color: var(--text-light); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.tp-compare-card strong { display: block; font-size: 1.1rem; font-weight: 700; color: var(--text); margin-top: .25rem; }
.tp-compare-arrow { color: var(--text-light); font-size: 1.2rem; }
.tp-compare-saved { background: var(--primary-50); border-color: var(--primary-light); }
.tp-compare-saved strong { color: var(--primary-dark); }

/* --- Stats Bar --- */
.tp-stats-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1rem;
}
.tp-stats-bar .tp-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .35rem .75rem;
    border-radius: var(--radius-full);
    font-size: .8rem;
    font-weight: 600;
    background: var(--bg);
    border: 1px solid var(--border);
}
.tp-stats-bar .tp-stat-pill.valid { background: #dcfce7; border-color: #bbf7d0; color: #166534; }
.tp-stats-bar .tp-stat-pill.invalid { background: #fee2e2; border-color: #fecaca; color: #991b1b; }
.tp-stats-bar .tp-stat-pill.suspicious { background: #fef3c7; border-color: #fde68a; color: #92400e; }

/* --- Result Steps (SMTP) --- */
.tp-result-steps {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-bottom: 1rem;
}
.tp-step {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .6rem .875rem;
    border-radius: var(--radius-sm);
    font-size: .84rem;
    font-weight: 500;
}
.tp-step.success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.tp-step.error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.tp-step.info { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.tp-step i { font-size: .9rem; }

/* --- Table --- */
.tp-table-wrap { overflow-x: auto; }
.tp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .84rem;
}
.tp-table thead th {
    background: var(--bg);
    padding: .6rem .75rem;
    text-align: left;
    font-weight: 600;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border);
}
.tp-table tbody td {
    padding: .55rem .75rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
}
.tp-table tbody tr:hover { background: var(--primary-50); }
.tp-table .status-badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .2rem .6rem;
    border-radius: var(--radius-full);
    font-size: .75rem;
    font-weight: 600;
}
.tp-table .status-badge.valid { background: #dcfce7; color: #166534; }
.tp-table .status-badge.invalid { background: #fee2e2; color: #991b1b; }
.tp-table .status-badge.suspicious { background: #fef3c7; color: #92400e; }

/* --- Extracted Groups --- */
.tp-group-block {
    margin-bottom: 1rem;
}
.tp-group-title {
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: .4rem;
    display: flex;
    align-items: center;
    gap: .4rem;
}
.tp-group-title .tp-count {
    background: var(--primary-50);
    color: var(--primary-dark);
    padding: .1rem .5rem;
    border-radius: var(--radius-full);
    font-size: .72rem;
    font-weight: 700;
}
.tp-group-items {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}
.tp-group-item {
    background: var(--white);
    border: 1px solid var(--border);
    padding: .3rem .65rem;
    border-radius: var(--radius-xs);
    font-size: .8rem;
    color: var(--text);
    font-family: 'SF Mono', 'Fira Code', monospace;
    cursor: pointer;
    transition: var(--transition);
}
.tp-group-item:hover { border-color: var(--primary); background: var(--primary-50); }

/* --- Format Selector (Image Converter) --- */
.tp-format-selector { display: flex; gap: .5rem; margin-bottom: 1rem; justify-content: center; }
.tp-format-opt { cursor: pointer; }
.tp-format-opt input:checked + .tp-format-icon { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 2px 8px rgba(16,185,129,.3); }
.tp-format-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 50px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: .88rem;
    color: var(--text-muted);
    transition: var(--transition);
    cursor: pointer;
}
.tp-format-icon:hover { border-color: var(--primary); color: var(--primary); }

/* --- Thumbnails --- */
.tp-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.tp-thumb {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border);
    overflow: hidden;
}
.tp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tp-thumb-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    background: rgba(239,68,68,.9);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: .65rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .2s;
}
.tp-thumb:hover .tp-thumb-remove { opacity: 1; }

/* --- SEO Results --- */
.tp-seo-results { display: flex; flex-direction: column; gap: .75rem; }
.tp-seo-item {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .875rem;
}
.tp-seo-item-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--text-light);
    margin-bottom: .35rem;
}
.tp-seo-item-value {
    font-size: .92rem;
    color: var(--text);
    font-weight: 500;
    line-height: 1.5;
}
.tp-seo-item-copy {
    float: right;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
    font-size: .82rem;
}
.tp-seo-item-copy:hover { color: var(--primary); }

/* --- Keyword Tags --- */
.tp-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tp-tag {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    background: var(--white);
    border: 1px solid var(--border);
    padding: .35rem .75rem;
    border-radius: var(--radius-full);
    font-size: .82rem;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
    cursor: default;
}
.tp-tag:hover { border-color: var(--primary); background: var(--primary-50); color: var(--primary-dark); }

/* --- Stats Grid (Enhanced) --- */
.tp-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .6rem;
    margin-top: 1rem;
}
.tp-stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .75rem;
    text-align: center;
    transition: var(--transition);
}
.tp-stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.tp-stat-card strong { display: block; font-size: 1.35rem; font-weight: 800; margin-bottom: .15rem; }
.tp-stat-card span { font-size: .68rem; color: var(--text-light); text-transform: uppercase; letter-spacing: .5px; font-weight: 700; }
.tp-stat-blue strong { color: #2563eb; }
.tp-stat-purple strong { color: #7c3aed; }
.tp-stat-pink strong { color: #db2777; }
.tp-stat-green strong { color: #059669; }
.tp-stat-amber strong { color: #d97706; }
.tp-stat-teal strong { color: #0d9488; }

/* --- Top Words & Density --- */
.tp-top-words { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.tp-top-word {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .84rem;
}
.tp-top-word-rank { font-weight: 800; color: var(--primary); min-width: 20px; font-size: .82rem; }
.tp-top-word-text { font-weight: 600; color: var(--text); min-width: 80px; }
.tp-top-word-bar { flex: 1; height: 6px; background: var(--border); border-radius: var(--radius-full); overflow: hidden; }
.tp-top-word-bar-fill { height: 100%; background: var(--gradient-primary); border-radius: var(--radius-full); }
.tp-top-word-count { font-size: .78rem; color: var(--text-light); font-weight: 600; min-width: 30px; text-align: right; }

/* --- IP Details --- */
.tp-ip-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .6rem;
    margin-bottom: 1rem;
}
.tp-ip-field {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .6rem .875rem;
}
.tp-ip-field-label { font-size: .7rem; color: var(--text-light); text-transform: uppercase; letter-spacing: .5px; font-weight: 700; }
.tp-ip-field-value { font-size: .92rem; font-weight: 600; color: var(--text); margin-top: .15rem; }

/* --- MAC Details --- */
.tp-mac-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .6rem;
}
.tp-mac-field {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .6rem .875rem;
}
.tp-mac-field-label { font-size: .7rem; color: var(--text-light); text-transform: uppercase; letter-spacing: .5px; font-weight: 700; }
.tp-mac-field-value { font-size: .92rem; font-weight: 600; color: var(--text); margin-top: .15rem; }

/* --- Ping Details --- */
.tp-ping-details {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .6rem;
    margin-bottom: 1rem;
}

/* --- Password Card --- */
.tp-password-card {
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1rem;
}
.tp-password-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: var(--bg);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    font-family: 'SF Mono', 'Fira Code', monospace;
    min-height: 56px;
}
.tp-password-display code {
    flex: 1;
    font-size: 1.3rem;
    font-weight: 600;
    word-break: break-all;
    color: var(--text);
    letter-spacing: .5px;
}
.tp-strength-meter {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-top: .75rem;
}
.tp-strength-fill {
    flex: 1;
    height: 5px;
    border-radius: var(--radius-full);
    background: var(--border);
    overflow: hidden;
}
.tp-strength-fill::after {
    content: '';
    display: block;
    height: 100%;
    border-radius: var(--radius-full);
    transition: width .4s cubic-bezier(0.32,0.72,0,1), background .3s;
    width: 0;
}
.tp-strength-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
    min-width: 75px;
    text-align: right;
}

/* --- Color Picker --- */
.tp-color-picker-row {
    display: flex;
    gap: 1rem;
    align-items: stretch;
    margin-bottom: 1rem;
}
.tp-color-preview-box {
    width: 100px;
    min-height: 80px;
    border-radius: var(--radius-md);
    border: 2px solid var(--border);
    transition: var(--transition);
    flex-shrink: 0;
}
.tp-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: 1rem;
}
.tp-swatch {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    display: inline-block;
}
.tp-swatch:hover { transform: scale(1.15); box-shadow: var(--shadow-md); }
.tp-swatch.active { border-color: var(--text); }
.tp-color-formats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .6rem;
}
.tp-color-fmt {
    display: flex;
    align-items: center;
    gap: .6rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .75rem;
    cursor: pointer;
    transition: var(--transition);
}
.tp-color-fmt:hover { border-color: var(--primary); background: var(--primary-50); }
.tp-fmt-label { font-size: .7rem; color: var(--text-light); text-transform: uppercase; letter-spacing: .5px; font-weight: 700; min-width: 35px; }
.tp-color-fmt strong { flex: 1; font-size: .84rem; color: var(--text); }
.tp-color-fmt i { color: var(--text-light); font-size: .75rem; }

/* --- Lorem Output --- */
.tp-lorem-output p {
    margin-bottom: .875rem;
    line-height: 1.75;
    color: var(--text-secondary);
    font-size: .92rem;
    padding-left: .5rem;
    border-left: 3px solid var(--border);
}

/* --- Split View --- */
.tp-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* --- Diff Output --- */
.tp-diff-output {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: .82rem;
    line-height: 1.7;
    max-height: 400px;
    overflow-y: auto;
    background: var(--bg);
    padding: .75rem;
    border-radius: var(--radius-sm);
}
.diff-added { background: #dcfce7; color: #166534; }
.diff-removed { background: #fee2e2; color: #991b1b; }
.diff-changed { background: #fef3c7; color: #92400e; }
.diff-line { padding: .15rem .5rem; border-left: 3px solid transparent; }
.diff-line.diff-added { border-left-color: #22c55e; }
.diff-line.diff-removed { border-left-color: #ef4444; }

/* --- Converter Tabs --- */
.tp-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
    margin-bottom: 1.25rem;
    border-bottom: 2px solid var(--border-light);
    padding-bottom: .5rem;
}
.tp-tab {
    padding: .45rem .9rem;
    border: none;
    background: none;
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: var(--transition);
}
.tp-tab:hover { color: var(--text); background: var(--surface-hover); }
.tp-tab.active { color: var(--primary); background: var(--primary-50); border-bottom: 2px solid var(--primary); margin-bottom: -2px; }

/* --- Converter Grid --- */
.tp-converter-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: .75rem;
    align-items: start;
}
.tp-swap-btn-wrap { display: flex; align-items: center; justify-content: center; padding-top: 2rem; }
.tp-swap-btn {
    width: 40px;
    height: 40px;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
}

/* --- Responsive Overrides --- */
@media (max-width: 768px) {
    .tp-row-2, .tp-row-3 { grid-template-columns: 1fr; }
    .tp-split { grid-template-columns: 1fr; }
    .tp-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .tp-compare { grid-template-columns: 1fr 1fr; }
    .tp-compare-arrow { display: none; }
    .tp-ip-details, .tp-mac-details { grid-template-columns: 1fr; }
    .tp-ping-details { grid-template-columns: 1fr 1fr; }
    .tp-converter-grid { grid-template-columns: 1fr; }
    .tp-swap-btn-wrap { justify-content: center; padding-top: 0; }
    .tp-color-formats { grid-template-columns: 1fr; }
    .tp-color-picker-row { flex-direction: column; }
    .tp-color-preview-box { width: 100%; min-height: 60px; }
    .tp-slider-row label { min-width: auto; }
    .tp-slider-row { flex-wrap: wrap; }
    .tp-tabs { gap: .15rem; }
    .tp-tab { padding: .35rem .6rem; font-size: .76rem; }
}
@media (max-width: 480px) {
    .tp-stats-grid { grid-template-columns: 1fr 1fr; }
    .tp-password-display code { font-size: 1rem; }
    .tp-format-selector { flex-direction: column; align-items: center; }
    .tp-format-icon { width: 100%; }
}

/* ==========================================
   RTL Support (Right-to-Left)
   ========================================== */
[dir="rtl"] { text-align: right; }
[dir="rtl"] .sidebar { 
    border-right: none; 
    border-left: 1px solid var(--border); 
    left: auto; 
    right: 0; 
}
[dir="rtl"] .content-area { margin-left: 0; margin-right: 1rem; }
[dir="rtl"] .header-inner { flex-direction: row-reverse; }
[dir="rtl"] .nav-links { margin-left: 0; margin-right: auto; flex-direction: row-reverse; }
[dir="rtl"] .lang-switcher-wrapper { margin-left: 0; margin-right: auto; }
[dir="rtl"] .logo { flex-direction: row-reverse; }
[dir="rtl"] .nav-item { 
    border-right: none; 
    border-left: 3px solid transparent; 
    text-align: right; 
    flex-direction: row-reverse;
    justify-content: flex-start;
}
[dir="rtl"] .nav-item.active { border-left: 3px solid var(--primary); }
[dir="rtl"] .nav-item i { margin-left: .75rem; margin-right: 0; }
[dir="rtl"] .tcard { flex-direction: row-reverse; text-align: right; }
[dir="rtl"] .tcat { left: 8px; right: auto; }
[dir="rtl"] .tool-header { flex-direction: row-reverse; text-align: right; }
[dir="rtl"] .tp-step { flex-direction: row-reverse; }
[dir="rtl"] .tp-step i { margin-left: .6rem; margin-right: 0; }
[dir="rtl"] .btn { flex-direction: row-reverse; }
[dir="rtl"] .btn i { margin-left: .5rem; margin-right: 0; }
[dir="rtl"] .footer-logo { flex-direction: row-reverse; }
[dir="rtl"] .back-btn { flex-direction: row-reverse; }

/* ==========================================
   Premium Theme Additions - v3 Professional
   ========================================== */

/* --- Enhanced Hero Section --- */
.hero-premium {
    position: relative;
    padding: 5rem 1.5rem 4rem;
    background: radial-gradient(circle at 50% -20%, #0f172a 0%, #1e293b 100%);
    color: #fff;
    overflow: hidden;
    text-align: center;
}
.hero-premium::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle at center, rgba(16,185,129,0.15) 0%, transparent 40%),
                radial-gradient(circle at 80% 20%, rgba(59,130,246,0.1) 0%, transparent 30%);
    animation: gradientShift 15s ease-in-out infinite alternate;
    pointer-events: none;
}
@keyframes gradientShift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-5%, 5%) scale(1.05); }
}
.hero-premium .hero-badge {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    backdrop-filter: blur(8px);
}
.hero-premium h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.25rem;
    letter-spacing: -1px;
}
.hero-premium h1 span {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-premium p {
    font-size: 1.15rem;
    color: #94a3b8;
    max-width: 600px;
    margin: 0 auto 2.5rem;
}
.hero-search-glass {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    color: #fff;
}
.hero-search-glass:focus-within {
    border-color: var(--primary);
    background: rgba(255,255,255,0.1);
    box-shadow: 0 0 20px rgba(16,185,129,0.2);
}
.hero-search-glass input { color: #fff; }
.hero-search-glass input::placeholder { color: #64748b; }
.hero-stats-premium {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
}
.hero-stats-premium div {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}
.hero-stats-premium strong { font-size: 1.75rem; color: #fff; }
.hero-stats-premium span { font-size: 0.8rem; color: #94a3b8; text-transform: uppercase; letter-spacing: 1px; }
.hero-stats-premium i { color: var(--primary); margin-bottom: 0.5rem; font-size: 1.25rem; }

/* --- Categorized Tool Layout --- */
.category-section {
    margin-bottom: 3rem;
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}
@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}
.category-section:nth-child(1) { animation-delay: 0.1s; }
.category-section:nth-child(2) { animation-delay: 0.2s; }
.category-section:nth-child(3) { animation-delay: 0.3s; }

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-light);
}
.category-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text);
}
.category-title i {
    color: var(--primary);
    background: var(--primary-50);
    width: 40px; height: 40px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
}
.category-count {
    background: var(--bg);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
}

/* Featured Tools Grid */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
    margin-bottom: 3rem;
}
.tcard-featured {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid var(--border);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}
.tcard-featured:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg), 0 0 0 1px var(--primary);
}
.tcard-featured .tcard-icon {
    width: 56px; height: 56px;
    font-size: 1.5rem;
    border-radius: var(--radius-md);
}
.tcard-featured h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.tcard-featured p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; }
.tcard-featured .arrow-icon {
    position: absolute;
    bottom: 1.5rem; right: 1.5rem;
    color: var(--primary);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s;
}
.tcard-featured:hover .arrow-icon {
    opacity: 1;
    transform: translateX(0);
}

/* --- Blog Section --- */
.blog-section {
    margin: 4rem 0 2rem;
    padding: 3rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}
.blog-header {
    text-align: center;
    margin-bottom: 2.5rem;
}
.blog-header h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}
.blog-header p {
    color: var(--text-muted);
    font-size: 1.05rem;
}
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}
.blog-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    background: var(--white);
}
.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}
.blog-card-img {
    height: 180px;
    background: var(--bg);
    position: relative;
    overflow: hidden;
}
.blog-card-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.blog-card:hover .blog-card-img img {
    transform: scale(1.05);
}
.blog-card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.blog-card-meta {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.blog-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}
.blog-card-excerpt {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
}
.blog-card-link {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.blog-card-link:hover { color: var(--primary); }

.blog-view-all {
    text-align: center;
    margin-top: 2.5rem;
}
.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-full);
    font-weight: 600;
    color: var(--text);
    transition: var(--transition);
}
.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-50);
}

/* --- Premium Footer --- */
.site-footer-premium {
    background: #0f172a;
    color: #94a3b8;
    position: relative;
    border-top: 4px solid var(--primary);
}
.footer-top {
    padding: 5rem 1.5rem 3rem;
    max-width: var(--max-w);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
    gap: 2.5rem;
}
.footer-brand .logo { color: #fff; font-size: 1.5rem; margin-bottom: 1rem; }
.footer-brand p { font-size: 0.95rem; line-height: 1.6; margin-bottom: 1.5rem; max-width: 320px; }
.social-icons { display: flex; gap: 0.75rem; }
.social-icons a {
    width: 36px; height: 36px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    transition: var(--transition);
}
.social-icons a:hover {
    background: var(--primary);
    transform: translateY(-2px);
}
.footer-links h4 { color: #fff; font-size: 1rem; font-weight: 700; margin-bottom: 1.25rem; }
.footer-links ul { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 0.75rem; }
.footer-links a { color: #94a3b8; font-size: 0.9rem; transition: var(--transition); display: inline-block; }
.footer-links a:hover { color: #fff; transform: translateX(3px); }
.footer-newsletter h4 { color: #fff; font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }
.footer-newsletter p { font-size: 0.85rem; margin-bottom: 1rem; line-height: 1.5; }
.newsletter-form { display: flex; gap: 0.5rem; }
.newsletter-form input {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    padding: 0.6rem 1rem;
    color: #fff;
    font-size: 0.9rem;
    outline: none;
}
.newsletter-form input:focus { border-color: var(--primary); }
.newsletter-form button {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}
.newsletter-form button:hover { background: var(--primary-dark); }
.footer-bottom-premium {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--max-w);
    margin: 0 auto;
}
.footer-bottom-links a { margin-left: 1rem; color: #94a3b8; }
.footer-bottom-links a:hover { color: #fff; }

@media (max-width: 1024px) {
    .footer-top { grid-template-columns: 1fr 1fr 1fr; }
    .footer-brand, .footer-newsletter { grid-column: span 3; }
    .blog-section { padding: 2rem; }
}
@media (max-width: 768px) {
    .hero-premium h1 { font-size: 2.2rem; }
    .hero-stats-premium { flex-direction: column; gap: 1.5rem; }
    .footer-top { grid-template-columns: 1fr; }
    .footer-brand, .footer-newsletter { grid-column: span 1; }
    .footer-bottom-premium { flex-direction: column; gap: 1rem; }
    .blog-grid { grid-template-columns: 1fr; }
}

/* ==========================================
   Premium Tool Panel UI Redesign
   ========================================== */
.tool-panel {
    background: #ffffff;
    border-radius: var(--radius-xl);
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    border: 1px solid var(--border-light);
    overflow: hidden;
    margin-bottom: 2rem;
    animation: fadeInSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes fadeInSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.panel-header {
    background: linear-gradient(145deg, #f8fafc 0%, #ffffff 100%);
    padding: 2rem;
    border-bottom: 1px solid var(--border-light);
    position: relative;
}
.panel-header h2 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}
.panel-header h2 i {
    color: var(--primary);
    background: var(--primary-50);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 1.5rem;
}
.panel-header p {
    color: var(--text-muted);
    font-size: 1rem;
    margin-left: 2.75rem;
}
.back-btn {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}
.back-btn:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    transform: translateY(-2px);
}
.tool-body {
    padding: 2.5rem;
}
.tp-section {
    background: var(--bg);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    margin-bottom: 1.5rem;
}
.tp-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.input-field {
    width: 100%;
    padding: 0.875rem 1.25rem;
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    color: var(--text);
    transition: all 0.2s;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}
.input-field:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-50);
    outline: none;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(16,185,129,0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16,185,129,0.4);
}
.results-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-top: 1rem;
}
.results-table th {
    background: var(--bg-light);
    padding: 1rem;
    text-align: left;
    font-weight: 700;
    color: var(--text);
    border-bottom: 2px solid var(--border-light);
}
.results-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    background: var(--white);
}
.results-table tr:last-child td {
    border-bottom: none;
}

/* ===== STAGGERED ENTRANCE ANIMATIONS ===== */
.animate-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.animate-up-active {
    opacity: 1;
    transform: translateY(0);
}

/* ===== PREMIUM SKELETON LOADERS ===== */
.skeleton {
    background: #e2e8f0;
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite linear;
    border-radius: var(--radius-sm);
    color: transparent !important;
}
.skeleton * {
    visibility: hidden;
}
html[data-theme="dark"] .skeleton {
    background: #1e293b;
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
    background-size: 200% 100%;
}
@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== ANIMATED EMPTY STATES ===== */
.tp-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
    background: var(--surface-glass);
    border: 2px dashed var(--border-light);
    border-radius: var(--radius-md);
    animation: fadeInEmpty 0.5s ease;
    margin-top: 1rem;
}
.tp-empty-state i {
    font-size: 2.5rem;
    color: var(--primary-light);
    margin-bottom: 1rem;
    animation: pulseGlow 2s infinite alternate;
}
.tp-empty-state p {
    font-size: 0.95rem;
    max-width: 300px;
    margin: 0 auto;
}
@keyframes pulseGlow {
    0% { transform: scale(1); filter: drop-shadow(0 0 2px rgba(16,185,129,0.2)); }
    100% { transform: scale(1.05); filter: drop-shadow(0 0 8px rgba(16,185,129,0.5)); }
}
@keyframes fadeInEmpty {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== BENTO BOX UI ===== */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}
.bento-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}
.bento-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}
.bento-card.wide {
    grid-column: 1 / -1;
}
.bento-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}
.bento-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    word-break: break-word;
}
.bento-value .badge {
    font-size: 0.9rem;
}

/* ===== FLOATING ACTION BARS (FAB) ===== */
.fab-container {
    position: relative;
    padding-bottom: 4rem; /* space for the FAB */
}
.fab-bar {
    position: sticky;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background: rgba(30, 41, 59, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1.5rem;
    border-radius: 100px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 50;
    animation: slideUpFab 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes slideUpFab {
    from { opacity: 0; transform: translate(-50%, 20px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}
.fab-bar button {
    background: transparent;
    color: #fff;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
}
.fab-bar button:hover {
    color: var(--primary);
}
.fab-bar .fab-divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
}
html[data-theme="light"] .fab-bar {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border-color);
}
html[data-theme="light"] .fab-bar button {
    color: var(--text-main);
}
html[data-theme="light"] .fab-bar button:hover {
    color: var(--primary);
}
html[data-theme="light"] .fab-bar .fab-divider {
    background: var(--border-color);
}
