/* ========================================
   WEBSITE TOOLS.NET - Professional Design System
   Inspired by Stripe.com & Linear.app
   ======================================== */

/* ========================================
   DESIGN TOKENS
   ======================================== */
:root {
    /* Colors - Light theme with high contrast */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --bg-hover: #e5e7eb;

    /* Border colors */
    --border-light: #e5e7eb;
    --border-medium: #d1d5db;
    --border-focus: #3b82f6;

    /* Text colors - WCAG AA compliant */
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-tertiary: #6b7280;
    --text-inverse: #ffffff;

    /* Accent colors */
    --accent-primary: #3b82f6;
    --accent-hover: #2563eb;
    --accent-light: #dbeafe;

    /* Semantic colors */
    --success: #059669;
    --success-light: #d1fae5;
    --error: #dc2626;
    --error-light: #fee2e2;
    --warning: #d97706;
    --warning-light: #fef3c7;

    /* Spacing scale - consistent 4px base */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-7: 28px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;
    --space-20: 80px;

    /* Layout */
    --max-width: 1000px;
    --header-height: 64px;
    --border-radius: 8px;
    --border-radius-sm: 6px;
    --border-radius-lg: 12px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 200ms ease;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Dark theme colors */
[data-theme="dark"] {
    --bg-primary: #09090b;
    --bg-secondary: #18181b;
    --bg-tertiary: #27272a;
    --bg-hover: #3f3f46;

    --border-light: #27272a;
    --border-medium: #3f3f46;
    --border-focus: #3b82f6;

    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-tertiary: #71717a;
    --text-inverse: #09090b;

    --accent-primary: #60a5fa;
    --accent-hover: #3b82f6;
    --accent-light: #1e3a5f;

    --success: #22c55e;
    --success-light: #14532d;
    --error: #f87171;
    --error-light: #7f1d1d;
    --warning: #fbbf24;
    --warning-light: #78350f;
}

/* System preference for dark mode */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg-primary: #09090b;
        --bg-secondary: #18181b;
        --bg-tertiary: #27272a;
        --bg-hover: #3f3f46;

        --border-light: #27272a;
        --border-medium: #3f3f46;
        --border-focus: #3b82f6;

        --text-primary: #fafafa;
        --text-secondary: #a1a1aa;
        --text-tertiary: #71717a;
        --text-inverse: #09090b;

        --accent-primary: #60a5fa;
        --accent-hover: #3b82f6;
        --accent-light: #1e3a5f;

        --success: #22c55e;
        --success-light: #14532d;
        --error: #f87171;
        --error-light: #7f1d1d;
        --warning: #fbbf24;
        --warning-light: #78350f;
    }
}

/* ========================================
   BASE STYLES
   ======================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ========================================
   HEADER
   ======================================== */
header {
    height: var(--header-height);
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-primary);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-6);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: opacity var(--transition-fast);
}

.logo:hover {
    opacity: 0.8;
}

.logo svg {
    color: var(--accent-primary);
    flex-shrink: 0;
}

.header-links {
    display: flex;
    gap: var(--space-6);
}

.header-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.header-link:hover {
    color: var(--text-primary);
}

/* Theme Toggle Button */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: var(--border-radius);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.theme-toggle:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.theme-toggle .sun-icon,
.theme-toggle .moon-icon,
.theme-toggle .system-icon {
    position: absolute;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

/* Show correct icon based on current theme */
:root:not([data-theme]) .theme-toggle .system-icon,
[data-theme="system"] .theme-toggle .system-icon {
    opacity: 1;
    transform: scale(1);
}

:root:not([data-theme]) .theme-toggle .sun-icon,
:root:not([data-theme]) .theme-toggle .moon-icon,
[data-theme="system"] .theme-toggle .sun-icon,
[data-theme="system"] .theme-toggle .moon-icon {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

[data-theme="light"] .theme-toggle .sun-icon {
    opacity: 1;
    transform: scale(1);
}

[data-theme="light"] .theme-toggle .moon-icon,
[data-theme="light"] .theme-toggle .system-icon {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

[data-theme="dark"] .theme-toggle .moon-icon {
    opacity: 1;
    transform: scale(1);
}

[data-theme="dark"] .theme-toggle .sun-icon,
[data-theme="dark"] .theme-toggle .system-icon {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

/* ========================================
   NAVIGATION TABS
   ======================================== */
.tool-nav {
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-primary);
    position: sticky;
    top: var(--header-height);
    z-index: 99;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tool-nav::-webkit-scrollbar {
    height: 0;
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--space-2) var(--space-6);
    display: flex;
    gap: var(--space-1);
    min-width: min-content;
}

.nav-tab {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: var(--space-2) var(--space-4);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--border-radius);
    transition: all var(--transition-fast);
    white-space: nowrap;
    position: relative;
}

.nav-tab:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.nav-tab.active {
    color: var(--accent-primary);
    background: var(--accent-light);
}

/* ========================================
   MAIN CONTENT AREA
   ======================================== */
main {
    flex: 1;
    max-width: var(--max-width);
    width: 100%;
    margin: 0 auto;
    padding: var(--space-12) var(--space-6);
}

/* Content Wrapper for Static Pages */
.content-wrapper {
    max-width: 700px;
}

.content-wrapper h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: var(--space-4);
    color: var(--text-primary);
}

.content-wrapper .lead {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-10);
}

.content-wrapper section {
    margin-bottom: var(--space-8);
}

.content-wrapper h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--space-3);
    color: var(--text-primary);
}

.content-wrapper p {
    color: var(--text-secondary);
    margin-bottom: var(--space-3);
    line-height: 1.7;
}

.content-wrapper ul {
    margin-left: var(--space-5);
    margin-bottom: var(--space-3);
    color: var(--text-secondary);
}

.content-wrapper li {
    margin-bottom: var(--space-2);
}

.content-wrapper a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.content-wrapper a:hover {
    color: var(--accent-hover);
}

.content-wrapper .email-link {
    font-size: 1.125rem;
    font-weight: 500;
}

.content-wrapper .text-small {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.tool {
    display: none;
    animation: fadeIn 200ms ease;
}

.tool.active {
    display: block;
}

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

.tool-info {
    text-align: center;
    margin-bottom: var(--space-10);
}

.tool-info h1 {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-3);
    color: var(--text-primary);
}

.tool-info p {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

/* ========================================
   FORM FIELDS - Consistent Spacing
   ======================================== */
.field {
    margin-bottom: var(--space-5);
}

.field:last-child {
    margin-bottom: 0;
}

.field label {
    display: block;
    margin-bottom: var(--space-2);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.field input[type="text"],
.field input[type="url"],
.field input[type="email"],
.field input[type="number"],
.field input[type="date"],
.field input[type="tel"],
.field textarea,
.field select {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: var(--bg-secondary);
    border: 1px solid var(--border-medium);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-family: inherit;
    line-height: 1.5;
    transition: all var(--transition-fast);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.field input::placeholder,
.field textarea::placeholder {
    color: var(--text-tertiary);
}

.field input[readonly],
.field textarea[readonly] {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-color: var(--border-light);
    cursor: default;
}

.field textarea {
    resize: vertical;
    min-height: 100px;
    font-family: 'SF Mono', 'JetBrains Mono', 'Consolas', 'Monaco', monospace;
    line-height: 1.6;
}

.field select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-3) center;
    padding-right: var(--space-10);
}

.field .hint {
    display: block;
    margin-top: var(--space-2);
    font-size: 0.8125rem;
    color: var(--text-tertiary);
}

.field.checkbox {
    display: flex;
    align-items: center;
}

.field.checkbox label {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
    margin-bottom: 0;
}

.field input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--accent-primary);
}

.field input[type="color"] {
    width: 56px;
    height: 40px;
    padding: var(--space-1);
    background: var(--bg-secondary);
    border: 1px solid var(--border-medium);
    border-radius: var(--border-radius);
    cursor: pointer;
}

/* Dark mode: make inputs more visible */
[data-theme="dark"] .field input[type="text"],
[data-theme="dark"] .field input[type="url"],
[data-theme="dark"] .field input[type="email"],
[data-theme="dark"] .field input[type="number"],
[data-theme="dark"] .field input[type="date"],
[data-theme="dark"] .field input[type="tel"],
[data-theme="dark"] .field textarea,
[data-theme="dark"] .field select,
[data-theme="dark"] .field input[type="color"],
[data-theme="dark"] .field input[readonly],
[data-theme="dark"] .field textarea[readonly],
[data-theme="dark"] input[readonly],
[data-theme="dark"] textarea[readonly] {
    background: #27272a !important;
    border-color: #3f3f46 !important;
    color: #fafafa !important;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .field input[type="text"],
    :root:not([data-theme="light"]) .field input[type="url"],
    :root:not([data-theme="light"]) .field input[type="email"],
    :root:not([data-theme="light"]) .field input[type="number"],
    :root:not([data-theme="light"]) .field input[type="date"],
    :root:not([data-theme="light"]) .field input[type="tel"],
    :root:not([data-theme="light"]) .field textarea,
    :root:not([data-theme="light"]) .field select,
    :root:not([data-theme="light"]) .field input[type="color"],
    :root:not([data-theme="light"]) .field input[readonly],
    :root:not([data-theme="light"]) .field textarea[readonly],
    :root:not([data-theme="light"]) input[readonly],
    :root:not([data-theme="light"]) textarea[readonly] {
        background: #27272a !important;
        border-color: #3f3f46 !important;
        color: #fafafa !important;
    }
}

.field input[type="range"] {
    width: 100%;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: var(--space-1);
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.field input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast);
}

.field input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.field input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--accent-primary);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.small-input {
    width: 70px !important;
    padding: var(--space-3) !important;
    text-align: center;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn-primary,
.btn-secondary,
.copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-primary);
    color: var(--text-inverse);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: var(--shadow-md);
}

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

.btn-secondary {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--text-tertiary);
}

.copy-btn {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    font-size: 0.8125rem;
    padding: var(--space-2) var(--space-3);
    margin-top: var(--space-2);
}

.copy-btn:hover {
    background: var(--accent-primary);
    color: var(--text-inverse);
    border-color: var(--accent-primary);
}

.btn-group {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-bottom: var(--space-6);
}

.btn-group button {
    flex-shrink: 0;
}

/* ========================================
   LAYOUT COMPONENTS
   ======================================== */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-5);
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-5);
    margin-bottom: var(--space-6);
}

.input-row {
    display: flex;
    gap: var(--space-2);
}

.input-row input {
    flex: 1;
}

.input-row .copy-btn {
    margin-top: 0;
    flex-shrink: 0;
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-5);
}

/* ========================================
   PREVIEW BOXES
   ======================================== */
.preview-box {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-16);
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-lg);
    margin-bottom: var(--space-8);
    min-height: 180px;
}

.color-preview-large {
    height: 140px;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-light);
    margin-bottom: var(--space-8);
    background: #3b82f6;
}

.gradient-preview-large {
    height: 160px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

#shadowBox {
    width: 140px;
    height: 140px;
    background: var(--accent-primary);
    border-radius: var(--border-radius);
    box-shadow: 10px 10px 20px rgba(0, 0, 0, 0.15);
}

.flex-preview {
    min-height: 200px;
    border: 1px dashed var(--border-medium);
    background: var(--bg-primary);
    padding: var(--space-4);
    display: flex;
    gap: var(--space-3);
    flex-direction: row;
    justify-content: flex-start;
    align-items: stretch;
    flex-wrap: nowrap;
}

.flex-item {
    padding: var(--space-4);
    background: var(--accent-primary);
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    min-width: 90px;
    text-align: center;
    color: var(--text-inverse);
}

/* ========================================
   OUTPUT SECTIONS
   ======================================== */
.output {
    margin-top: var(--space-8);
    padding: var(--space-6);
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-lg);
}

.output label {
    display: block;
    margin-bottom: var(--space-4);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
}

.output textarea {
    background: var(--bg-primary) !important;
    border-color: var(--border-medium) !important;
}

/* ========================================
   RESULT BOXES
   ======================================== */
.result-box {
    padding: var(--space-5);
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
}

.result-box label {
    display: block;
    margin-bottom: var(--space-3);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

#regexMatches {
    font-family: 'SF Mono', 'JetBrains Mono', 'Consolas', monospace;
    font-size: 0.875rem;
    color: var(--success);
    word-break: break-all;
}

.error {
    padding: var(--space-4);
    background: var(--error-light);
    border: 1px solid var(--error);
    border-radius: var(--border-radius);
    color: var(--error);
    font-size: 0.875rem;
}

.stats {
    padding: var(--space-4);
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ========================================
   OG PREVIEW CARDS
   ======================================== */
.og-previews {
    margin-top: var(--space-10);
    display: grid;
    gap: var(--space-10);
}

.og-preview-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.og-preview-section h3 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
}

.og-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    max-width: 540px;
    box-shadow: var(--shadow-md);
}

.og-card img {
    width: 100%;
    height: auto;
    display: block;
    min-height: 280px;
    object-fit: cover;
    background: var(--bg-tertiary);
}

.og-content {
    padding: var(--space-4) var(--space-5);
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    border-top: 1px solid var(--border-light);
}

.og-domain {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-tertiary);
    letter-spacing: 0.05em;
}

.og-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.og-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ========================================
   FOOTER - High Contrast
   ======================================== */
footer {
    border-top: 1px solid var(--border-light);
    margin-top: var(--space-20);
    padding: var(--space-8) var(--space-6);
    background: var(--bg-primary);
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-inner p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.footer-links {
    display: flex;
    gap: var(--space-6);
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color var(--transition-fast);
}

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

/* ========================================
   SCROLLBAR
   ======================================== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: var(--space-1);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    :root {
        --header-height: 56px;
        --space-12: 32px;
        --space-10: 28px;
        --space-8: 24px;
    }

    .header-inner,
    main {
        padding-left: var(--space-4);
        padding-right: var(--space-4);
    }

    .nav-inner {
        padding: var(--space-2) var(--space-4);
    }

    main {
        padding-top: var(--space-8);
        padding-bottom: var(--space-8);
    }

    .tool-info h1 {
        font-size: 1.5rem;
    }

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

    .form-grid,
    .controls-grid,
    .color-grid {
        grid-template-columns: 1fr;
    }

    .btn-group {
        flex-direction: column;
    }

    .btn-group button {
        width: 100%;
    }

    .footer-inner {
        flex-direction: column;
        gap: var(--space-4);
        text-align: center;
    }

    .header-links {
        display: none;
    }

    .preview-box {
        padding: var(--space-8);
    }

    .og-card {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .nav-tab {
        padding: var(--space-2) var(--space-3);
        font-size: 0.8125rem;
    }

    .tool-info h1 {
        font-size: 1.25rem;
    }
}

/* ========================================
   NEW TOOLS STYLES
   ======================================== */

/* Hash Results */
.hash-results {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.hash-result label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: 500;
    color: var(--text-secondary);
}

/* Result Columns */
.result-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-4);
    margin-top: var(--space-4);
}

.result-column h3 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--space-3);
    color: var(--text-secondary);
}

.code-output {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    padding: var(--space-4);
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.8125rem;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 300px;
    overflow-y: auto;
}

/* QR Code Output */
.qr-output {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
    margin-top: var(--space-4);
}

#qrCodeContainer {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

/* Password Generator */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
    color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-primary);
}

.password-strength {
    margin-top: var(--space-4);
}

.strength-bar {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: var(--space-1);
    overflow: hidden;
    margin-bottom: var(--space-2);
}

.strength-fill {
    height: 100%;
    transition: all var(--transition-normal);
}

.strength-bar + span {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

/* Unit Converter */
.unit-converter {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-4);
}

/* Timestamp Tool */
.timestamp-current {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    padding: var(--space-5);
    margin-bottom: var(--space-6);
    text-align: center;
}

.timestamp-current h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-3);
}

.timestamp-display {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.timestamp-display > div:first-child {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-primary);
    font-family: 'Monaco', 'Menlo', monospace;
}

.timestamp-display > div:last-child {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.timestamp-converter {
    margin-bottom: var(--space-6);
}

.result-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    padding: var(--space-4);
    margin-top: var(--space-3);
    line-height: 1.6;
}

.result-box:empty {
    display: none;
}
