@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Saira:ital,wght@0,100..900;1,100..900&display=swap');

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-0: #080d14;
    --bg-1: #0d1520;
    --bg-2: #111d2e;
    --bg-3: #162438;
    --bg-4: #1e3048;
    --border: rgba(0, 255, 136, 0.12);
    --border-hi: rgba(0, 255, 136, 0.4);
    --glow: rgba(0, 255, 136, 0.15);
    --glow-hi: rgba(0, 255, 136, 0.35);

    --g: #00ff88;
    /* green accent */
    --g-dim: #00b85c;
    --b: #00d4ff;
    /* blue accent */
    --b-dim: #0098b8;
    --y: #ffcc00;
    /* yellow */
    --r: #ff4466;
    /* red */
    --p: #cc88ff;
    /* purple */
    --o: #ff8844;
    /* orange */

    --t1: #e8f4f0;
    --t2: #8fb8a8;
    --t3: #4a7060;

    --mono: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
    --sans: 'Syne', system-ui, sans-serif;

    --r4: 4px;
    --r6: 6px;
    --r8: 8px;
    --r12: 12px;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --dur: 0.22s;

    /* Net-Pulse palette */
    --bg0: #0d0f14;
    --bg1: #13161e;
    --bg2: #1a1e28;
    --bg3: #222738;
    --bd: #ffffff18;
    --bd2: #ffffff28;
    --t1: #f0f2f8;
    --t2: #8b91a8;
    --t3: #555c75;
    --grn: #1D9E75;
    --grn2: #0F6E56;
    --grn3: #9FE1CB;
    --blu: #378ADD;
    --blu3: #B5D4F4;
    --amb: #EF9F27;
    --red: #E24B4A;

    --bg: #0b0d10;
    --surface: #111111;
    --surface2: #161616;
    --surface3: #1c1c1c;
    --border: #222222;
    --border2: #2a2a2a;
    --cyan: #22d3ee;
    --cyan-dim: #22d3ee18;
    --cyan-glow: #22d3ee40;
    --violet: #818cf8;
    --green: #34d399;
    --amber: #fbbf24;
    --rose: #f87171;
    --text: #e4e4e7;
    --text2: #71717a;
    --text3: #3f3f46;
    --sub: #52525b;
  /* Colors */
  --dark-bg: #020617;
  --dark-gray: #090f20;
  --dark-blue: #090f20;
  --light-text: #ccc;
  --secondary-bg: #2a2a2a;
  --accent-blue: #007bff;
  --accent-blue-hover: #0056b3;
  --transition-speed: 0.3s;
  --border-radius: 5px;
  --bg-secondary: #16161D;
  --border-color: #3b3f54;
  --project-heading-color: #007bff;
  --prerequisites-icon-color: #28a745;
  --prerequisites-list-icon-color: #f7df1e;
  --code-bg: #111827;
  --code-border: #2d3748;
  --code-text: #e5e7eb;
  --code-line-number-bg: #1a1a1a;
  --code-line-number-color: #888;
  --sidebar-bg: #1a1a1a;
  --sidebar-border: #333;
  --tag-python: #ffd43b;
  --tag-ml: #00BCD4;
  --tag-ai: #8A2BE2;
  --program: #f57c00;
  --tag-orange: #e34f26;
  --tag-react: #61dafb;
  --tag-webdev: #17a2b8;
  --color-purple: #5e11e3;
  --accent-cyan: #00D9FF;
  --accent-magenta: #FF0080;
  --yellow: #f8c555;
  --pink: #cc99cd;
  --green: #7ec699;
  --orange: #f08d49;
  --blue: #67cdcc;
  --color-red: #dc2626;
  --legend-bg: #222;
  --legend-border: #444;
  --terminal-prompt: #00ccff;
  --terminal-border: #333;
  --terminal-output: #fff;
  --transition-speed: 0.3s;

  --color-orange: #f97316;
  --color-blue: #1673bd;
  --color-red: #dc2626;
  --color-green: #00ff00;
  --color-purple: #5e11e3;
  --color-pink: #B9375D;
  --color-navy: #1347b7;
  --accent-cyan: #00D9FF;
  --accent-magenta: #FF0080;
  --color-yellow: #FFAA00;

    /* Typography scale â€” Mobile base */
    --font-p: 14px;
    --font-h1: 1.5rem;
    --font-h2: 1.2rem;
    --font-h3: 1.08rem;
    --font-h4: 1.02rem;
    --font-li: 14px;
    --font-a: 14px;
    --font-i: 13.5px;
    --font-table: 14px;

    /* Component-specific scales (derived) */
    --logo-size: 18px;
    --logo-sub-size: 10px;
    --ip-size: 11px;
    --srv-btn-size: 11px;
    --badge-size: 9px;
    --big-spd-size: 32px;
    --sv-n-size: 18px;
    --sv-u-size: 10px;
    --prog-lbl-size: 11px;
    --prog-spd-size: 16px;
    --stat-n-size: 18px;
    --stat-l-size: 9px;
    --chart-hd-size: 11px;
    --hist-title-size: 12px;
    --hist-tbl-size: 10px;
    --btn-size: 13px;
    --ring-num-size: 18px;
    --ring-lbl-size: 10px;
}

html {
    scroll-behavior: smooth;
    color-scheme: dark;
}

body {
    font-family: "Saira", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    /* font-family: var(--mono); */
    background: var(--bg-0);
    color: var(--t1);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* scanline overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    background: repeating-linear-gradient(0deg,
        transparent 0px, transparent 2px,
        rgba(0, 0, 0, 0.04) 2px, rgba(0, 0, 0, 0.04) 4px);
}

/* noise grain */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 150px 150px;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-1);
}

::-webkit-scrollbar-thumb {
    background: var(--g-dim);
    border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--g);
}

.url {
    width: 27px;
    height: 25px;
}

.tool {
    font-size: var(--font-h3);
    font-family: var(--mono);
}

/* Base Container - Ensure it centers but doesn't force huge gaps */
.container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto; /* This centers the content */
    padding: 0 20px; /* Standard internal padding */
}

/* Navbar - Ensure it spans 100% */
.navbar {
    width: 100%;
    background-color: var(--dark-bg);
    padding: 5px 0;
    position: relative;
    z-index: 1000;
    margin-bottom: 50px;
}

/* ==========================================================================
   NAVBAR
   ========================================================================== */

/* .navbar {
    background-color: var(--dark-bg);
    padding: 5px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1000;
    margin-bottom: 40px;
} */

.navbar::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg,
            purple 0%, purple 16.67%,
            orange 16.67%, orange 33.33%,
            green 33.33%, green 50%,
            navy 50%, navy 66.67%,
            hotpink 66.67%, hotpink 83.33%,
            red 83.33%, red 100%);
    background-size: 120px 2px;
    animation: navbarSlidingBorder 2s linear infinite;
}

@keyframes navbarSlidingBorder {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 120px 0;
    }
}


@keyframes moveBorder {
    0% {
        left: -100%;
        transform: scaleX(0.5);
    }

    50% {
        transform: scaleX(1);
    }

    100% {
        left: 100%;
        transform: scaleX(0.5);
    }
}

.navbar .container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.navbar .logo {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--light-text);
    width: 100%;
    justify-content: space-between;
}

.logo-text {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.logo-text a {
  text-decoration: none;
  margin-top: 5px;
}

.typewriter {
    font-family: "Saira", sans-serif;
    white-space: pre;
    position: relative;
    font-optical-sizing: auto;
    font-weight: 500;
    color: #f0f0f0;
}

.typewriter::after {
    content: "_";
    /* cursor */
    margin-left: 2px;
    /* animation: blink 1s steps(1) infinite; */
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .typewriter::after {
        animation: none;
    }
}

.navbar nav ul {
    display: flex;
    flex-direction: column;
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: center;
}

.navbar nav ul li:hover a.home {
    color: var(--color-yellow);
    background-color: #2c2b25;
}

.navbar nav ul li:hover a.projects {
    color: var(--color-purple);
    background-color: #27252c;
}

.navbar nav ul li:hover a.programming {
    color: var(--color-orange);
    background-color: #282323;
}

.navbar nav ul li:hover a.hacking {
    color: var(--color-green);
    background-color: #273323;
}

.navbar nav ul li:hover a.networking {
    color: var(--color-blue);
    background-color: #212528;
}

.navbar nav ul li:hover a.ai {
    color: var(--color-pink);
    background-color: #2b2326;
}

.navbar nav ul li:hover a.game {
    color: var(--color-red);
    background-color: #332923;
}

.navbar nav ul li a {
    color: var(--light-text);
    padding: 10px 45px;
    width: 97%;
    display: inline-block;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    margin: 5px 0;
}

.navbar .search-bar {
    display: flex;
    align-items: center;
    background-color: var(--dark-bg);
    border-radius: 5px;
    padding: 8px 12px;
    width: calc(100% - 40px);
    margin: 15px auto 0 auto;
    border: 1px solid #444;
}

.navbar .search-bar:focus-within {
    border-color: var(--button-primary-hover);
}

.navbar .search-bar i {
    color: #aaa;
    margin-right: 10px;
}

.navbar .search-bar input {
    background-color: var(--dark-bg);
    border: none;
    outline: none;
    color: var(--light-text);
    font-size: 1rem;
    width: 100%;
}

.navbar .search-bar input::placeholder {
    color: #aaa;
}

.navbar button i {
    color: #8B5CF6;
}

.menu-toggle {
  display: block;
  font-size: 1.3rem;
  cursor: pointer;
  background: var(--dark-blue);
  border: 2px solid #8B5CF6;
  padding: 2px 4px;
}

.nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--dark-bg);
    overflow: hidden;
    max-height: 0;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
    transition: max-height 0.3s ease-out;
    /* padding-top: 10px; */
}

.nav-links.active {
    max-height: 450px;
}

/* ============================
    HEADER
============================ */
.header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(8, 13, 20, 0.92);
    backdrop-filter: blur(16px) saturate(1.5);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    height: 58px;
    display: flex;
    align-items: center;
    overflow: visible;      /* allow dropdown panel to paint below the 58px header */
}

.header-inner {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--t1);
    font-family: var(--sans);
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: -0.5px;
    flex-shrink: 0;
}

.logo-icon {
    font-family: var(--mono);
    color: var(--g);
    font-size: 1.3rem;
    text-shadow: 0 0 16px var(--g);
    animation: blink-cursor 1.1s step-end infinite;
}

@keyframes blink-cursor {

    0%,
    100% {
    opacity: 1;
    }

    50% {
    opacity: 0;
    }
}

/* tab nav */
.tab-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--r6);
    padding: 3px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.tab-nav::-webkit-scrollbar {
    display: none;
}

/* â”€â”€ Dropdown trigger (< 480px only) â”€â”€ */
.nav-dropdown-trigger {
    display: none;
    /* hidden by default, shown in base breakpoint */
    align-items: center;
    gap: 0.4rem;
    margin-left: auto;
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--r6);
    padding: 0.38rem 0.7rem;
    color: var(--g);
    font-family: var(--mono);
    font-size: 0.76rem;
    font-weight: 500;
    cursor: pointer;
    flex-shrink: 0;
    transition: all var(--dur) var(--ease);
    white-space: nowrap;
    max-width: 60vw;
}

.nav-dropdown-trigger:hover {
    border-color: var(--border-hi);
    box-shadow: 0 0 10px var(--glow);
}

.nav-dropdown-trigger[aria-expanded="true"] {
    border-color: var(--border-hi);
    background: rgba(0, 255, 136, 0.07);
}

.nav-dropdown-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.nav-dropdown-chevron {
    width: 10px;
    height: 10px;
    stroke: var(--g);
    flex-shrink: 0;
    transition: transform var(--dur) var(--ease);
}

.nav-dropdown-trigger[aria-expanded="true"] .nav-dropdown-chevron {
    transform: rotate(180deg);
}

.nav-dropdown-panel {
  display: block;           /* always block â€” max-height:0 hides it */
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 300;
  background: var(--bg-1);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border-hi);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 255, 136, 0.06);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transition: max-height 0.28s var(--ease), opacity 0.22s var(--ease);
}

.nav-dropdown-panel.open {
  max-height: 420px;
  opacity: 1;
  pointer-events: auto;
}

.nav-dd-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.72rem 1rem;
    background: none;
    border: none;
    border-bottom: 1px solid var(--border);
    color: var(--t2);
    font-family: var(--mono);
    font-size: 0.82rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background var(--dur) var(--ease), color var(--dur) var(--ease), padding-left var(--dur) var(--ease);
}

.nav-dd-item:last-child {
    border-bottom: none;
}

.nav-dd-item:hover {
    background: rgba(0, 255, 136, 0.05);
    color: var(--t1);
    padding-left: 1.3rem;
}

.nav-dd-item.active {
    color: var(--g);
    background: rgba(0, 255, 136, 0.08);
    border-left: 2px solid var(--g);
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
}

.nav-dd-item.active:hover {
    padding-left: 1rem;
}

.nav-dd-icon {
    font-size: 0.65rem;
    color: var(--t3);
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: var(--r4);
    padding: 0.15rem 0.35rem;
    min-width: 28px;
    text-align: center;
    font-weight: 700;
    letter-spacing: 0.3px;
    transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.nav-dd-item.active .nav-dd-icon {
    color: var(--g);
    border-color: rgba(0, 255, 136, 0.35);
}

/* â”€â”€ Scroll wrapper (480px+) â”€â”€ */
.tab-nav-wrapper {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-left: 2rem;
    min-width: 0;
    flex: 1;
    max-width: 100%;
    position: relative;
}

/* fade edges */
.tab-nav-wrapper::before,
.tab-nav-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 22px;
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.2s;
}

.tab-nav-wrapper::before {
    left: 26px;
    background: linear-gradient(90deg, rgba(8, 13, 20, 0.9) 0%, transparent 100%);
}

.tab-nav-wrapper::after {
    right: 26px;
    background: linear-gradient(270deg, rgba(8, 13, 20, 0.9) 0%, transparent 100%);
}

.tab-nav-wrapper.can-scroll-left::before {
    opacity: 1;
}

.tab-nav-wrapper.can-scroll-right::after {
    opacity: 1;
}

/* â”€â”€ Scroll arrow buttons â”€â”€ */
.tab-scroll-btn {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: var(--r4);
    background: var(--bg-3);
    border: 1px solid var(--border);
    color: var(--t2);
    font-size: 1.1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--dur) var(--ease);
    user-select: none;
}

.tab-scroll-btn:hover {
    border-color: var(--border-hi);
    color: var(--g);
    background: rgba(0, 255, 136, 0.08);
    box-shadow: 0 0 8px var(--glow);
}

.tab-scroll-btn:active {
    transform: scale(0.9);
}

.tab-scroll-btn[hidden] {
    display: none;
}

.tab-btn {
    font-family: var(--mono);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--t3);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.45rem 1rem;
    border-radius: var(--r4);
    white-space: nowrap;
    transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
    letter-spacing: 0.2px;
}

.tab-btn:hover {
    color: var(--t1);
    background: var(--bg-3);
}

.tab-btn.active {
    color: var(--g);
    background: rgba(0, 255, 136, 0.08);
    text-shadow: 0 0 12px rgba(0, 255, 136, 0.5);
}

.header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.kbd-hint {
    font-size: 0.7rem;
    color: var(--t3);
    background: var(--bg-2);
    border: 1px solid var(--border);
    padding: 0.2rem 0.5rem;
    border-radius: var(--r4);
}

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--r6);
    background: var(--bg-2);
    border: 1px solid var(--border);
    color: var(--t2);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--dur) var(--ease);
}

.icon-btn:hover {
    border-color: var(--border-hi);
    color: var(--g);
    box-shadow: 0 0 12px var(--glow);
}

/* ============================
    LAYOUT
============================ */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem 4rem;
}

/* panel display */
.panel {
    display: none;
}

.panel.active {
    display: block;
}

/* ============================
    TOOL CARDS
============================ */
.tool-card {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--r12);
    overflow: hidden;
    transition: border-color var(--dur) var(--ease);
}

.tool-card:focus-within {
    border-color: var(--border-hi);
}

.card-header {
    padding: 0.85rem 1.25rem;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-dots {
    display: flex;
    gap: 6px;
}

.card-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.d1 {
    background: #ff5f57;
}

.d2 {
    background: #febc2e;
}

.d3 {
    background: #28c840;
}

.card-title {
    font-size: 0.78rem;
    color: var(--t3);
    letter-spacing: 0.5px;
}

.card-title span {
    color: var(--g);
}

.card-body {
    padding: 1.25rem;
}

/* ============================
    TEXTAREA / INPUTS
============================ */
.field-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--t3);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.field-label .count {
    color: var(--b-dim);
    font-weight: 400;
}

textarea,
.code-output {
    font-family: var(--mono);
    font-size: 0.88rem;
    background: var(--bg-0);
    border: 1px solid var(--border);
    color: var(--t1);
    padding: 0.9rem 1rem;
    border-radius: var(--r8);
    width: 100%;
    resize: vertical;
    min-height: 160px;
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
    line-height: 1.7;
    letter-spacing: 0.2px;
}

textarea::placeholder {
    color: var(--t3);
}

textarea:focus {
    outline: none;
    border-color: rgba(0, 255, 136, 0.35);
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.07), inset 0 0 20px rgba(0, 255, 136, 0.02);
}

textarea[readonly] {
    color: var(--g);
    cursor: default;
}

.code-output {
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
    color: var(--g);
    min-height: 80px;
    resize: none;
    cursor: text;
    user-select: all;
}

/* ============================
    SPLIT LAYOUT
============================ */
.split {
    display: grid;
    grid-template-columns: 1fr 80px 1fr;
    gap: 0;
    align-items: start;
}

.split-mid {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0 0.5rem;
    padding-top: 1.8rem;
}

/* ============================
    BUTTONS
============================ */
.btn {
    font-family: var(--mono);
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0.6rem 1.1rem;
    border-radius: var(--r6);
    cursor: pointer;
    transition: all var(--dur) var(--ease);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid transparent;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.btn:active {
    transform: scale(0.97);
}

.btn-g {
    background: rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.35);
    color: var(--g);
}

.btn-g:hover {
    background: rgba(0, 255, 136, 0.18);
    box-shadow: 0 0 16px rgba(0, 255, 136, 0.25);
}

.btn-b {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.35);
    color: var(--b);
}

.btn-b:hover {
    background: rgba(0, 212, 255, 0.18);
    box-shadow: 0 0 16px rgba(0, 212, 255, 0.2);
}

.btn-r {
    background: rgba(255, 68, 102, 0.08);
    border-color: rgba(255, 68, 102, 0.3);
    color: var(--r);
}

.btn-r:hover {
    background: rgba(255, 68, 102, 0.15);
}

.btn-y {
    background: rgba(255, 204, 0, 0.08);
    border-color: rgba(255, 204, 0, 0.3);
    color: var(--y);
}

.btn-y:hover {
    background: rgba(255, 204, 0, 0.15);
}

.btn-ghost {
    background: var(--bg-2);
    border-color: var(--border);
    color: var(--t2);
}

.btn-ghost:hover {
    border-color: var(--border-hi);
    color: var(--t1);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn-icon-only {
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
    border-radius: var(--r6);
}

/* vertical arrow button */
.arrow-btn {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    width: 100%;
    height: 40px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    color: var(--g);
    font-family: var(--mono);
    font-size: 1.1rem;
    border-radius: var(--r6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--dur) var(--ease);
}

.arrow-btn:hover {
    border-color: var(--border-hi);
    background: rgba(0, 255, 136, 0.08);
    box-shadow: 0 0 12px var(--glow);
}

/* ============================
    CONTROL ROW
============================ */
.ctrl-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    margin-bottom: 1rem;
}

.ctrl-row .spacer {
    flex: 1;
}

/* ============================
    TOGGLE CHIP
============================ */
.chip-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--r6);
    cursor: pointer;
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--t2);
    transition: all var(--dur) var(--ease);
}

.chip-toggle:hover {
    border-color: var(--border-hi);
}

.chip-toggle input {
    cursor: pointer;
    accent-color: var(--g);
    width: 14px;
    height: 14px;
}

.chip-toggle.on {
    border-color: rgba(0, 255, 136, 0.35);
    color: var(--g);
}

/* ============================
    STATUS BADGE
============================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 99px;
    border: 1px solid;
}

.badge::before {
    content: 'â—';
    font-size: 0.55rem;
}

.badge-ok {
    color: var(--g);
    border-color: rgba(0, 255, 136, 0.35);
    background: rgba(0, 255, 136, 0.07);
}

.badge-err {
    color: var(--r);
    border-color: rgba(255, 68, 102, 0.35);
    background: rgba(255, 68, 102, 0.07);
}

.badge-info {
    color: var(--b);
    border-color: rgba(0, 212, 255, 0.35);
    background: rgba(0, 212, 255, 0.07);
}

.badge-warn {
    color: var(--y);
    border-color: rgba(255, 204, 0, 0.35);
    background: rgba(255, 204, 0, 0.07);
}

/* ============================
    STATS ROW
============================ */
.stats-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-0);
    border-top: 1px solid var(--border);
    font-size: 0.73rem;
    color: var(--t3);
}

.stat {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.stat strong {
    color: var(--b);
}

/* ============================
    CHAR MAP
============================ */
.char-map-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 1rem;
}

.char-cell {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--r4);
    padding: 0.4rem 0.5rem;
    font-size: 0.72rem;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
    min-width: 52px;
}

.char-cell:hover {
    border-color: var(--border-hi);
    background: var(--bg-3);
    box-shadow: 0 0 8px var(--glow);
}

.char-cell .c-raw {
    color: var(--y);
    font-size: 0.8rem;
}

.char-cell .c-enc {
    color: var(--g);
    font-size: 0.65rem;
}

/* ============================
    HISTORY
============================ */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.hist-item {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--r8);
    padding: 0.8rem 1rem;
    cursor: pointer;
    transition: all var(--dur) var(--ease);
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.75rem;
    align-items: center;
}

.hist-item:hover {
    border-color: var(--border-hi);
    background: var(--bg-3);
}

.hist-type {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 0.15rem 0.5rem;
    border-radius: 99px;
    border: 1px solid;
}

.hist-enc {
    color: var(--g);
    border-color: rgba(0, 255, 136, 0.4);
}

.hist-dec {
    color: var(--b);
    border-color: rgba(0, 212, 255, 0.4);
}

.hist-text {
    font-size: 0.82rem;
    color: var(--t2);
    overflow: hidden;
}

.hist-in {
    color: var(--t3);
    font-size: 0.7rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hist-out {
    color: var(--t1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hist-time {
    font-size: 0.68rem;
    color: var(--t3);
    white-space: nowrap;
}

.empty-msg {
    text-align: center;
    color: var(--t3);
    padding: 2rem;
    font-size: 0.85rem;
}

.empty-msg .em {
    color: var(--g);
    font-size: 1.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

/* ============================
    QUERY PARAMS BUILDER
============================ */
.param-row {
    display: grid;
    grid-template-columns: 1fr 1fr 36px;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    align-items: center;
}

.param-input {
    font-family: var(--mono);
    font-size: 0.83rem;
    background: var(--bg-0);
    border: 1px solid var(--border);
    color: var(--t1);
    padding: 0.5rem 0.75rem;
    border-radius: var(--r6);
    width: 100%;
    transition: border-color var(--dur) var(--ease);
}

.param-input:focus {
    outline: none;
    border-color: rgba(0, 255, 136, 0.35);
}

.param-input::placeholder {
    color: var(--t3);
}

.param-key {
    color: var(--y);
}

.param-val {
    color: var(--b);
}

.url-base-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
    margin-bottom: 1rem;
    align-items: center;
}

/* ============================
    HASH DISPLAY
============================ */
.hash-result {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hash-row {
    display: grid;
    grid-template-columns: 80px 1fr 36px;
    gap: 0.75rem;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
}

.hash-row:last-child {
    border-bottom: none;
}

.hash-alg {
    font-size: 0.7rem;
    color: var(--t3);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.hash-val {
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--g);
    word-break: break-all;
    background: var(--bg-0);
    border: 1px solid var(--border);
    border-radius: var(--r4);
    padding: 0.4rem 0.6rem;
}

/* ============================
    JWT VIEWER
============================ */
.jwt-parts {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.jwt-part {
    border-radius: var(--r8);
    overflow: hidden;
    border: 1px solid var(--border);
}

.jwt-part-head {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 0.4rem 0.75rem;
}

.jwt-header-p .jwt-part-head {
    background: rgba(255, 204, 0, 0.08);
    color: var(--y);
}

.jwt-payload-p .jwt-part-head {
    background: rgba(0, 212, 255, 0.08);
    color: var(--b);
}

.jwt-sig-p .jwt-part-head {
    background: rgba(204, 136, 255, 0.08);
    color: var(--p);
}

.jwt-json {
    font-family: var(--mono);
    font-size: 0.8rem;
    background: var(--bg-0);
    padding: 0.75rem 1rem;
    color: var(--t2);
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.8;
}

.jwt-key {
    color: var(--b);
}

.jwt-str {
    color: var(--g);
}

.jwt-num {
    color: var(--y);
}

.jwt-bool {
    color: var(--p);
}

/* ============================
    DIFF VIEW
============================ */
.diff-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.diff-output {
    font-family: var(--mono);
    font-size: 0.82rem;
    padding: 1rem;
    background: var(--bg-0);
    border: 1px solid var(--border);
    border-radius: var(--r8);
    min-height: 200px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.8;
}

.diff-add {
    background: rgba(0, 255, 136, 0.12);
    color: var(--g);
}

.diff-rem {
    background: rgba(255, 68, 102, 0.12);
    color: var(--r);
    text-decoration: line-through;
}

.diff-eq {
    color: var(--t2);
}

/* ============================
    COPY TOAST
============================ */
#toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: var(--bg-3);
    border: 1px solid var(--border-hi);
    color: var(--g);
    padding: 0.6rem 1.2rem;
    border-radius: var(--r8);
    font-size: 0.82rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5), 0 0 20px var(--glow);
    transform: translateY(60px);
    opacity: 0;
    transition: all 0.3s var(--ease);
    z-index: 9000;
    pointer-events: none;
}

#toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* ============================
    SECTION TITLES
============================ */
.section-title {
    font-family: var(--sans);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--t3);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.section-title .dot {
    color: var(--g);
}

/* ============================
    INFO GRID (ref table)
============================ */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
}

.info-card {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--r8);
    padding: 1rem;
    transition: border-color var(--dur) var(--ease);
}

.info-card:hover {
    border-color: var(--border-hi);
}

.info-card h3 {
    color: var(--g);
    font-size: 0.82rem;
    margin-bottom: 0.5rem;
    font-family: var(--sans);
    font-weight: 700;
}

.info-card p {
    color: var(--t2);
    font-size: 0.8rem;
    line-height: 1.6;
}

.info-card .ex {
    margin-top: 0.6rem;
    background: var(--bg-0);
    border-left: 2px solid var(--g-dim);
    padding: 0.5rem 0.75rem;
    border-radius: 0 var(--r4) var(--r4) 0;
    font-size: 0.75rem;
    color: var(--g);
    font-family: var(--mono);
}

/* ============================
    SETTINGS
============================ */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.setting-item {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--r8);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.setting-label {
    font-size: 0.82rem;
    color: var(--t2);
}

.setting-label small {
    display: block;
    color: var(--t3);
    font-size: 0.7rem;
    margin-top: 0.2rem;
}

.toggle {
    position: relative;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-track {
    position: absolute;
    inset: 0;
    background: var(--bg-4);
    border: 1px solid var(--border);
    border-radius: 99px;
    cursor: pointer;
    transition: all var(--dur) var(--ease);
}

.toggle-track::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--t3);
    top: 3px;
    left: 3px;
    transition: all var(--dur) var(--ease);
}

.toggle input:checked+.toggle-track {
    background: rgba(0, 255, 136, 0.2);
    border-color: var(--g);
}

.toggle input:checked+.toggle-track::after {
    background: var(--g);
    left: 21px;
}

/* ============================
    KEYBOARD SHORTCUTS
============================ */
.shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.5rem;
}

.shortcut-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--r6);
    font-size: 0.78rem;
}

.shortcut-row .action {
    color: var(--t2);
}

.shortcut-row .keys {
    display: flex;
    gap: 0.2rem;
}

.key {
    background: var(--bg-3);
    border: 1px solid var(--border);
    padding: 0.15rem 0.4rem;
    border-radius: var(--r4);
    font-size: 0.7rem;
    color: var(--g);
    border-bottom-width: 2px;
}

/* ============================
    FOOTER
============================ */
.footer {
  position: relative;
  width: 100%;
  background: var(--dark-gray);
  min-height: 100px;
  padding: 20px 50px;
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-blue) 50%, transparent 50%);
  background-size: 20px 2px;
  animation: slidingBorder 1s linear infinite;
}

@keyframes slidingBorder {
  0% { background-position: 0 0; }
  100% { background-position: 20px 0; }
}

.menu {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 10px 0;
  flex-wrap: wrap;
  flex-direction: column;
  gap: 10px;
}

.menu-item {
  list-style: none;
}

.menu-link {
  color: #fff;
  margin: 0 10px;
  display: inline-block;
  transition: 0.5s;
  text-decoration: none;
  opacity: 0.75;
}

.menu-link:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.footer p {
    color: #ffffff;
    margin: 15px 0 10px 0;
    font-size: var(--font-p);
    font-weight: 500;
    text-align: center;
}

.footer .contacts {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.footer .contact {
    text-decoration: none;
    color: var(--border-dark);
    display: inline; /* important for transform reliability */
    transition: transform 0.3s ease;
}

.footer .contact:hover {
    transform: translateY(-2px);
    color: var(--text-secondary);
}

.footer .contact.github:hover {
    color: #313647;
}

.footer .contact.instagram:hover {
    color: #E83C91;
}

.footer .contact.linkedin:hover {
    color: #008BFF;
}

.footer .contact.facebook:hover {
    color: #1877F2;
}

.footer .contact.gmail:hover {
    color: #f44336d8;
}

.footer i {
    margin-top: 20px;
    font-size: var(--font-h1);
}


/* ============================
    RESPONSIVE â€” MOBILE-FIRST
    Base  : < 480px   (default, single-column)
    480px : large mobile
    768px : tablet
    992px : small desktop
    1024px: desktop
    1280px: large desktop
    1440px: extra large
============================ */

/* â”€â”€ BASE (< 480px) â€” DROPDOWN mode â”€â”€ */
.header {
    position: relative;
    /* needed for dropdown panel absolute positioning */
    overflow: visible;      /* let panel paint below the header */
    padding: 0 0.85rem;
    height: 52px;
    min-height: unset;
    flex-wrap: nowrap;
    gap: 0;
}

.header-inner {
    flex-wrap: nowrap;
    gap: 0.5rem;
}

.logo {
    font-size: 0.92rem;
}

.logo-icon {
    font-size: 1.05rem;
}

/* show dropdown trigger, hide scroll wrapper */
.nav-dropdown-trigger {
    display: flex;
}

.tab-nav-wrapper {
    display: none;
}

/* .nav-dropdown-panel visibility is controlled by .open class â€” see base rule above */

.header-right {
    gap: 0.3rem;
}

.kbd-hint {
    display: none;
}

main {
    padding: 0.75rem 0.75rem 3rem;
}

.card-header {
    padding: 0.65rem 0.9rem;
}

.card-body {
    padding: 0.9rem;
}

.split {
    grid-template-columns: 1fr;
}

.split-mid {
    flex-direction: row;
    padding: 0.4rem 0;
    justify-content: center;
}

.arrow-btn {
    writing-mode: horizontal-tb;
    height: 34px;
    width: auto;
    padding: 0 0.85rem;
    font-size: 0.95rem;
}

textarea,
.code-output {
    min-height: 115px;
    font-size: 0.8rem;
}

.ctrl-row {
    gap: 0.4rem;
}

.ctrl-row .spacer {
    display: none;
}

.diff-grid {
    grid-template-columns: 1fr;
}

.hash-row {
    grid-template-columns: 56px 1fr 32px;
    gap: 0.45rem;
}

.hash-val {
    font-size: 0.68rem;
}

.hash-alg {
    font-size: 0.65rem;
}

.param-row {
    grid-template-columns: 1fr 1fr 32px;
    gap: 0.35rem;
}

.url-base-row {
    grid-template-columns: 1fr;
}

.url-base-row>button {
    margin-top: 0 !important;
}

.info-grid {
    grid-template-columns: 1fr;
    gap: 0.6rem;
}

.settings-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.shortcuts-grid {
    grid-template-columns: 1fr;
    gap: 0.4rem;
}

footer {
    flex-direction: column;
    text-align: center;
    padding: 1rem 0.75rem;
    gap: 0.6rem;
}

.footer-links {
    justify-content: center;
    gap: 0.9rem;
    font-size: 0.72rem;
}

#toast {
    bottom: 0.6rem;
    right: 0.6rem;
    font-size: 0.76rem;
    padding: 0.45rem 0.8rem;
}

/* â”€â”€ 480px â€” switch to SCROLL wrapper â”€â”€ */
@media (min-width: 480px) {
    .header {
    padding: 0 1rem;
    height: 56px;
    }

    .header-inner {
    gap: 0.5rem;
    }

    .logo {
    font-size: 0.98rem;
    }

    .logo-icon {
    font-size: 1.15rem;
    }

    /* hide dropdown, show scroll wrapper */
    .nav-dropdown-trigger {
    display: none;
    }

    .tab-nav-wrapper {
    display: flex;
    margin-left: 0.6rem;
    max-width: 52vw;
    flex: 1;
    }

    .nav-dropdown-panel {
    display: none !important;
    }

    /* force close if resizing */

    .tab-btn {
    font-size: 0.71rem;
    padding: 0.36rem 0.6rem;
    }

    .tab-scroll-btn {
    width: 22px;
    height: 22px;
    font-size: 0.95rem;
    }

    main {
    padding: 1rem 1rem 3.5rem;
    }

    .card-header {
    padding: 0.75rem 1.1rem;
    }

    .card-body {
    padding: 1rem;
    }

    textarea,
    .code-output {
    min-height: 125px;
    font-size: 0.83rem;
    }

    .arrow-btn {
    padding: 0 1rem;
    height: 36px;
    }

    .hash-row {
    grid-template-columns: 62px 1fr 34px;
    gap: 0.55rem;
    }

    .hash-val {
    font-size: 0.71rem;
    }

    .info-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.65rem;
    }

    .settings-grid {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    }

    .shortcuts-grid {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    }


    #toast {
    bottom: 0.75rem;
    right: 0.75rem;
    }
}

/* â”€â”€ 768px â€” TABLET â”€â”€ */
@media (min-width: 768px) {
    :root {
    --font-p: 15px;
    --font-h1: 1.6rem;
    --font-h2: 1.28rem;
    --font-h3: 1.15rem;
    --font-h4: 1.05rem;
    --font-li: 15px;
    --font-a: 15px;
    --font-i: 14px;
    --font-table: 15px;
    }

    .container    { max-width: 768px; }

    .logo img  { width: 28px; height: 28px; }

    .url {
        width: 35px;
        height: 30px;
    }

    .tool {
        font-size: var(--font-h3);
    }
    
    .header {
    padding: 0 1.5rem;
    height: 56px;
    min-height: unset;
    }

    .logo {
    font-size: 1.02rem;
    }

    .logo-icon {
    font-size: 1.2rem;
    }

    /* ensure scroll wrapper at this breakpoint */
    .nav-dropdown-trigger {
    display: none;
    }

    .tab-nav-wrapper {
    display: flex;
    margin-left: 0.85rem;
    max-width: none;
    flex: 1;
    }

    .tab-btn {
    font-size: 0.74rem;
    padding: 0.4rem 0.75rem;
    }

    .kbd-hint {
    display: inline-flex;
    font-size: 0.68rem;
    }

    main {
    padding: 1.25rem 1.5rem 3.75rem;
    }

    .card-header {
    padding: 0.82rem 1.2rem;
    }

    .card-body {
    padding: 1.15rem;
    }

    /* restore horizontal split */
    .split {
    grid-template-columns: 1fr 68px 1fr;
    }

    .split-mid {
    flex-direction: column;
    padding: 0 0.4rem;
    padding-top: 1.65rem;
    }

    .arrow-btn {
    writing-mode: vertical-rl;
    width: 100%;
    height: 38px;
    padding: 0;
    font-size: 1rem;
    }

    textarea,
    .code-output {
    min-height: 145px;
    font-size: 0.86rem;
    }

    .ctrl-row .spacer {
    display: block;
    }

    .diff-grid {
    grid-template-columns: 1fr 1fr;
    }

    .hash-row {
    grid-template-columns: 70px 1fr 36px;
    gap: 0.68rem;
    }

    .hash-val {
    font-size: 0.75rem;
    }

    .hash-alg {
    font-size: 0.68rem;
    }

    .param-row {
    grid-template-columns: 1fr 1fr 36px;
    gap: 0.5rem;
    }

    .url-base-row {
    grid-template-columns: 1fr auto;
    }

    .url-base-row>button {
    margin-top: 1.4rem !important;
    }

    .info-grid {
    grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
    gap: 0.72rem;
    }

    .settings-grid {
    grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
    gap: 0.9rem;
    }

    .shortcuts-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.45rem;
    }


    #toast {
    bottom: 1.25rem;
    right: 1.25rem;
    }
}

/* â”€â”€ 992px â€” SMALL DESKTOP â”€â”€ */
@media (min-width: 992px) {
    .header {
    padding: 0 1.75rem;
    height: 57px;
    }

    .tool {
        font-size: var(--font-h3);
    }

    .logo {
    font-size: 1.05rem;
    }

    .tab-nav-wrapper {
    margin-left: 1.25rem;
    }

    .tab-btn {
    font-size: 0.76rem;
    padding: 0.42rem 0.88rem;
    }

    main {
    padding: 1.4rem 1.75rem 4rem;
    }

    .card-header {
    padding: 0.85rem 1.25rem;
    }

    .card-body {
    padding: 1.2rem;
    }

    .split {
    grid-template-columns: 1fr 74px 1fr;
    }

    .split-mid {
    padding-top: 1.75rem;
    }

    .arrow-btn {
    height: 39px;
    }

    textarea,
    .code-output {
    min-height: 152px;
    font-size: 0.87rem;
    }

    .hash-row {
    grid-template-columns: 75px 1fr 36px;
    gap: 0.72rem;
    }

    .info-grid {
    grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
    gap: 0.75rem;
    }

    .settings-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.95rem;
    }

}

/* â”€â”€ 1024px â€” DESKTOP â”€â”€ */
@media (min-width: 1024px) {
    :root {
    --font-p: 17px;
    --font-h1: 1.8rem;
    --font-h2: 1.45rem;
    --font-h3: 1.28rem;
    --font-h4: 1.1rem;
    --font-li: 17px;
    --font-a: 16px;
    --font-i: 15px;
    --font-table: 16px;
    }

    .header {
    padding: 0 2rem;
    height: 58px;
    }

    .logo {
    font-size: 1.1rem;
    }

    .logo-icon {
    font-size: 1.3rem;
    }

    .url {
        width: 40px;
        height: 35px;
    }

    .tool {
        font-size: var(--font-h3);
    }

    .tab-nav-wrapper {
        margin-left: 2rem;
        max-width: 730px;
    }

    .tab-btn {
    font-size: 0.78rem;
    padding: 0.45rem 1rem;
    }

    .kbd-hint {
    font-size: 0.7rem;
    }

    main {
    max-width: 1400px;
    padding: 1.5rem 2rem 4rem;
    }

    .card-header {
    padding: 0.85rem 1.25rem;
    }

    .card-body {
    padding: 1.25rem;
    }

    .split {
    grid-template-columns: 1fr 80px 1fr;
    }

    .split-mid {
    padding-top: 1.8rem;
    }

    .arrow-btn {
    height: 40px;
    }

    textarea,
    .code-output {
    min-height: 160px;
    font-size: 0.88rem;
    }

    .hash-row {
    grid-template-columns: 80px 1fr 36px;
    gap: 0.75rem;
    }

    .hash-val {
    font-size: 0.78rem;
    }

    .hash-alg {
    font-size: 0.7rem;
    }

    .info-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
    }

    .settings-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    }

    .shortcuts-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.5rem;
    }

    #toast {
    bottom: 1.5rem;
    right: 1.5rem;
    font-size: 0.82rem;
    }

    .logo-txt {
        font-size: var(--logo-size);
    }

    .container        { max-width: 1200px; margin: 0 auto; }
    .navbar .container{ max-width: 100%;   padding: 0 40px; }
    .logo img         { width: 29px;       height: 29px; }
    .menu-toggle      { display: none; }

    .navbar {
        position: relative;
        color: white;
        text-align: center;
        border-radius: 5px;
        overflow: hidden;
    }
    .navbar .container      { flex-direction: row; align-items: center; justify-content: space-between; }
    .navbar .logo           { font-size: 1.3rem; width: auto; justify-content: flex-start; }
    .navbar .nav-links      { position: static; max-height: none; flex-direction: row; margin-bottom: 0; padding-top: 0; width: auto; }
    .navbar .nav-links ul   { display: flex; flex-direction: row; align-items: center; margin-left: 0; width: auto; }
    .navbar .nav-links ul li a { padding: 10px 15px; width: auto; white-space: nowrap; }

    .footer .contacts   { flex-direction: row; gap: 20px; }
    .menu               { flex-direction: row; }

}

/* â”€â”€ 1280px â€” LARGE DESKTOP â”€â”€ */
@media (min-width: 1280px) {
    :root {
    --font-p: 17.5px;
    --font-h1: 1.82rem;
    --font-h2: 1.52rem;
    --font-h3: 1.32rem;
    --font-h4: 1.15rem;
    --font-li: 18px;
    --font-a: 16.5px;
    --font-i: 15.5px;
    --font-table: 16.5px;

    --big-spd-size: 52px;
    --sv-n-size: 25px;
    }

    .container { max-width: 1280px; }
    .logo img  { width: 32px; height: 32px; }

    .url {
        width: 45px;
        height: 40px;
    }

    .tool {
        font-size: var(--font-h3);
    }

    .header {
    padding: 0 2.5rem;
    }

    .tab-btn {
    font-size: 0.79rem;
    padding: 0.46rem 1.05rem;
    }

    .kbd-hint {
    font-size: 0.71rem;
    }

    main {
    padding: 1.75rem 2.5rem 4.5rem;
    }

    .card-header {
    padding: 0.9rem 1.4rem;
    }

    .card-body {
    padding: 1.35rem;
    }

    .split {
    grid-template-columns: 1fr 82px 1fr;
    }

    textarea,
    .code-output {
    min-height: 168px;
    font-size: 0.89rem;
    }

    .hash-row {
    grid-template-columns: 84px 1fr 36px;
    gap: 0.8rem;
    }

    /* Reference: up to 4-col */
    .info-grid {
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 0.9rem;
    }

    .settings-grid {
    grid-template-columns: repeat(auto-fill, minmax(275px, 1fr));
    }

    .shortcuts-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

/* â”€â”€ 1440px â€” EXTRA LARGE â”€â”€ */
@media (min-width: 1440px) {
    :root {
    --font-p: 18px;
    --font-h1: 1.875rem;
    --font-h2: 1.55rem;
    --font-h3: 1.39rem;
    --font-h4: 1.2rem;
    --font-li: 18.5px;
    --font-a: 17px;
    --font-i: 16px;
    --font-table: 17px;
    }

    .container { max-width: 1440px; }

    .header {
    padding: 0 3rem;
    }

    .tab-btn {
    font-size: 0.8rem;
    padding: 0.48rem 1.1rem;
    }

    .btn {
    font-size: 0.84rem;
    }

    main {
    max-width: 1520px;
    padding: 2rem 3rem 5rem;
    }

    .card-header {
    padding: 1rem 1.5rem;
    }

    .card-body {
    padding: 1.5rem;
    }

    .split {
    grid-template-columns: 1fr 86px 1fr;
    }

    .arrow-btn {
    height: 42px;
    }

    textarea,
    .code-output {
    min-height: 178px;
    font-size: 0.9rem;
    }

    .hash-row {
    grid-template-columns: 88px 1fr 36px;
    gap: 0.85rem;
    }

    .hash-val {
    font-size: 0.8rem;
    }

    /* Pin 4-col info grid */
    .info-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    }

    .settings-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.1rem;
    }

    .shortcuts-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.55rem;
    }

    #toast {
    bottom: 2rem;
    right: 2rem;
    font-size: 0.84rem;
    padding: 0.65rem 1.3rem;
    }
}

/* ============================
    ANIMATIONS
============================ */
@keyframes fade-in {
    from {
    opacity: 0;
    transform: translateY(8px);
    }

    to {
    opacity: 1;
    transform: translateY(0);
    }
}

.panel.active {
    animation: fade-in 0.25s var(--ease);
}

.glow-g {
    color: var(--g);
    text-shadow: 0 0 12px rgba(0, 255, 136, 0.6);
}

.glow-b {
    color: var(--b);
    text-shadow: 0 0 12px rgba(0, 212, 255, 0.6);
}
