/* Shared layout, sidebar, container, textarea, and tool-title styles from all modern tools */

/* ============================================================================
   MODERN TYPOGRAPHY SYSTEM
   ============================================================================
   
   Font Strategy:
   - Primary: Inter - Clean, professional, excellent readability at all sizes
   - Accent: Space Grotesk - Modern geometric sans for headlines and emphasis
   - Code: JetBrains Mono - Superior monospace for technical content
   
   These fonts are chosen based on analysis of leading tech companies:
   - Vercel, GitHub, Linear: Use Inter for its neutrality and legibility
   - Stripe, Figma: Favor geometric sans-serifs for headers
   - VSCode, JetBrains: JetBrains Mono for code readability
   
   Typography Scale (Major Third - 1.250 ratio):
   - Creates visual hierarchy while maintaining harmony
   - Base: 16px (1rem) for optimal readability
   - Scale: 12px → 14px → 16px → 20px → 25px → 31px → 39px → 49px
============================================================================ */

/* CSS Variables for Theme Support */
:root {
    /* Typography Variables */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-accent: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-code: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;
    
    /* Font Weights - Semantic naming for consistency */
    --fw-light: 300;
    --fw-regular: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;
    --fw-extrabold: 800;
    
    /* Font Sizes - Major Third Scale (1.250) */
    --fs-xs: 0.75rem;      /* 12px - captions, labels */
    --fs-sm: 0.875rem;     /* 14px - small text, metadata */
    --fs-base: 1rem;       /* 16px - body text */
    --fs-lg: 1.125rem;     /* 18px - large body, subheadings */
    --fs-xl: 1.25rem;      /* 20px - section titles */
    --fs-2xl: 1.563rem;    /* 25px - card titles */
    --fs-3xl: 1.953rem;    /* 31px - page titles */
    --fs-4xl: 2.441rem;    /* 39px - hero titles */
    --fs-5xl: 3.052rem;    /* 49px - display headlines */
    
    /* Line Heights - Optimized for readability */
    --lh-tight: 1.25;      /* Headers */
    --lh-snug: 1.375;      /* Subheadings */
    --lh-normal: 1.5;      /* Body text */
    --lh-relaxed: 1.625;   /* Long-form content */
    --lh-loose: 1.75;      /* Marketing copy */
    
    /* Letter Spacing - Refined optical adjustments */
    --ls-tighter: -0.05em;  /* Large headlines */
    --ls-tight: -0.025em;   /* Medium headlines */
    --ls-normal: 0;         /* Body text */
    --ls-wide: 0.025em;     /* Small caps, buttons */
    --ls-wider: 0.05em;     /* Labels, metadata */
    
    /* Light theme (default) */
    --bg-primary: #ffffff;
    --bg-secondary: #f7f8fa;
    --bg-tertiary: #f3f4f6;
    --text-primary: #1f2937;
    --text-secondary: #374151;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --card-bg: #ffffff;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --input-bg: #ffffff;
    --input-border: #d1d5db;
    --hover-bg: #f3f4f6;
    --sidebar-bg: #f7f8fa;
    --textarea-bg: #f0f6ff;
    --textarea-text: #222;
    --link-hover: #e3f0ff;
    --primary-color: #667eea;
    --primary-dark: #764ba2;
    --success-color: #34a853;
}

[data-theme="dark"] {
    --bg-primary: #1a1f2e;
    --bg-secondary: #252b3d;
    --bg-tertiary: #2d3548;
    --text-primary: #ffffff;
    --text-secondary: #e5e7eb;
    --text-muted: #9ca3af;
    --border-color: rgba(255, 255, 255, 0.1);
    --card-bg: #252b3d;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --input-bg: #2d3548;
    --input-border: rgba(255, 255, 255, 0.2);
    --hover-bg: rgba(255, 255, 255, 0.05);
    --sidebar-bg: #252b3d;
    --textarea-bg: #2d3548;
    --textarea-text: #e5e7eb;
    --link-hover: rgba(102, 126, 234, 0.2);
    --primary-color: #667eea;
    --primary-dark: #8b9bff;
    --success-color: #34a853;
}

/* ============================================================================
   GLOBAL FOUNDATION STYLES
   ============================================================================ */

/* Global Reset - Modern box model for predictable layouts */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body - Foundation typography and rendering optimizations */
body {
    font-family: var(--font-primary);
    font-size: var(--fs-base);
    font-weight: var(--fw-regular);
    line-height: var(--lh-normal);
    letter-spacing: var(--ls-normal);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    
    /* Font rendering optimizations for clarity across platforms */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
}

/* Smooth scrolling for better UX */
html {
    scroll-behavior: smooth;
}

/* ============================================================================
   GLOSSY ANIMATION SYSTEM
   ============================================================================
   
   Design Philosophy:
   - Subtle shine effect that enhances header and footer aesthetics
   - Theme-aware: adapts opacity for light vs dark modes
   - Non-intrusive: uses pseudo-elements with pointer-events: none
   - Performance optimized: GPU-accelerated transform animations
   - Natural blending: uses overlay mode for seamless integration
============================================================================ */

/* Glossy shine animation for header and footer */
.modern-header::before,
.modern-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    pointer-events: none;
    z-index: 1;
    animation: glossyShine 6s linear infinite;
    mix-blend-mode: overlay;
}

/* Dark mode adaptation - more subtle shine */
[data-theme="dark"] .modern-header::before,
[data-theme="dark"] .modern-footer::before {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0) 100%
    );
}

/* Keyframe animation - continuous back and forth slide effect */
@keyframes glossyShine {
    0% {
        left: -100%;
    }
    50% {
        left: 100%;
    }
    100% {
        left: -100%;
    }
}

/* Ensure relative positioning for pseudo-elements */
.modern-header,
.modern-footer {
    position: relative;
    overflow: hidden;
}

/* ============================================================================
   TYPOGRAPHY HIERARCHY
   ============================================================================
   
   Design Philosophy:
   - Headers use Space Grotesk for distinctive, modern look
   - Tighter line-heights for headers improve visual impact
   - Negative letter-spacing on large text for optical balance
   - Progressive font-weight increase emphasizes hierarchy
============================================================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-accent);
    color: var(--text-primary);
    line-height: var(--lh-tight);
    font-weight: var(--fw-bold);
    margin: 0 0 0.75em 0;
    
    /* Improved text balance for better readability */
    text-wrap: balance;
}

/* Display - Hero sections, landing pages */
h1 {
    font-size: clamp(2rem, 5vw, var(--fs-4xl));
    font-weight: var(--fw-extrabold);
    letter-spacing: var(--ls-tighter);
    line-height: 1.1;
}

/* Section Headers - Main content divisions */
h2 {
    font-size: clamp(1.5rem, 4vw, var(--fs-3xl));
    font-weight: var(--fw-bold);
    letter-spacing: var(--ls-tight);
    line-height: 1.2;
}

/* Subsection Headers - Content groupings */
h3 {
    font-size: clamp(1.25rem, 3vw, var(--fs-2xl));
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-tight);
}

/* Card/Component Headers */
h4 {
    font-size: var(--fs-xl);
    font-weight: var(--fw-semibold);
}

/* Small Headers - Form sections, sidebars */
h5 {
    font-size: var(--fs-lg);
    font-weight: var(--fw-medium);
    text-transform: uppercase;
    letter-spacing: var(--ls-wide);
}

/* Micro Headers - Labels, captions */
h6 {
    font-size: var(--fs-base);
    font-weight: var(--fw-medium);
    text-transform: uppercase;
    letter-spacing: var(--ls-wider);
}

/* Body Text - Optimized for extended reading */
p {
    font-family: var(--font-primary);
    color: var(--text-secondary);
    line-height: var(--lh-relaxed);
    margin: 0 0 1.25em 0;
    font-size: var(--fs-base);
    
    /* Improved readability for long-form content */
    max-width: 70ch;
}

/* Large Body - Intro paragraphs, leads */
.text-lead {
    font-size: var(--fs-lg);
    line-height: var(--lh-loose);
    color: var(--text-secondary);
    font-weight: var(--fw-regular);
}

/* Small Text - Captions, metadata, footnotes */
.text-small {
    font-size: var(--fs-sm);
    line-height: var(--lh-normal);
    color: var(--text-muted);
}

/* Extra Small - Legal text, timestamps */
.text-xs {
    font-size: var(--fs-xs);
    line-height: var(--lh-snug);
    color: var(--text-muted);
    letter-spacing: var(--ls-wide);
}

/* Links - Consistent, accessible interaction */
a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: var(--fw-medium);
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
    border-radius: 2px;
}

/* Strong & Bold - Semantic emphasis */
strong, b {
    font-weight: var(--fw-semibold);
    color: var(--text-primary);
}

/* Emphasis - Italic styling */
em, i {
    font-style: italic;
}

/* Code Elements - Technical content styling */
code, kbd, samp {
    font-family: var(--font-code);
    font-size: 0.9em;
    padding: 0.2em 0.4em;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-weight: var(--fw-regular);
    letter-spacing: -0.01em;
}

/* Preformatted Code Blocks */
pre {
    font-family: var(--font-code);
    font-size: var(--fs-sm);
    line-height: var(--lh-relaxed);
    padding: 1.25rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5em 0;
}

pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: inherit;
}

/* Blockquotes - Distinctive styling for quoted content */
blockquote {
    margin: 1.5em 0;
    padding: 1em 1.5em;
    border-left: 4px solid var(--primary-color);
    background: var(--bg-tertiary);
    font-style: italic;
    color: var(--text-secondary);
}

blockquote p:last-child {
    margin-bottom: 0;
}

/* Lists - Improved spacing and hierarchy */
ul, ol {
    margin: 1em 0;
    padding-left: 1.5em;
    line-height: var(--lh-relaxed);
}

li {
    margin: 0.5em 0;
}

/* Horizontal Rules - Visual separation */
hr {
    border: none;
    height: 1px;
    background: var(--border-color);
    margin: 2.5em 0;
}

/* ============================================================================
   TYPOGRAPHY UTILITY CLASSES
   ============================================================================
   Reusable classes for consistent typography across components
============================================================================ */

/* Font Family Utilities */
.font-primary {
    font-family: var(--font-primary);
}

.font-accent {
    font-family: var(--font-accent);
}

.font-code {
    font-family: var(--font-code);
}

/* Font Weight Utilities */
.fw-light { font-weight: var(--fw-light); }
.fw-regular { font-weight: var(--fw-regular); }
.fw-medium { font-weight: var(--fw-medium); }
.fw-semibold { font-weight: var(--fw-semibold); }
.fw-bold { font-weight: var(--fw-bold); }
.fw-extrabold { font-weight: var(--fw-extrabold); }

/* Font Size Utilities */
.text-xs { font-size: var(--fs-xs); }
.text-sm { font-size: var(--fs-sm); }
.text-base { font-size: var(--fs-base); }
.text-lg { font-size: var(--fs-lg); }
.text-xl { font-size: var(--fs-xl); }
.text-2xl { font-size: var(--fs-2xl); }
.text-3xl { font-size: var(--fs-3xl); }
.text-4xl { font-size: var(--fs-4xl); }
.text-5xl { font-size: var(--fs-5xl); }

/* Line Height Utilities */
.lh-tight { line-height: var(--lh-tight); }
.lh-snug { line-height: var(--lh-snug); }
.lh-normal { line-height: var(--lh-normal); }
.lh-relaxed { line-height: var(--lh-relaxed); }
.lh-loose { line-height: var(--lh-loose); }

/* Letter Spacing Utilities */
.ls-tighter { letter-spacing: var(--ls-tighter); }
.ls-tight { letter-spacing: var(--ls-tight); }
.ls-normal { letter-spacing: var(--ls-normal); }
.ls-wide { letter-spacing: var(--ls-wide); }
.ls-wider { letter-spacing: var(--ls-wider); }

/* Text Transform Utilities */
.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }

/* Text Color Utilities */
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }

/* ============================================================================
   LAYOUT CONTAINERS
   ============================================================================ */

.modern-layout-flex {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: stretch;
    width: 100%;
    margin: 0 auto;
    min-height: 80vh;
    /* padding-top: 8.5rem; */
}
/* ============================================================================
   SIDEBAR TYPOGRAPHY & NAVIGATION
   ============================================================================
   Enhanced sidebar with modern typography for better readability and hierarchy
============================================================================ */

.modern-sidebar {
    width: 20vw;
    min-width: 180px;
    max-width: 350px;
    background: var(--sidebar-bg);
    border-radius: 1.1rem;
    box-shadow: var(--card-shadow);
    padding: 1.5rem 1.25rem;
    font-size: 1rem;
    box-sizing: border-box;
    color: var(--text-primary);
}

/* Left Sidebar - Scrollable with Sticky Positioning */
.left-sidebar {
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    scroll-padding: 2rem;
}

/* Custom Scrollbar Styling for Left Sidebar */
.left-sidebar::-webkit-scrollbar {
    width: 8px;
}

.left-sidebar::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 10px;
    margin: 0.5rem 0;
}

.left-sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    transition: background 0.3s ease;
}

.left-sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Firefox Scrollbar Styling */
.left-sidebar {
    scrollbar-width: thin;
    scrollbar-color: #667eea var(--bg-secondary);
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-title {
    font-family: var(--font-accent);
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.05em;
    color: #ffffff !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}

.sidebar-title:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.sidebar-title i {
    font-size: 1rem;
    opacity: 0.95;
}

.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-list li {
    margin-bottom: 0.5rem;
    transition: transform 0.2s ease;
}

.sidebar-list li:hover {
    transform: translateX(4px);
}

.sidebar-list a {
    font-family: var(--font-primary);
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.6;
    color: var(--text-secondary);
    text-decoration: none;
    display: block;
    padding: 0.625rem 0.875rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.sidebar-list a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-color);
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.sidebar-list a:hover {
    color: var(--primary-color);
    background: var(--link-hover);
    text-decoration: none;
    font-weight: 600;
}

.sidebar-list a:hover::before {
    transform: scaleY(1);
}

.sidebar-list a:active {
    transform: scale(0.98);
}

/* Active state for current page */
.sidebar-list a.active {
    color: var(--primary-color);
    background: var(--link-hover);
    font-weight: 600;
    animation: highlightTool 1s ease-out;
}

.sidebar-list a.active::before {
    transform: scaleY(1);
}

.sidebar-list li.active {
    animation: highlightTool 1s ease-out;
}

/* Highlight animation for active tool */
@keyframes highlightTool {
    0% {
        background: rgba(102, 126, 234, 0.3);
        transform: scale(1.02);
    }
    100% {
        background: transparent;
        transform: scale(1);
    }
}

.container-modern {
    flex: 0 0 60vw;
    max-width: 60vw;
    min-width: 320px;
    background: var(--card-bg);
    border-radius: 1.2rem;
    box-shadow: var(--card-shadow);
    padding: 2rem 1.5rem 2.5rem 1.5rem;
    box-sizing: border-box;
}
.tool-title {
    font-size: 2.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    text-align: center;
}
.tool-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    text-align: center;
}
/* ============================================================================
   TEXTAREA & CODE INPUT COMPONENTS
   ============================================================================
   Modern code editor styling with professional monospace typography
============================================================================ */

.modern-textarea-wrapper {
    width: 100%;
    margin-bottom: 1.5rem;
}

.modern-textarea {
    width: 100%;
    min-height: 220px;
    font-family: var(--font-code);
    font-size: var(--fs-base);
    line-height: var(--lh-relaxed);
    font-weight: var(--fw-regular);
    border-radius: 0.7rem;
    border: 1.5px solid var(--primary-color);
    padding: 1.1rem 1rem;
    background: var(--textarea-bg);
    color: var(--textarea-text);
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    
    /* Code-specific features */
    font-feature-settings: 'liga' 0, 'calt' 0;
    letter-spacing: -0.01em;
    tab-size: 4;
}

.modern-textarea:focus {
    outline: none;
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.actions {
    display: flex;
    gap: 1.2rem;
    margin-top: 1.2rem;
    justify-content: center;
}
/* Suggested Tools Section Styles (shared) */
.suggested-tools {
    margin-top: 2.5rem;
    background: var(--bg-tertiary);
    border-radius: 1rem;
    padding: 1.2rem 1rem;
}
.suggested-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.7rem;
}
.suggested-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}
.suggested-link {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    padding: 0.5rem 1.2rem;
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s, border 0.2s;
}
.suggested-link:hover {
    background: var(--link-hover);
    border-color: var(--primary-color);
}

/* ============================================================================
   FEATURE GRID SECTION STYLES (shared)
   ============================================================================
   Feature cards grid for showcasing tool capabilities
============================================================================ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .feature-card {
    background: rgba(30, 30, 40, 0.8);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0.5rem 0;
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Feature icon for feature grid fragments only */
.features-grid .feature-icon {
    font-size: 3rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    display: block;
}

/* Unified Minify and Download Button Styles */
.minify-btn {
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.7rem 2.2rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: background 0.18s, box-shadow 0.18s, transform 0.12s;
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    box-shadow: none;
}
.minify-btn:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-2px) scale(1.03);
}
.download-btn {
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.7rem 2.2rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: background 0.18s, box-shadow 0.18s, transform 0.12s;
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    box-shadow: none;
}
.download-btn:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-2px) scale(1.03);
}
/* Upload area styles for all modern tools */
.upload-modern {
    border: 2px dashed var(--primary-color);
    border-radius: 1rem;
    background: var(--textarea-bg);
    padding: 2rem 1rem;
    text-align: center;
    margin-bottom: 2rem;
    transition: border-color 0.2s;
}
.upload-modern.dragover {
    border-color: var(--success-color);
}
.upload-modern input[type="file"] {
    display: none;
}
.upload-label {
    display: inline-block;
    padding: 0.7rem 2.2rem;
    background: var(--primary-color);
    color: #fff;
    border-radius: 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 0.5rem;
    transition: background 0.2s;
}
.upload-label:hover {
    background: var(--primary-dark);
}
.upload-info {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}
.selected-files {
    margin-top: 1rem;
    text-align: left;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.selected-files-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    transition: background 0.2s;
}
.file-item:hover {
    background: var(--hover-bg);
}
.file-item-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}
.file-item-icon {
    color: var(--primary-color);
    font-size: 1.1rem;
    flex-shrink: 0;
}
.file-item-name {
    color: var(--text-primary);
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.file-item-size {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-left: auto;
    padding-left: 0.5rem;
    flex-shrink: 0;
}
.success-message {
    color: var(--success-color);
    font-weight: 600;
}
/* Modern Header Styles */
.modern-header {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 2px 12px rgba(102,126,234,0.08);
    padding: 0.7rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.modern-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}
.modern-navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}
.modern-logo {
    height: 2.2rem;
    width: auto;
    margin-right: 0.5rem;
}
.modern-title {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #fff;
}
.modern-navbar-links {
    display: flex;
    gap: 1.2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.modern-nav-link {
    color: #fff;
    font-weight: 500;
    text-decoration: none;
    font-size: 1.08rem;
    padding: 0.3rem 0.9rem;
    border-radius: 1.2rem;
    transition: background 0.18s, color 0.18s;
}
.modern-nav-link:hover {
    background: #764ba2;
    color: #fff;
}

/* Modern Footer Styles */
.modern-footer {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 2.2rem 0 1.1rem 0;
    box-shadow: 0 -2px 12px rgba(102,126,234,0.08);
    margin-top: 3rem;
}
.modern-footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
}
.modern-footer-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}
.modern-footer-logo {
    height: 2rem;
    width: auto;
    margin-right: 0.5rem;
}
.modern-footer-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
}
.modern-footer-links {
    display: flex;
    gap: 1.2rem;
}
.modern-footer-link {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.2rem 0.7rem;
    border-radius: 1rem;
    transition: background 0.18s, color 0.18s;
}
.modern-footer-link:hover {
    background: #764ba2;
    color: #fff;
}
.modern-footer-social {
    display: flex;
    gap: 0.7rem;
}
.modern-footer-social-link img {
    height: 1.3rem;
    width: 1.3rem;
    filter: brightness(0) invert(1);
    transition: filter 0.18s;
}
.modern-footer-social-link:hover img {
    filter: brightness(0.8) invert(0.8);
}
.modern-footer-bottom {
    text-align: center;
    margin-top: 1.2rem;
    font-size: 0.98rem;
    color: #e3f0ff;
}
@media (max-width: 1100px) {
    .modern-sidebar { width: 150px; font-size: 0.95rem; }
    .container-modern { max-width: 98vw; flex: 1 1 100%; }
}
@media (max-width: 900px) {
    .modern-layout-flex { flex-direction: column; align-items: stretch; }
    .modern-sidebar { width: 100%; margin-top: 1.5rem; margin-bottom: 1.5rem; max-width: 100vw; }
    .container-modern { max-width: 98vw; flex: 1 1 100%; }
    .modern-navbar, .modern-footer-content {
        flex-direction: column;
        align-items: flex-start;
        padding: 0 1rem;
    }
    .modern-navbar-links, .modern-footer-links, .modern-footer-social {
        margin-top: 0.7rem;
    }
    
    /* Features Grid - Tablet */
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.75rem;
    }
}
@media (max-width: 600px) {
    .container-modern { padding: 1rem 0.2rem; margin-top: 3.5rem; }
    .tool-title { font-size: 1.3rem; }
    .modern-textarea { min-height: 120px; font-size: 0.98rem; }
    .modern-header, .modern-footer {
        padding: 1rem 0 0.7rem 0;
    }
    .modern-navbar, .modern-footer-content {
        padding: 0 0.5rem;
    }
    .modern-title, .modern-footer-title {
        font-size: 1rem;
    }
    .left-sidebar {
        display: none !important;
    }
}
/* Modern Page Header Styles */
.modern-page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem 2rem 7rem 2rem;
    position: relative;
    text-align: center;
    overflow: hidden;
    z-index: 1;
}
.modern-page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg width="60" height="60" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="60" height="60" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="white" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}
.page-header-content {
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out;
}
.page-header-icon {
    font-size: 3.5rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 1rem;
    animation: bounceIcon 2s infinite;
}
.page-header-title {
    color: #fff;
    font-size: 3.2rem;
    font-weight: 800;
    margin: 0 0 1rem 0;
    text-shadow: 0 4px 12px rgba(0,0,0,0.2);
    letter-spacing: -1px;
}
.page-header-subtitle {
    color: rgba(255,255,255,0.95);
    font-size: 1.3rem;
    font-weight: 400;
    margin: 0;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}
.page-header-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 2;
}
.page-header-wave svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 80px;
    transform: scaleY(-1);
}
.page-header-wave path {
    fill: #f7f8fa;
}

[data-theme="dark"] .page-header-wave path {
    fill: #1a1f2e;
}

@keyframes bounceIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
@media (max-width: 768px) {
    .modern-page-header {
        padding: 1rem 1rem 5rem 1rem;
    }
    .page-header-icon {
        font-size: 2.5rem;
    }
    .page-header-title {
        font-size: 2.2rem;
    }
    .page-header-subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }
    .page-header-wave svg {
        height: 60px;
    }
    
    /* Features Grid Responsive */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin: 2rem 0;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .features-grid .feature-icon {
        font-size: 2.5rem;
    }
}

/* Common Utility Styles */

/* Error Message */
.error-message {
    background: #fee;
    border: 2px solid #f44;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    color: #c00;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.error-message i {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

[data-theme="dark"] .error-message {
    background: rgba(244, 68, 68, 0.15);
    border-color: #f44;
    color: #ff6b6b;
}

/* Note Section */
.note-section {
    margin-top: 2rem;
    padding: 1rem 1.25rem;
    background: var(--bg-tertiary);
    border-radius: 0.5rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.note-section i {
    color: var(--primary-color);
    font-size: 1.125rem;
}

.note-section a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.note-section a:hover {
    text-decoration: underline;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 2rem;
    background: var(--bg-tertiary);
    border-radius: 0.5rem;
    margin: 2rem 0;
}

.loading-spinner p {
    margin-top: 1rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Global anchor styling - excludes specific navigation and component links */
a:not(.modern-nav-link):not(.mobile-nav-link):not(.dropdown-item):not(.footer-link):not(.brand-link) {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:not(.modern-nav-link):not(.mobile-nav-link):not(.dropdown-item):not(.footer-link):not(.brand-link):hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Step-by-step instruction styles */
.step-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
}

.step-item:hover {
    background: var(--hover-bg);
    transform: translateX(4px);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    background: var(--primary-color);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.875rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.step-text {
    flex: 1;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.9rem;
}

.step-tip {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem;
    background: linear-gradient(135deg, rgba(26, 115, 232, 0.1) 0%, rgba(26, 115, 232, 0.05) 100%);
    border-left: 3px solid var(--primary-color);
    border-radius: 0.5rem;
    margin-top: 1rem;
}

.step-tip i {
    color: var(--primary-color);
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.step-tip span {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Tool Description Section */
.tool-description {
    background: var(--card-bg);
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--card-shadow);
}

.tool-description h3 {
    margin: 0 0 0.75rem 0;
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 600;
}

.tool-description h3 i {
    margin-right: 0.5rem;
}

.tool-description p {
    margin: 0;
    line-height: 1.6;
    color: var(--text-secondary);
}


