:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --secondary: #8b5cf6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg-dark: #0f172a;
    --bg-medium: #1e293b;
    --bg-light: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #a8b4c8;
    --border: rgba(148, 163, 184, 0.1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-medium) 50%, var(--bg-light) 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Floating background elements for visual depth */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 50%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.08) 0%, transparent 50%);
    animation: floatingBackground 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes floatingBackground {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(3%, -3%) rotate(1deg); }
    66% { transform: translate(-3%, 3%) rotate(-1deg); }
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 9999;
    transition: top 0.3s ease;
    opacity: 0;
}

.skip-link:focus {
    top: 6px;
    left: 6px;
    opacity: 1;
}

.container {
    max-width: 920px;
    margin: 0 auto;
    padding: 2rem;
    animation: fadeIn 0.6s ease;
    position: relative;
    z-index: 1;
}

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

.page-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

/* Hero entrance animations */
.hero-entrance {
    animation: heroFadeIn 1s ease-out;
}

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

.hero-title {
    animation: titleReveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: linear-gradient(135deg, var(--text-primary) 0%, #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes titleReveal {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.hero-subtitle-reveal {
    animation: subtitleFadeIn 1s ease-out 0.3s both;
}

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

/* Tagline word-by-word reveal */
.hero-tagline-reveal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35em;
}

.tagline-word {
    display: inline-block;
    animation: wordPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    animation-delay: calc(0.6s + var(--delay) * 0.1s);
}

.tagline-separator {
    display: inline-block;
    animation: wordPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.8s both;
}

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

h1 {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: 2rem;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    text-align: center;
    position: relative;
}

.subtitle::before {
    content: '';
    position: absolute;
    top: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    border-radius: 2px;
}

.subtitle-main {
    font-size: 1.125rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.subtitle-accent {
    font-size: 0.975rem;
    color: var(--text-muted);
    font-weight: 400;
    font-style: italic;
    opacity: 0.9;
}

.hero-description {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 1.75rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.hero-description::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.5), transparent);
}

.hero-description h2 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #60a5fa;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.hero-description p {
    color: var(--text-secondary);
    font-size: 0.975rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.use-cases {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.use-case {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.use-case-icon {
    color: var(--success);
    font-size: 1.125rem;
}


.nav-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(30, 41, 59, 0.5);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-btn:hover,
.nav-btn:focus {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
    color: var(--text-primary);
    transform: translateY(-2px);
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.nav-btn.active {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.2);
    color: var(--text-primary);
}

.tool-page {
    display: none;
}


.tool-page.active {
    display: block;
}

.section {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.5), transparent);
}

.section-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

textarea, input[type="text"], input[type="number"], select {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 0.9375rem;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    resize: vertical;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(15, 23, 42, 0.5);
    color: var(--text-primary);
    min-height: 120px;
}

input[type="text"], input[type="number"], select {
    min-height: auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

textarea:focus, input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#output {
    background: rgba(15, 23, 42, 0.7);
    border-color: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.control-group {
    margin-bottom: 1.25rem;
}

.control-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.625rem;
}

.techniques-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.technique-card {
    background: rgba(15, 23, 42, 0.3);
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 0.875rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.technique-card:hover {
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
}

.technique-card.selected {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.15);
}

.technique-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.technique-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid var(--text-muted);
    border-radius: 4px;
    background: transparent;
    transition: all 0.2s ease;
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.technique-checkbox.checked {
    background: var(--primary);
    border-color: var(--primary);
}

.technique-checkbox.checked::after {
    content: '✓';
    color: white;
    font-size: 11px;
    font-weight: bold;
    line-height: 1;
}

.technique-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.technique-description {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-top: 0.25rem;
}

.button-group {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    flex: 1;
    width: 100%;
}

.btn-primary:hover:not(:disabled),
.btn-primary:focus:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.btn-secondary {
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-secondary);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    background: rgba(148, 163, 184, 0.2);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
    flex: 1;
    width: 100%;
}

.btn-success:hover:not(:disabled),
.btn-success:focus:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

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

.stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-medium);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(1rem);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    font-size: 0.9375rem;
    font-weight: 500;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--danger);
}

/* Hash Generator Styles */
.hash-select {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(15, 23, 42, 0.4);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hash-select:hover {
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.6);
}

.hash-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.hash-select option {
    background: var(--bg-medium);
    color: var(--text-primary);
    padding: 0.5rem;
}

.hash-output {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    word-break: break-all;
}

.presets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.preset-btn {
    background: rgba(15, 23, 42, 0.4);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.preset-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent, rgba(59, 130, 246, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.preset-btn:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.preset-btn:hover::before {
    opacity: 1;
}

.preset-btn.active {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.15);
}

.preset-btn.custom-preset {
    border-style: dashed;
    border-color: rgba(139, 92, 246, 0.3);
}

.preset-btn.custom-preset:hover {
    border-color: var(--secondary);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

.preset-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.preset-info {
    flex: 1;
    min-width: 0;
}

.preset-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.125rem;
}

.preset-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-section {
    max-height: 400px;
    overflow-y: auto;
}

.history-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.history-item {
    background: rgba(15, 23, 42, 0.3);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.875rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: start;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.history-item:hover {
    background: rgba(15, 23, 42, 0.5);
    border-color: rgba(59, 130, 246, 0.3);
}

.history-content {
    overflow: hidden;
}

.history-original {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-obfuscated {
    font-size: 0.75rem;
    color: var(--success);
    font-family: 'SF Mono', Monaco, monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.8;
}

.history-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.history-time {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.history-settings {
    font-size: 0.6875rem;
    color: var(--text-muted);
    background: rgba(59, 130, 246, 0.1);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
}

.history-actions {
    display: flex;
    gap: 0.5rem;
}

.history-btn {
    padding: 0.375rem 0.625rem;
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.history-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--primary);
    color: var(--text-primary);
}

.clear-history-btn {
    margin-left: auto;
    padding: 0.25rem 0.75rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 6px;
    color: #ef4444;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-history-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
}

.custom-preset-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-medium);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    z-index: 2000;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1999;
    backdrop-filter: blur(4px);
}

.dialog-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.dialog-input {
    width: 100%;
    padding: 0.75rem;
    background: rgba(15, 23, 42, 0.5);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9375rem;
    margin-bottom: 1rem;
}

.dialog-input:focus {
    outline: none;
    border-color: var(--primary);
}

.dialog-buttons {
    display: flex;
    gap: 0.75rem;
}

.dialog-btn {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dialog-btn-primary {
    background: var(--primary);
    color: white;
}

.dialog-btn-primary:hover {
    background: var(--primary-dark);
}

.dialog-btn-secondary {
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-secondary);
    border: 2px solid var(--border);
}

.dialog-btn-secondary:hover {
    background: rgba(148, 163, 184, 0.2);
}

.strength-meter {
    margin-top: 0.75rem;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.strength-bar {
    width: 100%;
    height: 8px;
    background: rgba(148, 163, 184, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.strength-fill {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.strength-fill.weak {
    width: 25%;
    background: var(--danger);
}

.strength-fill.fair {
    width: 50%;
    background: var(--warning);
}

.strength-fill.good {
    width: 75%;
    background: var(--primary);
}

.strength-fill.strong {
    width: 100%;
    background: var(--success);
}

.strength-text {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.strength-text.weak {
    color: var(--danger);
}

.strength-text.fair {
    color: var(--warning);
}

.strength-text.good {
    color: var(--primary);
}

.strength-text.strong {
    color: var(--success);
}

.strength-details {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.password-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(15, 23, 42, 0.3);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.checkbox-group:hover {
    background: rgba(15, 23, 42, 0.5);
    border-color: rgba(59, 130, 246, 0.3);
}

.checkbox-group input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--text-muted);
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-group input[type="checkbox"]:checked {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-group input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 11px;
    font-weight: bold;
}

.checkbox-group label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
    flex: 1;
}

.range-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.range-group input[type="range"] {
    flex: 1;
    height: 6px;
    background: rgba(148, 163, 184, 0.2);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.range-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
}

.range-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.range-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 3rem;
    text-align: center;
}


/* Logo Link Styles */
.logo-link {
    display: inline-block;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo-link:hover {
    transform: scale(1.05);
}

/* Navigation Styles */
.navigation {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Hero Section Styles */
.hero-section {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.hero-content {
    text-align: center;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.tools-grid.compact-grid {
    gap: 0.75rem;
    margin-top: 1rem;
}

.compact-title {
    font-size: 1rem !important;
    margin-bottom: 1rem !important;
}

.tool-card {
    background: rgba(15, 23, 42, 0.4);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-align: left;
    text-decoration: none;
    color: inherit;
    display: block;
}

.compact-grid .tool-card {
    padding: 1.25rem;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent, rgba(59, 130, 246, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tool-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.3);
}

.tool-card:hover::before {
    opacity: 1;
}

.tool-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    display: block;
}

.compact-grid .tool-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.tool-info h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.tool-info p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.tool-features {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.feature-tag {
    background: rgba(59, 130, 246, 0.2);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Use Cases Grid */
.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.use-case-card {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.use-case-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.5), transparent);
}

.use-case-card h2 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #60a5fa;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.use-case-card p {
    color: var(--text-secondary);
    font-size: 0.975rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Modern Use Cases Section */
.use-cases-modern {
    background: transparent;
    padding: 3rem 0;
}

.modern-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

/* For larger screens, keep 2 columns but increase gap */
@media (min-width: 768px) {
    .modern-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

.modern-use-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.6) 0%, rgba(51, 65, 85, 0.4) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.modern-use-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.modern-use-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.modern-use-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--primary);
    box-shadow: 0 25px 50px rgba(59, 130, 246, 0.3), 0 0 0 1px rgba(59, 130, 246, 0.1);
}

.modern-use-card:hover::before {
    opacity: 1;
    transform: scale(1.1);
}

.modern-use-card:hover::after {
    opacity: 1;
}

.modern-use-card:hover .card-emoji {
    transform: scale(1.2) rotate(10deg);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.card-emoji {
    font-size: 2.5rem;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-block;
}

.card-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.card-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Features Section */
.features-section {
    padding: 3rem 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-item {
    text-align: center;
    padding: 1.5rem;
    background: rgba(30, 41, 59, 0.3);
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.feature-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
    border-radius: 50%;
}

.feature-item:hover {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
}

.feature-item:hover::before {
    width: 200px;
    height: 200px;
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 1;
}

.feature-item:hover .feature-icon {
    transform: scale(1.2) rotate(-5deg);
}

.feature-item h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.feature-item p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* PWA Install Banner */
.pwa-install-banner {
    margin-top: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    border-radius: 16px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    backdrop-filter: blur(10px);
}

.pwa-content {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1.5rem;
    text-align: left;
}

.pwa-icon {
    font-size: 4rem;
    flex-shrink: 0;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pwa-text h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.pwa-text p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 100%;
}

.pwa-text p strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Footer Styles */
.footer {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 1) 100%);
    border-top: 1px solid var(--border);
    margin-top: 4rem;
    padding: 3rem 2rem 1rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.footer-section p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 1rem;
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

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

.footer-bottom a:hover {
    text-decoration: underline;
}

/* FAQ Styles */
.faq-section {
    margin-top: 2rem;
}

.faq-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: rgba(15, 23, 42, 0.3);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: rgba(59, 130, 246, 0.3);
}

.faq-item.active {
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.5);
}

.faq-question {
    padding: 1.25rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--text-primary);
    user-select: none;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    font-size: inherit;
    font-family: inherit;
}

.faq-question:hover,
.faq-question:focus {
    background: rgba(59, 130, 246, 0.1);
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.faq-arrow {
    transition: transform 0.3s ease;
    color: var(--primary);
    font-size: 0.875rem;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer p {
    padding: 1rem 1.25rem 1.25rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.faq-answer p + p {
    padding-top: 0;
}

.faq-answer ul {
    padding: 0 1.25rem 1.25rem 3rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.faq-answer li {
    margin-bottom: 0.5rem;
}

.faq-answer strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Improved responsive design */
@media (max-width: 768px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }

    .tools-grid.compact-grid {
        gap: 0.5rem;
    }

    .modern-cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

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

    .navigation {
        gap: 0.25rem;
        padding: 0 1rem;
    }

    .nav-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    .tool-card {
        padding: 1.5rem;
    }

    .tool-icon {
        font-size: 2rem;
    }

    .modern-use-card {
        padding: 1.5rem;
    }

    .card-emoji {
        font-size: 2rem;
    }

    .feature-icon {
        font-size: 2rem;
    }

    .feature-item {
        padding: 1rem;
    }

    .container {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .navigation {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
        padding: 0 1rem;
        max-width: 300px;
        margin: 2rem auto 0;
    }

    .nav-btn {
        padding: 0.75rem 0.5rem;
        font-size: 0.75rem;
        flex-direction: column;
        gap: 0.375rem;
        text-align: center;
        border-radius: 12px;
        min-height: 80px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-btn span:first-child {
        font-size: 1.5rem;
    }

    .nav-btn span:last-child {
        font-size: 0.7rem;
        font-weight: 600;
        line-height: 1.2;
    }

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

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .tool-info h3 {
        font-size: 1.1rem;
    }

    .tool-info p {
        font-size: 0.85rem;
    }

    .feature-tag {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }

    .faq-question {
        padding: 1rem;
        font-size: 0.9rem;
    }

    .faq-answer p {
        padding: 0.75rem 1rem 1rem;
        font-size: 0.85rem;
    }

    .section-title {
        font-size: 1rem;
    }

    .compact-title {
        font-size: 0.95rem !important;
    }

    h1 {
        font-size: 1.5rem;
    }

    .subtitle-main {
        font-size: 0.95rem;
    }

    .subtitle-accent {
        font-size: 0.85rem;
    }

    .logo {
        width: 200px;
    }

    .container {
        padding: 1rem;
    }
}

/* Remove list dots when emoji are used */
.hero-description ul li:has-text('❌'),
.hero-description ul li:has-text('✅'),
.hero-description li[data-emoji] {
    list-style: none;
}

/* Alternative approach - remove list style for all lists in hero-description */
.hero-description ul {
    list-style: none;
    padding-left: 0;
}

.hero-description li {
    padding-left: 1.5rem;
    position: relative;
}

/* For lists that should have bullets, add them back */
.hero-description ul.with-bullets {
    list-style: disc;
    padding-left: 1.5rem;
}

.hero-description ul.with-bullets li {
    padding-left: 0;
}

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

    /* Disable floating background */
    body::before {
        animation: none !important;
    }

    /* Keep essential functionality, remove decorative animations */
    .hero-entrance,
    .hero-title,
    .hero-subtitle-reveal,
    .tagline-word,
    .tagline-separator,
    .tool-card-reveal,
    .section-title-compact,
    .logo {
        animation: none !important;
    }

    /* Keep hover effects but remove transforms */
    .tool-card-compact:hover,
    .logo:hover {
        transform: none !important;
    }
}
/* Compact Tools Grid */
.tools-section-compact {
    padding: 2rem 0;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title-compact {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    justify-content: center;
    position: relative;
    animation: titleSlideIn 0.8s ease-out 1.8s both;
}

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

.section-title-compact::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--secondary), transparent);
    border-radius: 2px;
    animation: underlineGrow 0.6s ease-out 2s both;
}

@keyframes underlineGrow {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 80px;
        opacity: 1;
    }
}

.tools-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
}

.tool-card-compact {
    background: var(--bg-medium);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Tool card reveal animation */
.tool-card-reveal {
    animation: cardSlideUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    animation-delay: calc(1.2s + var(--card-index) * 0.08s);
}

@keyframes cardSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.tool-card-compact::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    border-radius: 50%;
    pointer-events: none;
}

.tool-card-compact:hover::before {
    width: 300px;
    height: 300px;
}

.tool-card-compact:hover {
    background: var(--bg-light);
    border-color: var(--primary);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.3);
}

.tool-icon-compact {
    font-size: 2rem;
    line-height: 1;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 1;
}

.tool-card-compact:hover .tool-icon-compact {
    transform: scale(1.15) rotate(5deg);
}

.tool-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

@media (max-width: 768px) {
    .tools-grid-compact {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.75rem;
    }
    
    .tool-card-compact {
        padding: 1rem;
    }
    
    .tool-icon-compact {
        font-size: 1.75rem;
    }
    
    .tool-name {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .tools-grid-compact {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Hash Verification Styles */
.verify-result {
    padding: 1rem;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

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

.verify-error {
    background: rgba(239, 68, 68, 0.15);
    border: 2px solid var(--danger);
    color: var(--danger);
}

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

/* File Input Styles */
.file-input {
    width: 100%;
    padding: 0.875rem;
    background: rgba(15, 23, 42, 0.4);
    border: 2px dashed var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.file-input:hover {
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.6);
}

.file-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.file-info {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: rgba(59, 130, 246, 0.1);
    border-left: 3px solid var(--primary);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* HMAC Key Input */
.hmac-key-input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(15, 23, 42, 0.4);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-family: 'Monaco', 'Courier New', monospace;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hmac-key-input:hover {
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.6);
}

.hmac-key-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.hmac-key-input::placeholder {
    color: var(--text-muted);
}

/* Example Cards Grid */
.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.example-card {
    background: rgba(15, 23, 42, 0.4);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.example-card:hover {
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.15);
}

.example-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.example-text {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    word-break: break-all;
}

.example-hash {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'Monaco', 'Courier New', monospace;
    word-break: break-all;
}

/* Tool Sub-Navigation */
.tool-subnav {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: rgba(15, 23, 42, 0.6);
    border-bottom: 2px solid var(--border);
    overflow-x: auto;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

.tool-subnav::-webkit-scrollbar {
    height: 4px;
}

.tool-subnav::-webkit-scrollbar-track {
    background: transparent;
}

.tool-subnav::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.subnav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: rgba(15, 23, 42, 0.4);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.subnav-link:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.subnav-link:active {
    transform: translateY(0);
}

.subnav-icon {
    font-size: 1rem;
    line-height: 1;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .tool-subnav {
        padding: 0.75rem 1rem;
        gap: 0.375rem;
    }

    .subnav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }

    .subnav-link span:not(.subnav-icon) {
        display: none;
    }

    .subnav-icon {
        font-size: 1.125rem;
    }

    .pwa-install-banner {
        padding: 1.5rem 1rem;
    }

    .pwa-content {
        flex-direction: column;
        gap: 1rem;
    }

    .pwa-icon {
        font-size: 2.5rem;
    }

    .pwa-text h3 {
        font-size: 1.25rem;
    }

    .pwa-text p {
        font-size: 0.9rem;
    }
}

.subnav-link.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    font-weight: 600;
}

.subnav-link.active .subnav-icon {
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
}

/* JSON Formatter specific styles */
.error-display {
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-size: 0.9rem;
    line-height: 1.6;
}

.error-display.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.stats-display {
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
}

.tree-view {
    background: var(--bg-medium);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    max-height: 500px;
    overflow-y: auto;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.tree-view:empty::before {
    content: "Tree view will appear here after formatting JSON";
    color: var(--text-muted);
    font-style: italic;
    font-family: 'Inter', sans-serif;
}

/* Regex Tester Styles */
.highlighted-results {
    background: var(--bg-medium);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 400px;
    overflow-y: auto;
}

.regex-match {
    background: rgba(16, 185, 129, 0.3);
    color: var(--success);
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

.capture-groups-container {
    margin-top: 1.5rem;
}

.match-header {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    margin-top: 1rem;
}

.match-header:first-child {
    margin-top: 0;
}

.groups-container {
    background: var(--bg-medium);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
}

.capture-group {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
}

.capture-group:last-child {
    border-bottom: none;
}

.group-index {
    color: var(--text-secondary);
    font-weight: 600;
    min-width: 100px;
    display: inline-block;
}

.group-value {
    color: var(--success);
}

.presets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.preset-card {
    background: var(--bg-medium);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.preset-card:hover {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.preset-icon {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.preset-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.preset-pattern {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .presets-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .preset-card {
        padding: 1rem;
    }

    .preset-icon {
        font-size: 1.5rem;
    }
}

/* Regex Tester History Styles */
.history-pattern {
    font-size: 0.75rem;
    color: var(--success);
    font-family: 'SF Mono', Monaco, monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.8;
}

.history-test {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
