* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #10b981;
    --accent: #8b5cf6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border: rgba(148, 163, 184, 0.2);
    --glass: rgba(255, 255, 255, 0.05);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 25%, #312e81 50%, #1e1b4b 75%, #0f172a 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    position: relative;
    overflow-y: auto;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.app {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    width: 100%;
    max-width: 1160px;
    position: relative;
    z-index: 1;
}

.card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.sidebar {
    width: 300px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.main {
    flex: 1;
    min-width: 0;
    padding: 32px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--primary);
    color: white;
    padding: 10px 18px;
    border-radius: 0 0 10px 0;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 10;
}

.skip-link:focus {
    left: 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 2px 6px 0;
}

.brand-icon {
    width: 34px;
    height: 34px;
    color: var(--secondary);
    flex-shrink: 0;
}

.brand-name {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.brand-tag {
    color: var(--text-secondary);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.tool-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.6);
    color: var(--text-secondary);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.tool-search:focus-within {
    border-color: var(--primary);
    box-shadow:
        0 0 0 4px rgba(99, 102, 241, 0.1),
        0 0 20px rgba(99, 102, 241, 0.2);
}

.tool-search input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: inherit;
}

.tool-search input::placeholder {
    color: var(--text-secondary);
}

.tool-search input::-webkit-search-cancel-button {
    cursor: pointer;
}

.tool-nav {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.nav-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-group[hidden] {
    display: none;
}

.nav-group-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 7px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.63rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    text-align: left;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}

.nav-group-toggle:hover {
    background: var(--glass);
    color: var(--text-primary);
}

.nav-group-toggle:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 1px;
}

.nav-group-toggle > .lucide {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.nav-group-label {
    flex: 1;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: inherit;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    transition: color 0.22s ease, letter-spacing 0.22s ease;
}

.nav-group-toggle:hover .nav-group-label {
    letter-spacing: 0.13em;
}

.nav-group.has-active > .nav-group-toggle .nav-group-label {
    color: var(--secondary);
}

.nav-group.has-active > .nav-group-toggle .nav-group-label::after {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 8px currentColor;
}

.nav-group-toggle > .nav-group-chevron {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-group.is-collapsed .nav-group-chevron {
    transform: rotate(-90deg);
}

.nav-group.has-active > .nav-group-toggle {
    color: var(--text-primary);
}

.nav-group-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-left: 10px;
    padding-left: 10px;
    border-left: 1px solid var(--border);
}

.nav-group.is-collapsed .nav-group-items {
    display: none;
}

.nav-group:not(.is-collapsed) .nav-group-items {
    animation: navGroupOpen 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes navGroupOpen {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.8rem;
    text-align: left;
}

.nav-btn > .lucide {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.nav-label {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.83rem;
}

.nav-desc {
    color: var(--text-secondary);
    font-size: 0.68rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-btn:hover {
    background: var(--glass);
    border-color: var(--border);
}

.nav-btn:hover .nav-label {
    color: var(--text-primary);
}

.nav-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.nav-btn.active .nav-label,
.nav-btn.active .nav-desc,
.nav-btn.active > .lucide {
    color: white;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 10px;
    color: var(--success);
    font-size: 0.7rem;
    font-weight: 600;
}

.sidebar-footer p {
    color: var(--text-secondary);
    font-size: 0.72rem;
    text-align: center;
}

.sidebar-footer a {
    color: var(--primary);
    text-decoration: none;
}

.sidebar-footer a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

.tool-header {
    margin-bottom: 24px;
}

.tool-header h1 {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.3));
    margin-bottom: 6px;
}

.tool-header p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
}

.input-group {
    margin-bottom: 20px;
}

label {
    display: block;
    color: var(--text-primary);
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.01em;
}

textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid var(--border);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.6);
    color: var(--text-primary);
    font-size: 0.9rem;
    resize: vertical;
    min-height: 100px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow:
        0 0 0 4px rgba(99, 102, 241, 0.1),
        0 0 20px rgba(99, 102, 241, 0.2);
    background: rgba(15, 23, 42, 0.8);
}

textarea::placeholder {
    color: var(--text-secondary);
}

.algorithm-select {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.algorithm-btn {
    padding: 10px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--glass);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.8rem;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.algorithm-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.3s;
}

.algorithm-btn:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.25);
}

.algorithm-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: transparent;
    color: white;
    box-shadow:
        0 8px 25px rgba(99, 102, 241, 0.4),
        0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* Convert Case Tool */
.case-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
    margin-bottom: 20px;
}

.case-option {
    width: 100%;
    text-align: center;
}

.case-output {
    min-height: 150px;
    margin-bottom: 4px;
    background: rgba(16, 185, 129, 0.06);
    border-color: rgba(16, 185, 129, 0.2);
}

.case-output:focus {
    border-color: rgba(16, 185, 129, 0.45);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
    background: rgba(15, 23, 42, 0.8);
}

.case-actions {
    margin-top: 12px;
}

.generate-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow:
        0 4px 15px rgba(99, 102, 241, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.generate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.generate-btn:hover {
    transform: translateY(-3px);
    box-shadow:
        0 12px 35px rgba(99, 102, 241, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.2);
}

.generate-btn:hover::before {
    left: 100%;
}

.generate-btn:active {
    transform: translateY(-1px);
}

.result-container {
    margin-top: 20px;
    padding: 18px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 14px;
    border: 1px solid var(--border);
    display: none;
}

.result-container.visible {
    display: block;
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-label {
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.result-value {
    color: var(--success);
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 0.85rem;
    word-break: break-all;
    line-height: 1.6;
    background: rgba(16, 185, 129, 0.1);
    padding: 14px;
    border-radius: 10px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.copy-btn {
    margin-top: 12px;
    padding: 10px 18px;
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.8rem;
    font-weight: 600;
}

.copy-btn:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.5);
    transform: translateY(-2px);
}

.copy-btn.copied {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.info {
    margin-top: 18px;
    padding: 14px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 10px;
    border-left: 4px solid var(--primary);
}

.info p {
    color: var(--text-secondary);
    font-size: 0.75rem;
    line-height: 1.5;
}

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

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.password-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.option-group {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 10px;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.option-group:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.option-group input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: var(--primary);
    cursor: pointer;
    border-radius: 6px;
}

.option-group label {
    margin: 0;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 0.8rem;
}

.symbols-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 12px;
}

.symbols-group > div {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.symbols-group > div input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: var(--primary);
    cursor: pointer;
    border-radius: 6px;
}

.symbols-group > div label {
    margin: 0;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 0.8rem;
}

.custom-symbols-input-inline {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.6);
    color: var(--text-primary);
    font-size: 0.8rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
}

.custom-symbols-input-inline:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow:
        0 0 0 3px rgba(99, 102, 241, 0.1),
        0 0 15px rgba(99, 102, 241, 0.2);
    background: rgba(15, 23, 42, 0.8);
}

.custom-symbols-input-inline::placeholder {
    color: var(--text-secondary);
}

.length-control {
    margin-bottom: 20px;
}

.length-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.length-value {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1rem;
    min-width: 45px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.length-slider {
    width: 100%;
    height: 10px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.6);
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.length-slider::-webkit-slider-runnable-track {
    height: 10px;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.length-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.3),
        0 0 0 4px rgba(99, 102, 241, 0.2);
    margin-top: -9px;
    transition: transform 0.2s;
}

.length-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.length-slider::-moz-range-track {
    height: 10px;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.length-slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: none;
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.3),
        0 0 0 4px rgba(99, 102, 241, 0.2);
}

.length-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.length-input {
    width: 80px;
    padding: 8px 14px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.6);
    color: var(--text-primary);
    font-size: 0.95rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
}

.length-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow:
        0 0 0 4px rgba(99, 102, 241, 0.1),
        0 0 20px rgba(99, 102, 241, 0.2);
}

.length-input.invalid {
    border-color: var(--danger);
    box-shadow:
        0 0 0 4px rgba(239, 68, 68, 0.1),
        0 0 20px rgba(239, 68, 68, 0.2);
}

.length-error {
    color: var(--danger);
    font-size: 0.75rem;
    margin-top: 8px;
    min-height: 18px;
    font-weight: 500;
}

.password-display {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 18px;
    border: 1px solid var(--border);
}

.password-text {
    color: var(--success);
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 1.1rem;
    word-break: break-all;
    text-align: center;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.password-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.password-actions button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.85rem;
    font-weight: 600;
}

.generate-password-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.generate-password-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.copy-password-btn {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 2px solid rgba(16, 185, 129, 0.3);
}

.copy-password-btn:hover {
    background: rgba(16, 185, 129, 0.25);
    border-color: rgba(16, 185, 129, 0.5);
    transform: translateY(-2px);
}

.copy-password-btn.copied {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.strength-meter {
    margin-top: 16px;
}

.strength-bar {
    height: 8px;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.6);
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 6px;
}

.strength-label {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.75rem;
}

.strength-text {
    color: var(--text-secondary);
    font-weight: 500;
}

.strength-score {
    color: var(--text-secondary);
    font-weight: 700;
}

.strength-weak .strength-fill {
    background: linear-gradient(90deg, var(--danger), #f87171);
    width: 25%;
}

.strength-fair .strength-fill {
    background: linear-gradient(90deg, var(--warning), #fbbf24);
    width: 50%;
}

.strength-good .strength-fill {
    background: linear-gradient(90deg, #84cc16, var(--success));
    width: 75%;
}

.strength-strong .strength-fill {
    background: linear-gradient(90deg, var(--success), #34d399);
    width: 100%;
}

.strength-weak .strength-score { color: var(--danger); }
.strength-fair .strength-score { color: var(--warning); }
.strength-good .strength-score { color: #84cc16; }
.strength-strong .strength-score { color: var(--success); }

.string-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.string-count-control {
    margin-bottom: 20px;
}

.string-count-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.string-count-value {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1rem;
    min-width: 45px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.string-count-slider {
    width: 100%;
    height: 10px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.6);
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.string-count-slider::-webkit-slider-runnable-track {
    height: 10px;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.string-count-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.3),
        0 0 0 4px rgba(99, 102, 241, 0.2);
    margin-top: -9px;
    transition: transform 0.2s;
}

.string-count-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.string-count-slider::-moz-range-track {
    height: 10px;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.string-count-slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: none;
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.3),
        0 0 0 4px rgba(99, 102, 241, 0.2);
}

.string-count-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.string-count-input {
    width: 80px;
    padding: 8px 14px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.6);
    color: var(--text-primary);
    font-size: 0.95rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
}

.string-count-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow:
        0 0 0 4px rgba(99, 102, 241, 0.1),
        0 0 20px rgba(99, 102, 241, 0.2);
}

.string-count-input.invalid {
    border-color: var(--danger);
    box-shadow:
        0 0 0 4px rgba(239, 68, 68, 0.1),
        0 0 20px rgba(239, 68, 68, 0.2);
}

.string-count-error {
    color: var(--danger);
    font-size: 0.75rem;
    margin-top: 8px;
    min-height: 18px;
    font-weight: 500;
}

.strings-output {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 18px;
    border: 1px solid var(--border);
    max-height: 280px;
    overflow-y: auto;
}

.strings-output::-webkit-scrollbar {
    width: 8px;
}

.strings-output::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.4);
    border-radius: 4px;
}

.strings-output::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.strings-output::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.string-item {
    color: var(--success);
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 0.85rem;
    padding: 10px 14px;
    margin-bottom: 8px;
    background: rgba(16, 185, 129, 0.08);
    border-radius: 8px;
    border: 1px solid rgba(16, 185, 129, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.string-item:hover {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.25);
    transform: translateX(4px);
}

.string-item:last-child {
    margin-bottom: 0;
}

.string-item-text {
    word-break: break-all;
    flex: 1;
    font-weight: 500;
}

.string-item-copy {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 2px solid rgba(16, 185, 129, 0.3);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.75rem;
    margin-left: 10px;
    white-space: nowrap;
    font-weight: 600;
}

.string-item-copy:hover {
    background: rgba(16, 185, 129, 0.25);
    border-color: rgba(16, 185, 129, 0.5);
    transform: scale(1.05);
}

.string-item-copy.copied {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.strings-actions {
    display: flex;
    gap: 10px;
}

.strings-actions button,
.strings-actions a {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
}

.generate-strings-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.generate-strings-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.copy-all-strings-btn {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 2px solid rgba(16, 185, 129, 0.3);
}

.copy-all-strings-btn:hover {
    background: rgba(16, 185, 129, 0.25);
    border-color: rgba(16, 185, 129, 0.5);
    transform: translateY(-2px);
}

.copy-all-strings-btn.copied {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.strings-empty {
    color: var(--text-secondary);
    text-align: center;
    padding: 32px;
    font-style: italic;
    font-size: 0.85rem;
}

/* Mode toggles (Bcrypt / Base64 / Image) */
.base64-mode-toggle,
.bcrypt-mode-toggle,
.image-mode-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: rgba(15, 23, 42, 0.4);
    padding: 5px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.bcrypt-mode-btn,
.base64-mode-btn,
.image-mode-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.8rem;
    font-weight: 600;
}

.bcrypt-mode-btn:hover,
.base64-mode-btn:hover,
.image-mode-btn:hover {
    color: var(--text-primary);
    background: var(--glass);
}

.bcrypt-mode-btn.active,
.base64-mode-btn.active,
.image-mode-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.bcrypt-rounds-control {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.bcrypt-rounds-slider {
    flex: 1;
    height: 10px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.6);
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.bcrypt-rounds-slider::-webkit-slider-runnable-track {
    height: 10px;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.bcrypt-rounds-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.3),
        0 0 0 4px rgba(99, 102, 241, 0.2);
    margin-top: -9px;
    transition: transform 0.2s;
}

.bcrypt-rounds-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.bcrypt-rounds-slider::-moz-range-track {
    height: 10px;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.bcrypt-rounds-slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: none;
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.3),
        0 0 0 4px rgba(99, 102, 241, 0.2);
}

.bcrypt-rounds-value {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1rem;
    min-width: 45px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.bcrypt-rounds-info {
    color: var(--text-secondary);
    font-size: 0.75rem;
    line-height: 1.4;
}

.bcrypt-rounds-info small {
    display: block;
}

/* Base64 Tool Styles */
.base64-options {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: stretch;
}

.base64-options .option-group {
    flex: 1;
    min-width: 220px;
}

.base64-options .option-group label {
    font-size: 0.75rem;
}

.base64-actions-inline {
    display: flex;
    gap: 10px;
}

.base64-swap-btn,
.base64-clear-btn {
    padding: 12px 18px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.base64-swap-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.base64-swap-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.base64-clear-btn {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 2px solid rgba(239, 68, 68, 0.3);
}

.base64-clear-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    transform: translateY(-2px);
}

.base64-error,
.image-error {
    color: var(--danger);
    font-size: 0.75rem;
    margin-top: 10px;
    min-height: 18px;
    font-weight: 500;
}

.base64-error:empty,
.image-error:empty {
    display: none;
}

.base64-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* Image Base64 Tool Styles */
.dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 36px 20px;
    margin-bottom: 16px;
    border: 2px dashed var(--border);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.4);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.dropzone:hover,
.dropzone:focus-visible {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
}

.dropzone.dragover {
    border-color: var(--secondary);
    background: rgba(16, 185, 129, 0.1);
    transform: scale(1.01);
}

.dropzone .lucide {
    width: 32px;
    height: 32px;
    color: var(--primary);
}

.dropzone-text {
    color: var(--text-primary);
    font-size: 0.9rem;
}

.dropzone-hint {
    color: var(--text-secondary);
    font-size: 0.72rem;
}

.image-preview-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.image-preview-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: inherit;
    cursor: zoom-in;
}

.image-preview-button:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

.image-preview-button .image-preview {
    display: block;
}

.image-preview-zoom {
    position: absolute;
    right: 10px;
    bottom: 10px;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    background: rgba(2, 6, 23, 0.72);
    color: white;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    backdrop-filter: blur(4px);
}

.image-preview-button:hover .image-preview-zoom,
.image-preview-button:focus-visible .image-preview-zoom {
    opacity: 1;
    transform: scale(1);
}

.image-preview-zoom .lucide {
    width: 15px;
    height: 15px;
}

.image-preview {
    max-width: 100%;
    max-height: 260px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background:
        repeating-conic-gradient(rgba(148, 163, 184, 0.25) 0% 25%, transparent 0% 50%) 0 0 / 20px 20px,
        rgba(15, 23, 42, 0.6);
}

.image-info {
    margin-bottom: 16px;
    padding: 6px 14px;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.image-info-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border);
    font-size: 0.78rem;
}

.image-info-row:last-child {
    border-bottom: none;
}

.image-info-row span {
    color: var(--text-secondary);
    font-weight: 500;
    flex-shrink: 0;
}

.image-info-row strong {
    color: var(--text-primary);
    font-weight: 600;
    text-align: right;
    word-break: break-all;
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 0.72rem;
}

.image-download-link {
    display: inline-flex;
}

/* Image Resizer Tool Styles */
.resize-app {
    display: grid;
    grid-template-columns: 286px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.resize-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.resize-sidebar-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.resize-add-btn,
.resize-clear-all-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.resize-add-btn {
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.resize-add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.resize-clear-all-btn {
    border: 2px solid rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.resize-clear-all-btn:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    transform: translateY(-2px);
}

.resize-clear-all-btn:disabled,
.resize-add-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.resize-add-btn .lucide,
.resize-clear-all-btn .lucide {
    width: 15px;
    height: 15px;
}

.resize-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 18px 14px;
    border: 2px dashed var(--border);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.4);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.resize-dropzone:hover,
.resize-dropzone:focus-visible {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
}

.resize-dropzone.dragover {
    border-color: var(--secondary);
    background: rgba(16, 185, 129, 0.1);
    transform: scale(1.01);
}

.resize-dropzone.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.resize-dropzone > .lucide {
    width: 26px;
    height: 26px;
    color: var(--primary);
}

.resize-dropzone-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    line-height: 1.35;
}

.resize-dropzone-text strong {
    color: var(--text-primary);
    font-size: 0.8rem;
}

.resize-dropzone-text span {
    color: var(--text-secondary);
    font-size: 0.7rem;
}

.resize-dropzone-hint {
    color: var(--text-secondary);
    font-size: 0.62rem;
}

.resize-dropzone-limit {
    margin-top: 3px;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(99, 102, 241, 0.12);
    color: #c7d2fe;
    font-size: 0.6rem;
    font-weight: 600;
}

.resize-settings {
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.34);
}

.resize-settings-title {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 11px;
    color: var(--text-secondary);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.resize-settings-title .lucide {
    width: 14px;
    height: 14px;
    color: var(--primary);
}

.resize-mode-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 4px;
    margin-bottom: 13px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.55);
}

.resize-mode-tab {
    padding: 7px 3px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.64rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.resize-mode-tab:hover:not(:disabled) {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.08);
}

.resize-mode-tab.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.resize-mode-tab:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.resize-mode-panel[hidden] {
    display: none;
}

.resize-dimension-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.resize-dimension-field label {
    margin: 0 0 5px;
    color: var(--text-secondary);
    font-size: 0.66rem;
    font-weight: 500;
}

.resize-dimension-input {
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 2px solid var(--border);
    border-radius: 9px;
    background: rgba(15, 23, 42, 0.6);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.resize-dimension-input:focus-within {
    border-color: var(--primary);
    box-shadow:
        0 0 0 4px rgba(99, 102, 241, 0.1),
        0 0 20px rgba(99, 102, 241, 0.15);
}

.resize-dimension-input:has(input.invalid) {
    border-color: var(--danger);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.08);
}

.resize-dimension-input input {
    width: 100%;
    min-width: 0;
    padding: 8px 4px 8px 10px;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 0.82rem;
}

.resize-dimension-input input::placeholder {
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
}

.resize-dimension-input input.invalid {
    color: var(--danger);
}

.resize-dimension-input span {
    padding-right: 9px;
    color: var(--text-secondary);
    font-size: 0.62rem;
    font-weight: 600;
}

.resize-check-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0 0;
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
}

.resize-check-row input {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: var(--primary);
    cursor: pointer;
}

.resize-field-hint {
    margin: 7px 0 0;
    color: var(--text-secondary);
    font-size: 0.64rem;
    line-height: 1.45;
}

.resize-field-hint.invalid {
    color: var(--danger);
}

.resize-percentage-head,
.resize-quality-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.resize-percentage-head label,
.resize-quality-head label {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.68rem;
    font-weight: 500;
}

.resize-percentage-value,
.resize-quality-head span {
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(99, 102, 241, 0.14);
    color: #c7d2fe;
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 0.64rem;
    font-weight: 700;
}

.resize-percentage-presets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    margin-top: 9px;
}

.resize-percentage-btn {
    padding: 6px 3px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--glass);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.64rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.resize-percentage-btn:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--text-primary);
}

.resize-percentage-btn.active {
    border-color: transparent;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.resize-percentage-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.resize-export-field {
    margin-bottom: 11px;
}

.resize-export-field > label,
.resize-export-label label {
    margin: 0 0 5px;
    color: var(--text-secondary);
    font-size: 0.66rem;
    font-weight: 500;
}

.resize-export-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.resize-optional {
    color: var(--text-secondary);
    font-size: 0.58rem;
    font-style: italic;
}

.resize-field {
    width: 100%;
    padding: 9px 11px;
    border: 2px solid var(--border);
    border-radius: 9px;
    background: rgba(15, 23, 42, 0.6);
    color: var(--text-primary);
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 0.78rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.resize-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow:
        0 0 0 4px rgba(99, 102, 241, 0.1),
        0 0 20px rgba(99, 102, 241, 0.15);
    background: rgba(15, 23, 42, 0.8);
}

.resize-field:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.resize-field.invalid {
    border-color: var(--danger);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.08);
}

select.resize-field {
    cursor: pointer;
}

select.resize-field:disabled {
    cursor: not-allowed;
}

select.resize-field option,
select.resize-field optgroup {
    background: #1e293b;
    color: var(--text-primary);
}

.resize-social-preview {
    margin-top: 8px;
    padding: 7px 9px;
    border: 1px solid rgba(99, 102, 241, 0.18);
    border-radius: 8px;
    background: rgba(99, 102, 241, 0.08);
    color: var(--text-secondary);
    font-size: 0.64rem;
}

.resize-quality-group {
    margin-bottom: 13px;
}

.resize-quality-group[hidden] {
    display: none;
}

.resize-quality-group .length-slider {
    height: 8px;
}

.resize-quality-group.is-auto {
    opacity: 0.55;
}

.resize-quality-group.is-auto .length-slider {
    pointer-events: none;
}

.resize-export-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 14px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.resize-export-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.resize-export-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.resize-export-hint {
    margin: 8px 0 0;
    color: var(--text-secondary);
    font-size: 0.62rem;
    line-height: 1.45;
    text-align: center;
}

.resize-workspace {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background:
        radial-gradient(circle at top right, rgba(99, 102, 241, 0.08), transparent 42%),
        rgba(15, 23, 42, 0.26);
    transition: border-color 0.25s, background 0.25s;
}

.resize-workspace.dragover {
    border-color: var(--secondary);
    background: rgba(16, 185, 129, 0.06);
}

.resize-workspace-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 13px;
}

.resize-workspace-head h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--text-primary);
    font-size: 0.92rem;
    font-weight: 700;
}

.resize-count {
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(99, 102, 241, 0.2);
    color: #c7d2fe;
    font-size: 0.64rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.resize-workspace-sub {
    margin: 4px 0 0;
    color: var(--text-secondary);
    font-size: 0.66rem;
}

.resize-workspace-total {
    flex-shrink: 0;
    padding: 4px 9px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.4);
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 0.6rem;
    white-space: nowrap;
}

.resize-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 390px;
    padding: 30px 20px;
    border: 2px dashed var(--border);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.2);
    text-align: center;
}

.resize-empty[hidden],
.resize-grid[hidden] {
    display: none;
}

.resize-empty-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin-bottom: 14px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 16px;
    background: rgba(99, 102, 241, 0.12);
}

.resize-empty-icon .lucide {
    width: 27px;
    height: 27px;
    color: var(--primary);
}

.resize-empty h4 {
    margin: 0 0 7px;
    color: var(--text-primary);
    font-size: 0.92rem;
    font-weight: 700;
}

.resize-empty p {
    max-width: 310px;
    margin: 0 0 16px;
    color: var(--text-secondary);
    font-size: 0.72rem;
    line-height: 1.55;
}

.resize-empty-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 16px;
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: 9px;
    background: rgba(99, 102, 241, 0.14);
    color: #c7d2fe;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.resize-empty-btn:hover {
    background: rgba(99, 102, 241, 0.24);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.resize-empty-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.resize-empty-btn .lucide {
    width: 14px;
    height: 14px;
}

.resize-empty > span {
    margin-top: 13px;
    color: var(--text-secondary);
    font-size: 0.6rem;
}

.resize-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
    gap: 11px;
}

.resize-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: rgba(15, 23, 42, 0.45);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.resize-card:hover {
    border-color: rgba(99, 102, 241, 0.45);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.resize-card.is-error {
    border-color: rgba(239, 68, 68, 0.35);
}

.resize-card-preview {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background:
        repeating-conic-gradient(rgba(148, 163, 184, 0.1) 0% 25%, transparent 0% 50%) 0 0 / 22px 22px,
        rgba(15, 23, 42, 0.55);
}

.resize-card-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.resize-card-preview > .lucide {
    width: 28px;
    height: 28px;
    color: var(--text-secondary);
}

.resize-card-format {
    position: absolute;
    top: 7px;
    left: 7px;
    padding: 2px 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 5px;
    background: rgba(15, 23, 42, 0.82);
    color: #e2e8f0;
    font-size: 0.56rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    backdrop-filter: blur(4px);
}

.resize-card-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.82);
    color: var(--text-secondary);
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(4px);
}

.resize-card:hover .resize-card-remove,
.resize-card-remove:focus-visible {
    opacity: 1;
}

.resize-card-remove:hover {
    border-color: transparent;
    background: var(--danger);
    color: white;
}

.resize-card-remove .lucide {
    width: 13px;
    height: 13px;
}

.resize-card-info {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 9px 10px 10px;
}

.resize-card-name {
    overflow: hidden;
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.resize-card-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.resize-card-meta-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.64rem;
}

.resize-card-meta-row strong {
    color: var(--text-primary);
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 0.64rem;
    font-weight: 500;
    text-align: right;
    white-space: nowrap;
}

.resize-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding-top: 7px;
    border-top: 1px dashed var(--border);
}

.resize-card-size {
    overflow: hidden;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 0.58rem;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.resize-card-tools {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.resize-card-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
}

.resize-card-status::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.resize-card-status.ready {
    color: var(--success);
}

.resize-card-status.processing,
.resize-card-status.queued,
.resize-card-status.warning {
    color: var(--warning);
}

.resize-card-status.error {
    color: var(--danger);
}

.resize-card-status.loading {
    color: var(--text-secondary);
}

.resize-card-download {
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.resize-card-download:hover:not(:disabled) {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary);
}

.resize-card-download:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.resize-card-download .lucide {
    width: 13px;
    height: 13px;
}

.resize-status {
    min-height: 16px;
    margin-top: 12px;
    color: var(--text-secondary);
    font-size: 0.66rem;
    line-height: 1.45;
}

.resize-status.success {
    color: var(--success);
}

.resize-status.busy {
    color: var(--warning);
}

.resize-status.warning {
    color: var(--warning);
}

.resize-status.error {
    color: var(--danger);
}

.resize-error {
    margin-top: 10px;
}

.resize-spin {
    animation: resizeSpin 0.8s linear infinite;
}

@keyframes resizeSpin {
    to {
        transform: rotate(360deg);
    }
}

@media (hover: none) {
    .resize-card-remove {
        opacity: 1;
    }
}

/* PDF Tools */
.pdf-choice-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.55);
}

.pdf-choice-btn {
    padding: 8px 4px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.66rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.pdf-choice-btn:hover:not(:disabled) {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.08);
}

.pdf-choice-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.pdf-choice-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pdf-setting-gap {
    margin-top: 12px;
}

.pdf-cancel-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    margin-top: 8px;
    padding: 9px 12px;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 9px;
    background: rgba(239, 68, 68, 0.08);
    color: var(--danger);
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.pdf-cancel-btn:hover {
    background: rgba(239, 68, 68, 0.16);
    border-color: rgba(239, 68, 68, 0.5);
}

.pdf-cancel-btn[hidden] {
    display: none;
}

.pdf-cancel-btn .lucide {
    width: 14px;
    height: 14px;
}

.pdf-doc-list[hidden],
.pdf-results[hidden],
.pdf-output[hidden],
.pdf-download-all-btn[hidden] {
    display: none;
}

.pdf-doc-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pdf-doc-card {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 11px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.45);
    transition: border-color 0.25s, background 0.25s;
}

.pdf-doc-card.ready {
    border-color: rgba(16, 185, 129, 0.25);
    background: rgba(16, 185, 129, 0.045);
}

.pdf-doc-card.error {
    border-color: rgba(239, 68, 68, 0.35);
}

.pdf-doc-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(99, 102, 241, 0.18);
    border-radius: 10px;
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary);
}

.pdf-doc-icon .lucide {
    width: 18px;
    height: 18px;
}

.pdf-doc-body {
    flex: 1;
    min-width: 0;
}

.pdf-doc-name {
    overflow: hidden;
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.pdf-doc-meta {
    margin-top: 2px;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 0.59rem;
}

.pdf-doc-state {
    margin-top: 3px;
    color: var(--text-secondary);
    font-size: 0.6rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.pdf-doc-state.ready {
    color: var(--success);
}

.pdf-doc-state.error {
    color: var(--danger);
}

.pdf-doc-state.loading {
    color: var(--warning);
}

.pdf-doc-actions {
    display: flex;
    flex-shrink: 0;
    gap: 5px;
}

.pdf-doc-action {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.pdf-doc-action:hover:not(:disabled) {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary);
}

.pdf-doc-action.pdf-doc-remove:hover:not(:disabled) {
    border-color: transparent;
    background: var(--danger);
    color: white;
}

.pdf-doc-action:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pdf-doc-action .lucide {
    width: 13px;
    height: 13px;
}

.pdf-results {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed var(--border);
}

.pdf-results-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 11px;
}

.pdf-results-head h4 {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 700;
}

.pdf-results-head p {
    margin: 4px 0 0;
    color: var(--text-secondary);
    font-size: 0.63rem;
    line-height: 1.4;
}

.pdf-result-count {
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(16, 185, 129, 0.16);
    color: #a7f3d0;
    font-size: 0.62rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.pdf-download-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding: 8px 11px;
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: 8px;
    background: rgba(99, 102, 241, 0.14);
    color: #c7d2fe;
    font-family: inherit;
    font-size: 0.67rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.pdf-download-all-btn:hover:not(:disabled) {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.24);
    transform: translateY(-1px);
}

.pdf-download-all-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.pdf-download-all-btn .lucide {
    width: 13px;
    height: 13px;
}

.pdf-result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 10px;
}

.pdf-result-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.45);
    transition: border-color 0.25s, transform 0.25s;
}

.pdf-result-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
}

.pdf-result-thumb {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background:
        repeating-conic-gradient(rgba(148, 163, 184, 0.1) 0% 25%, transparent 0% 50%) 0 0 / 22px 22px,
        rgba(15, 23, 42, 0.55);
}

.pdf-result-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    background: white;
    object-fit: contain;
}

.pdf-result-thumb > .lucide {
    width: 26px;
    height: 26px;
    color: var(--text-secondary);
}

.pdf-result-badge {
    position: absolute;
    left: 7px;
    bottom: 7px;
    padding: 2px 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 5px;
    background: rgba(15, 23, 42, 0.82);
    color: #e2e8f0;
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    backdrop-filter: blur(4px);
}

.pdf-result-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    padding: 8px 36px 9px 9px;
}

.pdf-result-name {
    overflow: hidden;
    color: var(--text-primary);
    font-size: 0.68rem;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.pdf-result-meta {
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 0.56rem;
}

.pdf-result-download {
    position: absolute;
    right: 7px;
    bottom: 8px;
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.pdf-result-download:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary);
}

.pdf-result-download .lucide {
    width: 13px;
    height: 13px;
}

.pdf-image-grid {
    grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
}

.pdf-image-preview img {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.pdf-order-badge {
    position: absolute;
    left: 7px;
    bottom: 7px;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.82);
    color: #c7d2fe;
    font-size: 0.6rem;
    font-weight: 700;
    backdrop-filter: blur(4px);
}

.pdf-image-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding-top: 7px;
    border-top: 1px dashed var(--border);
}

.pdf-rotate-label {
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 0.58rem;
}

.pdf-image-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pdf-icon-btn {
    display: grid;
    place-items: center;
    width: 23px;
    height: 23px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.pdf-icon-btn:hover:not(:disabled) {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary);
}

.pdf-icon-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pdf-icon-btn .lucide {
    width: 12px;
    height: 12px;
}

.pdf-image-card.dragging {
    opacity: 0.45;
    transform: scale(0.98);
}

.pdf-image-card.pdf-drop-target {
    border-color: var(--secondary);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

.pdf-summary-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 2px 0 11px;
    padding: 8px 10px;
    border: 1px solid rgba(99, 102, 241, 0.18);
    border-radius: 9px;
    background: rgba(99, 102, 241, 0.08);
    color: var(--text-secondary);
    font-size: 0.64rem;
}

.pdf-summary-box strong {
    color: #c7d2fe;
    font-size: 0.62rem;
    font-weight: 700;
}

.pdf-output {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 11px 12px;
    border: 1px solid rgba(16, 185, 129, 0.28);
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.08);
}

.pdf-output-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.14);
    color: var(--success);
}

.pdf-output-icon .lucide {
    width: 19px;
    height: 19px;
}

.pdf-output-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pdf-output-body strong {
    overflow: hidden;
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.pdf-output-body span {
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 0.6rem;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.pdf-output-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding: 8px 10px;
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 8px;
    background: rgba(16, 185, 129, 0.14);
    color: #a7f3d0;
    font-family: inherit;
    font-size: 0.67rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.pdf-output-download:hover {
    background: rgba(16, 185, 129, 0.24);
    border-color: var(--success);
}

.pdf-output-download .lucide {
    width: 13px;
    height: 13px;
}

.pdf-inline-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.pdf-inline-fields .resize-export-field {
    min-width: 0;
}

.pdf-color-field {
    height: 39px;
    padding: 4px;
    cursor: pointer;
}

.pdf-color-field::-webkit-color-swatch-wrapper {
    padding: 0;
}

.pdf-color-field::-webkit-color-swatch {
    border: 0;
    border-radius: 5px;
}

.pdf-result-card.pdf-file-result {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px 11px;
}

.pdf-file-result .pdf-result-body {
    flex: 1;
    padding: 0;
}

.pdf-file-result .pdf-result-download {
    position: static;
    flex-shrink: 0;
}

.pdf-result-file-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(99, 102, 241, 0.18);
    border-radius: 9px;
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary);
}

.pdf-result-file-icon .lucide {
    width: 16px;
    height: 16px;
}

.pdf-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(8px);
}

.pdf-modal[hidden] {
    display: none;
}

.pdf-modal-card {
    width: min(400px, 100%);
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #0f172a;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    text-align: left;
}

.pdf-modal-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 12px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.14);
    color: var(--primary);
}

.pdf-modal-icon .lucide {
    width: 21px;
    height: 21px;
}

.pdf-modal-card h3 {
    margin: 0 0 6px;
    color: var(--text-primary);
    font-size: 1rem;
}

.pdf-modal-card > p {
    margin: 0 0 14px;
    color: var(--text-secondary);
    font-size: 0.74rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.pdf-modal-label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-secondary);
    font-size: 0.66rem;
}

.pdf-modal-error {
    margin: 7px 0 0 !important;
    color: var(--danger) !important;
    font-size: 0.66rem !important;
}

.pdf-modal-error[hidden] {
    display: none;
}

.pdf-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

.pdf-modal-cancel,
.pdf-modal-submit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    border-radius: 9px;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.pdf-modal-cancel {
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
}

.pdf-modal-cancel:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.pdf-modal-submit {
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.pdf-modal-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(99, 102, 241, 0.4);
}

.pdf-modal-submit .lucide {
    width: 14px;
    height: 14px;
}

.image-preview-trigger {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: white;
    cursor: zoom-in;
}

.image-preview-trigger .lucide {
    width: 23px;
    height: 23px;
    padding: 7px;
    box-sizing: content-box;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    background: rgba(2, 6, 23, 0.72);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(4px);
}

.image-preview-trigger:hover .lucide,
.image-preview-trigger:focus-visible .lucide,
.image-preview-trigger:focus .lucide {
    opacity: 1;
    transform: scale(1);
}

.image-preview-trigger:focus-visible {
    outline-offset: -3px;
    border-radius: 0;
}

.image-preview-modal {
    z-index: 1100;
}

.image-preview-card {
    display: flex;
    flex-direction: column;
    width: min(1080px, 100%);
    height: min(86vh, 900px);
    height: min(86dvh, 900px);
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #0b1220;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
}

.image-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
    padding: 13px 14px 12px 16px;
    border-bottom: 1px solid var(--border);
}

.image-preview-heading {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.image-preview-heading strong {
    overflow: hidden;
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.image-preview-heading span {
    overflow: hidden;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 0.59rem;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.image-preview-close {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-preview-close:hover {
    border-color: rgba(239, 68, 68, 0.45);
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
}

.image-preview-close .lucide {
    width: 15px;
    height: 15px;
}

.image-preview-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 0;
    padding: 14px;
    overflow: hidden;
    background:
        repeating-conic-gradient(rgba(148, 163, 184, 0.09) 0% 25%, transparent 0% 50%) 0 0 / 24px 24px,
        #0f172a;
}

.image-preview-stage img {
    display: block;
    flex: none;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transform-origin: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.image-preview-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
    padding: 10px 14px 10px 16px;
    border-top: 1px solid var(--border);
}

.image-preview-hint {
    color: var(--text-secondary);
    font-size: 0.6rem;
}

.image-preview-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding: 8px 11px;
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: 8px;
    background: rgba(99, 102, 241, 0.14);
    color: #c7d2fe;
    font-family: inherit;
    font-size: 0.67rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-preview-download:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.24);
    transform: translateY(-1px);
}

.image-preview-download[hidden] {
    display: none;
}

.image-preview-download .lucide {
    width: 13px;
    height: 13px;
}

body.image-preview-open {
    overflow: hidden;
}

/* Char Count Tool Styles */
.char-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.char-stat-card {
    background: rgba(15, 23, 42, 0.4);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 14px 8px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.char-stat-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.char-stat-icon {
    color: var(--primary);
    font-size: 1.1rem;
    display: flex;
    justify-content: center;
    margin-bottom: 6px;
}

.char-stat-value {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    word-break: break-all;
}

.char-stat-label {
    color: var(--text-secondary);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    margin-top: 4px;
}

.char-section {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 16px;
}

.char-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}

.char-section-title .lucide {
    color: var(--primary);
}

.char-comp-row {
    display: grid;
    grid-template-columns: 110px 1fr 52px;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 0.75rem;
}

.char-comp-row:last-child {
    margin-bottom: 0;
}

.char-comp-label {
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.char-comp-track {
    height: 8px;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.6);
    overflow: hidden;
}

.char-comp-fill {
    height: 100%;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.char-comp-count {
    color: var(--text-primary);
    font-weight: 700;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.char-freq-list {
    max-height: 220px;
    overflow-y: auto;
}

.char-freq-list::-webkit-scrollbar {
    width: 8px;
}

.char-freq-list::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.4);
    border-radius: 4px;
}

.char-freq-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.char-freq-item {
    display: grid;
    grid-template-columns: 110px 1fr 52px;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    margin-bottom: 6px;
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.12);
    border-radius: 8px;
    font-size: 0.75rem;
}

.char-freq-item:last-child {
    margin-bottom: 0;
}

.char-freq-char {
    color: var(--success);
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.char-freq-count {
    color: var(--text-primary);
    font-weight: 700;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.char-meta {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* Lucide Icons */
.lucide {
    width: 1em;
    height: 1em;
    flex-shrink: 0;
}

.result-value .lucide {
    vertical-align: -0.125em;
}

.generate-btn,
.copy-btn,
.generate-password-btn,
.copy-password-btn,
.generate-strings-btn,
.copy-all-strings-btn,
.string-item-copy,
.base64-swap-btn,
.base64-clear-btn,
.bcrypt-mode-btn,
.base64-mode-btn,
.image-mode-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.string-item-copy {
    gap: 6px;
}

/* Entrance & micro-interactions */
@keyframes appRise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-26px); }
    to { opacity: 1; transform: none; }
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.96) translateY(10px); }
    to { opacity: 1; transform: none; }
}

@keyframes gradientPan {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes copiedPop {
    0% { transform: scale(1); }
    40% { transform: scale(1.07); }
    100% { transform: scale(1); }
}

/* Page landing */
.sidebar {
    animation: slideInLeft 0.5s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.main {
    animation: appRise 0.5s 0.08s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.tool-header {
    animation: appRise 0.45s 0.16s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.nav-btn {
    animation: appRise 0.4s backwards;
}

.tool-nav .nav-btn:nth-child(1) { animation-delay: 0.05s; }
.tool-nav .nav-btn:nth-child(2) { animation-delay: 0.1s; }
.tool-nav .nav-btn:nth-child(3) { animation-delay: 0.15s; }
.tool-nav .nav-btn:nth-child(4) { animation-delay: 0.2s; }
.tool-nav .nav-btn:nth-child(5) { animation-delay: 0.25s; }
.tool-nav .nav-btn:nth-child(6) { animation-delay: 0.3s; }
.tool-nav .nav-btn:nth-child(7) { animation-delay: 0.35s; }
.tool-nav .nav-btn:nth-child(8) { animation-delay: 0.4s; }
.tool-nav .nav-btn:nth-child(9) { animation-delay: 0.45s; }

/* Stat cards pop in on every route render */
.tab-content.active .char-stat-card {
    animation: popIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.tab-content.active .char-stat-card:nth-child(2) { animation-delay: 0.05s; }
.tab-content.active .char-stat-card:nth-child(3) { animation-delay: 0.1s; }
.tab-content.active .char-stat-card:nth-child(4) { animation-delay: 0.15s; }
.tab-content.active .char-stat-card:nth-child(5) { animation-delay: 0.2s; }
.tab-content.active .char-stat-card:nth-child(6) { animation-delay: 0.25s; }

/* Animated gradient sweep on primary actions */
.generate-btn,
.generate-password-btn,
.generate-strings-btn,
.base64-swap-btn {
    background-size: 160% 160%;
}

.generate-btn:hover,
.generate-password-btn:hover,
.generate-strings-btn:hover,
.base64-swap-btn:hover {
    animation: gradientPan 2.5s ease infinite;
}

/* Tactile press on every button */
.generate-btn:active,
.copy-btn:active,
.generate-password-btn:active,
.copy-password-btn:active,
.generate-strings-btn:active,
.copy-all-strings-btn:active,
.string-item-copy:active,
.base64-swap-btn:active,
.base64-clear-btn:active,
.nav-btn:active,
.algorithm-btn:active,
.case-option:active,
.resize-preset-btn:active,
.bcrypt-mode-btn:active,
.base64-mode-btn:active,
.image-mode-btn:active {
    transform: scale(0.96);
}

/* Icon micro-interactions */
.nav-btn > .lucide,
.copy-btn .lucide,
.copy-password-btn .lucide,
.copy-all-strings-btn .lucide,
.generate-btn .lucide,
.string-item-copy .lucide {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-btn:hover > .lucide {
    transform: scale(1.2) rotate(-8deg);
}

.copy-btn:hover .lucide,
.copy-password-btn:hover .lucide,
.copy-all-strings-btn:hover .lucide,
.string-item-copy:hover .lucide {
    transform: rotate(-12deg) scale(1.15);
}

.generate-btn:hover .lucide,
.generate-password-btn:hover .lucide,
.generate-strings-btn:hover .lucide {
    transform: rotate(12deg) scale(1.15);
}

/* Success pulse on copy */
.copy-btn.copied,
.copy-password-btn.copied,
.copy-all-strings-btn.copied,
.string-item-copy.copied {
    animation: copiedPop 0.35s ease;
}

/* Inviting float on the image dropzone */
.dropzone .lucide {
    animation: floatY 2.6s ease-in-out infinite;
}

/* Responsive Design */
@media (min-width: 1440px) {
    .app {
        max-width: 1360px;
    }

    .sidebar {
        width: 320px;
    }

    .main {
        padding: 40px;
    }
}

@media (min-width: 1800px) {
    .app {
        max-width: 1560px;
    }
}

@media (max-width: 960px) {
    .app {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: static;
        max-height: none;
    }

    .tool-nav {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .main {
        width: 100%;
        padding: 24px 20px;
        scroll-margin-top: 20px;
    }

    .tool-header h1 {
        font-size: 1.4rem;
    }

    .resize-app {
        grid-template-columns: 1fr;
    }

    .resize-sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }

    .resize-sidebar-actions,
    .resize-dropzone {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    body {
        padding: 12px;
    }

    .main {
        padding: 24px 16px;
        border-radius: 16px;
        scroll-margin-top: 12px;
    }

    .sidebar {
        border-radius: 16px;
        padding: 20px 14px;
    }

    .tool-nav {
        grid-template-columns: 1fr;
    }

    .nav-group-toggle {
        padding: 10px;
    }

    .nav-desc {
        white-space: normal;
    }

    .password-options,
    .string-options {
        grid-template-columns: 1fr;
    }

    .password-actions,
    .strings-actions {
        flex-direction: column;
    }

    .char-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .char-comp-row,
    .char-freq-item {
        grid-template-columns: 84px 1fr 46px;
    }

    .base64-options {
        flex-direction: column;
    }

    .base64-actions-inline {
        width: 100%;
    }

    .dropzone {
        padding: 26px 14px;
    }

    .base64-actions-inline button {
        flex: 1;
    }

    .resize-sidebar {
        display: flex;
    }

    .resize-mode-tab {
        font-size: 0.6rem;
    }

    .resize-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .resize-workspace {
        padding: 12px;
    }

    .resize-empty {
        min-height: 300px;
        padding: 24px 14px;
    }

    .resize-card-info {
        padding: 8px;
    }

    .resize-card-remove {
        opacity: 1;
    }

    .pdf-doc-card {
        align-items: flex-start;
    }

    .pdf-results-head {
        flex-wrap: wrap;
    }

    .pdf-download-all-btn {
        width: 100%;
        justify-content: center;
    }

    .pdf-result-grid,
    .pdf-image-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .pdf-output {
        flex-wrap: wrap;
    }

    .pdf-output-download {
        width: 100%;
        justify-content: center;
    }

    .pdf-modal-card {
        padding: 18px;
    }
}

:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

.footer {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer p {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.footer a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s;
}

.footer a:hover {
    color: var(--secondary);
    text-decoration: underline;
}
