:root {
    --bg: #eef3fb;
    --surface: rgba(255, 255, 255, 0.92);
    --surface-strong: #ffffff;
    --surface-muted: #f5f7fb;
    --border: rgba(148, 163, 184, 0.22);
    --border-strong: rgba(148, 163, 184, 0.35);
    --text: #102033;
    --text-muted: #62748a;
    --primary: #1f5eff;
    --primary-strong: #1848c6;
    --primary-soft: rgba(31, 94, 255, 0.12);
    --accent: #0f9f8f;
    --success: #1f7a44;
    --danger: #c0392b;
    --warning: #c98b1d;
    --shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
    --radius: 20px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(31, 94, 255, 0.16), transparent 36%),
        radial-gradient(circle at bottom right, rgba(15, 159, 143, 0.12), transparent 32%),
        var(--bg);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

textarea,
input,
select {
    width: 100%;
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    background: var(--surface-strong);
    color: var(--text);
}

textarea:focus,
input:focus,
select:focus {
    outline: none;
    border-color: rgba(31, 94, 255, 0.45);
    box-shadow: 0 0 0 4px rgba(31, 94, 255, 0.12);
}

textarea {
    resize: vertical;
}

.app-shell {
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(320px, 88vw);
    display: flex;
    flex-direction: column;
    padding: 20px 16px;
    background: rgba(8, 22, 44, 0.92);
    backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.94);
    transform: translateX(-104%);
    transition: transform 0.18s ease;
    z-index: 1100;
    overflow: hidden;
}

.sidebar-brand {
    flex: 0 0 auto;
    padding: 6px 8px 18px;
}

.sidebar-brand-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    width: 100%;
    padding: 0 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(31, 94, 255, 0.92), rgba(15, 159, 143, 0.88));
    font-weight: 700;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 1rem;
}

.brand-name {
    font-size: 1.05rem;
    letter-spacing: 0.02em;
}

.sidebar-collapse {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.9);
}

.sidebar-collapse-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    font-size: 0.95rem;
}

.sidebar-collapse-text {
    font-size: 0.92rem;
    font-weight: 700;
}

.brand-text {
    margin: 12px 0 0;
    color: rgba(226, 232, 240, 0.74);
    font-size: 0.86rem;
    line-height: 1.6;
}

.sidebar-nav {
    display: grid;
    gap: 18px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    align-content: start;
    padding: 4px 8px 12px;
    margin: 0 -8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sidebar-nav::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.sidebar-footer {
    flex: 0 0 auto;
    padding: 14px 8px 4px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.nav-group {
    display: grid;
    gap: 10px;
}

.nav-group-title {
    margin: 0;
    padding: 0 8px;
    color: rgba(191, 219, 254, 0.78);
    font-size: 0.76rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.nav-list {
    list-style: none;
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.nav-link {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 18px;
    color: rgba(241, 245, 249, 0.9);
    transition: background-color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
    border: 1px solid transparent;
}

.nav-link:hover,
.nav-link.is-active {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(148, 163, 184, 0.24);
    transform: translateY(-1px);
}

.nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    font-weight: 700;
}

.nav-copy {
    display: grid;
    gap: 2px;
}

.nav-copy strong {
    font-size: 0.96rem;
}

.nav-copy small {
    color: rgba(226, 232, 240, 0.68);
    line-height: 1.45;
}

.app-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.24s ease, visibility 0.24s ease;
    z-index: 1080;
}

.app-main {
    min-width: 0;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    padding: 18px 20px 14px;
    background: rgba(238, 243, 251, 0.78);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.sidebar-toggle {
    width: 46px;
    height: 46px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.76);
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 0 12px;
}

.sidebar-toggle span {
    display: block;
    height: 2px;
    border-radius: 999px;
    background: var(--text);
}

.section-eyebrow {
    display: inline-block;
    color: var(--primary-strong);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.topbar-title {
    margin: 0;
    font-size: clamp(1.2rem, 1.8vw, 1.55rem);
    line-height: 1.2;
    font-weight: 700;
}

.content-area {
    width: min(1560px, 100%);
    max-width: 1560px;
    margin: 0 auto;
    padding: 18px 20px 24px;
    transition: opacity 0.16s ease;
}

.app-main.is-loading .content-area {
    opacity: 0.72;
    pointer-events: none;
}

.page-header {
    margin-bottom: 18px;
}

.page-header h2 {
    margin: 0 0 8px;
    font-size: clamp(1.5rem, 2.2vw, 2.2rem);
    line-height: 1.2;
}

.page-header p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.7;
}

.section-block {
    margin-top: 26px;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.section-heading h2 {
    margin: 6px 0 0;
    font-size: 1.35rem;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card + .card,
.card + .section-block {
    margin-top: 18px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 20px 22px 0;
    flex-wrap: wrap;
}

.card-header h2 {
    margin: 0;
    font-size: 1.1rem;
}

.card-body {
    padding: 22px;
}

.module-json .card-body,
.module-password .card-body {
    padding: 20px;
}

.ip-info-compact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 18px 20px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(31, 94, 255, 0.98), rgba(15, 159, 143, 0.88));
    color: #ffffff;
}

.ip-label {
    color: rgba(255, 255, 255, 0.78);
    font-weight: 600;
}

.ip-value {
    font-weight: 700;
}

.ip-separator,
.ip-loading,
.ip-error {
    color: rgba(255, 255, 255, 0.84);
}

.tool-grid,
.stats-grid,
.tip-grid {
    display: grid;
    gap: 16px;
}

.tool-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.tool-card {
    display: grid;
    gap: 14px;
    padding: 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.tool-card:hover {
    transform: translateY(-3px);
    border-color: rgba(31, 94, 255, 0.22);
    box-shadow: 0 20px 44px rgba(15, 23, 42, 0.1);
}

.tool-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(31, 94, 255, 0.14), rgba(15, 159, 143, 0.16));
    color: var(--primary-strong);
    font-weight: 800;
    font-size: 1.05rem;
}

.tool-copy h3 {
    margin: 0 0 6px;
    font-size: 1.02rem;
}

.tool-copy p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.65;
}

.tool-link-indicator {
    color: var(--primary-strong);
    font-weight: 700;
    font-size: 0.92rem;
}

.tip-card,
.stat-card {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--border);
}

.tip-card strong {
    margin: 0 0 12px;
}

.generator-container,
.converter-grid,
.timestamp-grid {
    display: grid;
    gap: 18px;
}

.generator-container > .card,
.timestamp-grid > .card {
    margin-top: 0;
}

.form-group {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    font-weight: 700;
}

.tool-textarea,
.json-parser textarea,
#jsonInput,
#encodingInput,
#encodingOutput,
.tool-input {
    min-height: 180px;
    padding: 14px 16px;
    line-height: 1.6;
}

.tool-input {
    min-height: auto;
    padding: 13px 15px;
}

.json-container {
    display: grid;
    grid-template-columns: 72px 1fr;
    border: 1px solid var(--border-strong);
    border-radius: 18px;
    overflow: hidden;
    background: #f8fafc;
}

.line-number-container {
    background: #edf2f7;
    color: #64748b;
    border-right: 1px solid var(--border);
    text-align: right;
}

.line-number-container pre,
.json-content-container pre {
    margin: 0;
    padding: 14px;
    font-family: "JetBrains Mono", "Consolas", monospace;
    font-size: 14px;
    line-height: 1.6;
}

.json-content-container {
    overflow: auto;
}

.json-content-container pre {
    background: #f8fafc;
    white-space: pre-wrap;
    word-break: break-word;
    color: #334155;
}

.result-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin: 24px 0 14px;
    font-size: 1.05rem;
}

.result-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    min-width: 0;
}

.result-title {
    font-weight: 700;
    color: var(--text);
}

.result-copy-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.truncate-length-control {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-strong);
    color: var(--text-muted);
    font-size: 0.92rem;
    font-weight: 600;
}

.truncate-length-control input,
.numeric-inline-control input {
    width: 74px;
    min-width: 74px;
    min-height: 32px;
    padding: 4px 8px;
    border-radius: 10px;
    text-align: center;
}

.numeric-inline-control {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-strong);
    color: var(--text-muted);
    font-size: 0.92rem;
    font-weight: 600;
}

.font-size-controls,
.inline-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.font-button,
.btn-primary,
.btn-secondary,
.btn-copy,
.btn-preset,
.btn-generate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 14px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #4685ff);
    color: #fff;
    box-shadow: 0 12px 22px rgba(31, 94, 255, 0.18);
}

.btn-primary:hover {
    transform: translateY(-1px);
}

.btn-secondary,
.btn-copy,
.btn-preset,
.font-button {
    background: var(--surface-strong);
    border-color: var(--border);
    color: var(--text);
}

.btn-copy:disabled,
.btn-secondary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn-copy-result {
    min-height: 40px;
    padding: 0 14px;
}

.button-group,
.password-actions,
.preset-buttons,
.mode-buttons,
.mode-pills,
.converter-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.mode-buttons {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mode-btn,
.mode-pill {
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--surface-strong);
    color: var(--text);
    font-weight: 700;
}

.collapsible-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    margin-bottom: 12px;
}

.label-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.optional-tag {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
}

.toggle-icon {
    color: var(--primary-strong);
    font-weight: 800;
}

.mode-btn.active,
.mode-pill.is-active,
.format-radio-item.active {
    background: linear-gradient(135deg, rgba(31, 94, 255, 0.96), rgba(15, 159, 143, 0.92));
    color: #ffffff;
    border-color: transparent;
}

.current-charset,
.length-control,
.custom-options,
.custom-format-input,
.format-notice,
.format-preview,
.format-hint,
.tip-card p,
.tool-intro {
    color: var(--text-muted);
}

.current-charset,
.length-control,
.custom-options,
.custom-format-input,
.format-notice,
.format-preview,
.format-hint {
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
}

.length-control {
    display: grid;
    gap: 12px;
}

.length-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.length-label,
.preview-label,
.custom-title,
.stat-label {
    font-weight: 700;
    color: var(--text);
}

.length-input-control input {
    width: 88px;
    min-width: 88px;
}

#lengthSlider {
    flex: 1;
    min-width: 160px;
}

.format-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.format-radio-item {
    display: block;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface-strong);
    cursor: pointer;
    overflow: hidden;
}

.format-radio-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.format-radio-content {
    display: grid;
    gap: 4px;
    padding: 14px;
}

.format-name {
    font-weight: 700;
}

.format-desc {
    color: var(--text-muted);
    font-family: "JetBrains Mono", "Consolas", monospace;
    font-size: 0.82rem;
}

.format-radio-item.active .format-desc {
    color: rgba(255, 255, 255, 0.86);
}

.format-input-wrapper {
    display: flex;
    gap: 10px;
}

.format-input-wrapper input {
    padding: 12px 14px;
}

.btn-format-help {
    width: 46px;
    min-width: 46px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), #4685ff);
    color: #fff;
    font-weight: 800;
}

.format-hint {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.hint-text,
.notice-text,
.preview-text {
    line-height: 1.6;
}

.preview-text {
    color: var(--text);
    font-weight: 700;
    word-break: break-all;
}

.hint-icon,
.notice-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: rgba(31, 94, 255, 0.12);
    color: var(--primary-strong);
    font-size: 0.9rem;
    font-weight: 800;
}

.format-preview,
.format-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.format-notice-error {
    background: rgba(192, 57, 43, 0.08);
    border-color: rgba(192, 57, 43, 0.18);
}

.format-notice-error .notice-text,
.error {
    color: var(--danger);
}

.error {
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(192, 57, 43, 0.08);
    border: 1px solid rgba(192, 57, 43, 0.18);
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--surface-strong);
    border: 1px solid var(--border);
    margin-top: 10px;
}

.checkbox-item:first-of-type {
    margin-top: 0;
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    flex: 0 0 auto;
    accent-color: var(--primary);
}

.checkbox-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-icon {
    color: var(--primary-strong);
}

.password-display {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 124px;
    padding: 20px;
    border-radius: 18px;
    background: linear-gradient(180deg, #f8fafc, #eef3fb);
    border: 1px dashed rgba(31, 94, 255, 0.22);
    color: var(--text-muted);
    font-family: "JetBrains Mono", "Consolas", monospace;
    text-align: center;
    word-break: break-all;
}

.password-strength {
    margin-top: 16px;
    padding: 16px;
    border-radius: 18px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
}

.strength-label {
    font-weight: 700;
    margin-bottom: 10px;
}

.strength-bar {
    height: 12px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.2);
    overflow: hidden;
    margin-bottom: 8px;
}

.strength-fill {
    height: 100%;
    border-radius: inherit;
}

.strength-text {
    font-weight: 700;
}

.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.stat-card {
    display: grid;
    gap: 10px;
}

.stat-card strong {
    font-size: 1.05rem;
    line-height: 1.5;
    word-break: break-word;
}

.stat-copy {
    width: fit-content;
}

.timestamp-result-grid {
    margin-top: 20px;
}

.converter-grid {
    grid-template-columns: 1fr;
    align-items: start;
}

.converter-actions {
    justify-content: flex-start;
    align-content: start;
}

.tip-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    margin-top: 18px;
}

.tip-card p,
.tool-intro {
    margin: 0;
    line-height: 1.7;
}

.tool-intro {
    margin-bottom: 18px;
}

.mode-pills {
    margin-bottom: 18px;
}

.module-json .tool-intro,
.module-password .page-header + .generator-container {
    margin-bottom: 0;
}

.module-json .tool-intro {
    margin-bottom: 14px;
}

.module-json #jsonInput {
    min-height: 168px;
}

.module-json .button-group {
    margin: 14px 0 0;
}

.module-json .paste-hint {
    display: block;
    margin-top: 8px;
    color: var(--text-muted);
    line-height: 1.6;
}

.module-json .result-header {
    margin: 20px 0 14px;
}

.module-password .generator-container {
    align-items: stretch;
}

.module-password .generator-container > .card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.module-password .generator-container > .card .card-body {
    flex: 1 1 auto;
}

.module-password .form-group {
    margin-bottom: 16px;
}

.module-password .length-control,
.module-password .current-charset,
.module-password .custom-options,
.module-password .custom-format-input,
.module-password .format-notice,
.module-password .format-preview,
.module-password .format-hint {
    padding: 13px 14px;
    border-radius: 14px;
}

.module-password .current-charset {
    margin-top: 2px;
}

.module-password .custom-options {
    margin-top: 8px;
}

.module-password .custom-options-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.module-password .checkbox-item {
    margin-top: 0;
    min-height: 48px;
    padding: 10px 12px;
}

.module-password .checkbox-text {
    min-width: 0;
    font-size: 0.92rem;
    line-height: 1.45;
}

.module-password .checkbox-text span:last-child {
    word-break: break-word;
}

.module-password .preset-buttons {
    margin-top: 2px;
}

.module-password .password-result {
    display: block;
    min-height: 0;
}

.module-password .password-display {
    flex: none;
    min-height: 100px;
}

.module-password .password-actions {
    margin-top: 16px;
}

.module-password .password-strength {
    margin-top: 16px;
}

.footer {
    padding: 0 20px 24px;
}

.footer-container {
    max-width: 1560px;
    margin: 0 auto;
    padding: 18px 20px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--border);
    color: var(--text-muted);
    text-align: center;
}

.json-key { color: #bb2c4a; }
.json-string { color: #14705d; }
.json-number { color: #244dc4; }
.json-boolean { color: #8a3db0; }
.json-null { color: #d97706; }

.sidebar-open .sidebar {
    transform: translateX(0);
}

.sidebar-open .app-overlay {
    opacity: 1;
    visibility: visible;
}

@media (min-width: 768px) {
    .topbar {
        padding: 24px 28px 18px;
    }

    .content-area {
        padding: 24px 28px 32px;
    }

    .tool-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .generator-container {
        grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.9fr);
    }

    .converter-grid {
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    }

    .converter-actions {
        flex-direction: column;
        min-width: 150px;
        justify-content: center;
    }

    .timestamp-grid {
        grid-template-columns: 1fr;
    }

    .module-password .password-display {
        min-height: 80px;
    }
}

@media (min-width: 1024px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        transform: none;
        width: 280px;
        z-index: 1000;
    }

    .app-overlay,
    .sidebar-toggle {
        display: none;
    }

    .sidebar-collapse {
        display: inline-flex;
    }

    .app-main {
        min-height: 100vh;
        margin-left: 280px;
        transition: margin-left 0.18s ease;
    }

    .sidebar-collapsed .sidebar {
        width: 88px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .sidebar-collapsed .app-main {
        margin-left: 88px;
    }

    .sidebar-collapsed .brand-name,
    .sidebar-collapsed .brand-text,
    .sidebar-collapsed .nav-copy,
    .sidebar-collapsed .nav-group-title {
        display: none;
    }

    .sidebar-collapsed .sidebar-brand-header {
        justify-content: center;
    }

    .sidebar-collapsed .brand-link {
        justify-content: center;
        width: 52px;
        padding: 0;
        flex: 0 0 auto;
    }

    .sidebar-collapsed .sidebar-footer {
        padding-left: 0;
        padding-right: 0;
        border-top-color: transparent;
    }

    .sidebar-collapsed .sidebar-nav {
        gap: 12px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .sidebar-collapsed .nav-group {
        gap: 8px;
    }

    .sidebar-collapsed .nav-list {
        gap: 12px;
    }

    .sidebar-collapsed .sidebar-collapse {
        width: 52px;
        padding: 0;
        margin: 0 auto;
    }

    .sidebar-collapsed .sidebar-collapse-text {
        display: none;
    }

    .sidebar-collapsed .nav-link {
        grid-template-columns: 1fr;
        justify-items: center;
        width: 64px;
        margin: 0 auto;
        padding: 10px 0;
    }

    .tool-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .timestamp-grid {
        grid-template-columns: 1fr 1.05fr;
    }

    .module-password .custom-options-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .module-password .checkbox-item {
        min-height: 50px;
    }

}

@media (max-width: 767px) {
    .topbar {
        padding-bottom: 12px;
    }

    .card-header,
    .card-body {
        padding-left: 18px;
        padding-right: 18px;
    }

    .mode-buttons {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .json-container {
        grid-template-columns: 58px 1fr;
    }

    .line-number-container pre,
    .json-content-container pre {
        padding: 12px 10px;
    }

    .tool-textarea,
    .json-parser textarea,
    #jsonInput,
    #encodingInput,
    #encodingOutput {
        min-height: 160px;
    }

    .footer {
        padding: 0 16px 18px;
    }

    .footer-container {
        padding: 16px;
    }

    .module-json .card-body,
    .module-password .card-body {
        padding: 18px;
    }

    .module-json .result-header {
        gap: 12px;
    }

    .result-toolbar,
    .result-copy-actions {
        width: 100%;
    }

    .module-password .custom-options-grid {
        grid-template-columns: 1fr;
    }

    .module-password .password-display {
        min-height: 100px;
    }
}
