/* ========================================
   InstantConverter.org - Main Stylesheet
   Mobile-First, Performance Optimized
   ======================================== */

/* CSS Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary-blue: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
    --bg-white: #ffffff;
    --bg-light: #f9fafb;
    --bg-gray: #f3f4f6;
    --border-color: #e5e7eb;
    --success-green: #10b981;
    --error-red: #ef4444;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --transition: 0.2s ease;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    font-weight: 700;
    color: var(--text-primary);
}

h1 { font-size: 1.875rem; margin-bottom: 1rem; }
h2 { font-size: 1.5rem; margin-bottom: 0.875rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }

p { margin-bottom: 1rem; color: var(--text-secondary); }

a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover { color: var(--primary-dark); }

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.main-content {
    flex: 1;
    padding: 2rem 0;
}

/* Header */
.header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--primary-blue);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1rem;
}

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

.nav-link {
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition);
}

.nav-link:hover {
    background: var(--bg-gray);
    color: var(--primary-blue);
}

.nav-link.active {
    background: var(--primary-blue);
    color: white;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 2rem 0;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-white) 100%);
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 1.5rem;
}

/* Tool Cards Grid */
.tools-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tool-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tool-card:hover {
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.tool-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.tool-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.tool-card p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.tool-card .btn {
    margin-top: auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

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

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

.btn-secondary {
    background: var(--bg-gray);
    color: var(--text-primary);
}

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

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

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

/* Tool Page Layout */
.tool-page {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.tool-main {
    order: 1;
}

.tool-sidebar {
    order: 2;
}

/* Tool Interface */
.tool-interface {
    background: var(--bg-white);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.tool-interface.drag-active {
    border-color: var(--primary-blue);
    background: var(--bg-light);
}

.upload-area {
    padding: 2rem;
    cursor: pointer;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-blue);
}

.upload-text {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.upload-hint {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.file-input {
    display: none;
}

/* Tool Controls */
.tool-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-group label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.control-group select,
.control-group input[type="text"],
.control-group input[type="number"],
.control-group textarea {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    width: 100%;
    transition: border-color var(--transition);
}

.control-group select:focus,
.control-group input:focus,
.control-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.control-group textarea {
    min-height: 150px;
    resize: vertical;
    font-family: inherit;
}

/* Preview Area */
.preview-area {
    background: var(--bg-light);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin: 1rem 0;
    min-height: 100px;
}

.preview-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: var(--radius-sm);
}

/* Progress Bar */
.progress-container {
    display: none;
    margin: 1rem 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-gray);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-blue);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    text-align: center;
}

/* Results */
.result-area {
    display: none;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-top: 1rem;
}

.result-success {
    color: var(--success-green);
    font-weight: 600;
    margin-bottom: 1rem;
}

.download-btn {
    width: 100%;
}

/* Content Sections */
.content-section {
    margin-bottom: 2rem;
}

.content-section h2 {
    color: var(--text-primary);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--bg-gray);
    margin-bottom: 1rem;
}

.content-section ul {
    list-style: none;
    padding-left: 0;
}

.content-section li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
}

.content-section li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-green);
    font-weight: bold;
}

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

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 1rem;
    background: var(--bg-white);
    border: none;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background var(--transition);
}

.faq-question:hover {
    background: var(--bg-light);
}

.faq-icon {
    font-size: 1.25rem;
    color: var(--primary-blue);
    transition: transform var(--transition);
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

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

.faq-item.active .faq-answer {
    padding: 1rem;
    max-height: 500px;
}

.faq-answer p {
    margin: 0;
}

/* Related Tools */
.related-tools {
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-top: 2rem;
}

.related-tools h3 {
    margin-bottom: 1rem;
}

.related-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.related-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    transition: all var(--transition);
}

.related-link:hover {
    background: var(--primary-blue);
    color: white;
}

.related-link-icon {
    font-size: 1.25rem;
}

/* Internal Links Section */
.internal-links {
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin: 2rem 0;
}

.internal-links h2 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.links-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.internal-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all var(--transition);
}

.internal-link:hover {
    background: var(--primary-blue);
    color: white;
}

/* Unit Converter Specific */
.converter-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.converter-input {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.converter-input input {
    padding: 1rem;
    font-size: 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.converter-input select {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-white);
}

.swap-btn {
    align-self: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.25rem;
    padding: 0;
}

.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.category-tab {
    padding: 0.5rem 1rem;
    background: var(--bg-gray);
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.category-tab.active {
    background: var(--primary-blue);
    color: white;
}

.category-tab:hover:not(.active) {
    background: var(--border-color);
}

/* Text Case Converter */
.text-output {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    min-height: 150px;
    font-family: inherit;
    white-space: pre-wrap;
    word-break: break-word;
}

.case-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin: 1rem 0;
}

.case-btn {
    padding: 0.75rem;
    font-size: 0.875rem;
}

.copy-btn {
    width: 100%;
    margin-top: 1rem;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 2rem 0 1rem;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.footer-links {
    list-style: none;
}

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

.footer-links a {
    color: #9ca3af;
    font-size: 0.875rem;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 1rem;
    text-align: center;
    font-size: 0.875rem;
    color: #9ca3af;
}

/* Legal Pages */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-content h1 {
    margin-bottom: 0.5rem;
}

.legal-content .last-updated {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 2rem;
}

.legal-content h2 {
    margin-top: 2rem;
}

.legal-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
}

/* About Page */
.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 2rem 0;
}

.feature-card {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
}

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

.feature-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.875rem;
    margin: 0;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* File List */
.file-list {
    margin: 1rem 0;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

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

.file-name {
    font-weight: 500;
    font-size: 0.875rem;
}

.file-size {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.remove-file {
    background: none;
    border: none;
    color: var(--error-red);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: var(--text-muted);
}

.breadcrumb span {
    color: var(--text-muted);
}

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 500;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-blue);
    color: white;
    padding: 0.5rem 1rem;
    z-index: 1000;
}

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

/* Visually Hidden */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========================================
   TABLET BREAKPOINT (768px+)
   ======================================== */
@media (min-width: 768px) {
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.75rem; }
    
    .container {
        padding: 0 2rem;
    }
    
    .hero {
        padding: 3rem 2rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .tool-page {
        grid-template-columns: 1fr 280px;
    }
    
    .tool-main {
        order: 1;
    }
    
    .tool-sidebar {
        order: 2;
    }
    
    .converter-row {
        grid-template-columns: 1fr auto 1fr;
        align-items: end;
    }
    
    .case-buttons {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .links-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-features {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================
   DESKTOP BREAKPOINT (1024px+)
   ======================================== */
@media (min-width: 1024px) {
    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .tool-page {
        grid-template-columns: 1fr 320px;
        gap: 3rem;
    }
    
    .case-buttons {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .links-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .about-features {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .header,
    .footer,
    .tool-interface,
    .tool-sidebar,
    .btn,
    .nav {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        color: black;
        background: white;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
}

/* ========================================
   REDUCED MOTION
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* ========================================
   WORD COUNTER STYLES
   ======================================== */
.text-input-area textarea {
    width: 100%;
    min-height: 250px;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    transition: border-color var(--transition);
}

.text-input-area textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
}

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

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.stat-card {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid var(--border-color);
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-blue);
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ========================================
   PASSWORD GENERATOR STYLES
   ======================================== */
.password-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-light);
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
    margin-bottom: 1rem;
}

.password-display input {
    flex: 1;
    background: none;
    border: none;
    font-size: 1.125rem;
    font-family: 'Monaco', 'Consolas', monospace;
    color: var(--text-primary);
}

.password-display input:focus {
    outline: none;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}

.btn-icon:hover {
    background: var(--bg-gray);
}

.password-strength {
    margin-bottom: 1.5rem;
}

.strength-bar {
    height: 6px;
    background: var(--bg-gray);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.strength-fill {
    height: 100%;
    width: 0;
    transition: width 0.3s, background 0.3s;
}

.strength-fill.weak { background: var(--error-red); }
.strength-fill.fair { background: #f59e0b; }
.strength-fill.good { background: #84cc16; }
.strength-fill.strong { background: var(--success-green); }

.strength-text {
    font-size: 0.875rem;
    font-weight: 500;
}

.password-options {
    margin-bottom: 1.5rem;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.btn-large {
    width: 100%;
    padding: 1rem;
    font-size: 1.125rem;
}

.generated-history {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    gap: 1rem;
}

.history-password {
    font-family: monospace;
    font-size: 0.875rem;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

/* ========================================
   JSON FORMATTER STYLES
   ======================================== */
.json-editor {
    margin-bottom: 1rem;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-gray);
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    font-weight: 500;
}

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

.json-editor textarea {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    resize: vertical;
}

.json-editor textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.btn-small {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
}

.btn-small:hover {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.validation-status {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.validation-status.valid {
    background: #d1fae5;
    color: #065f46;
}

.validation-status.invalid {
    background: #fee2e2;
    color: #991b1b;
}

/* ========================================
   BASE64 CONVERTER STYLES
   ======================================== */
.tab-container {
    margin-bottom: 1.5rem;
}

.tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.tab {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition);
}

.tab:hover {
    color: var(--primary-blue);
}

.tab.active {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.dual-editor {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 768px) {
    .dual-editor {
        flex-direction: row;
        align-items: stretch;
    }
    
    .dual-editor .editor-panel {
        flex: 1;
    }
    
    .editor-actions-vertical {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 0.5rem;
    }
}

.editor-panel {
    display: flex;
    flex-direction: column;
}

.editor-panel textarea {
    flex: 1;
    min-height: 150px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: monospace;
    font-size: 0.875rem;
    resize: vertical;
}

.image-preview {
    text-align: center;
    margin: 1rem 0;
}

.image-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.file-info {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin: 1rem 0;
}

.file-info p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

/* ========================================
   QR CODE GENERATOR STYLES
   ======================================== */
.qr-input-section {
    margin-bottom: 1.5rem;
}

.qr-preview {
    text-align: center;
    padding: 2rem;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    margin-top: 1.5rem;
}

.qr-preview canvas {
    max-width: 100%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

/* ========================================
   IMAGE COMPRESSOR STYLES
   ======================================== */
.compression-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.compression-result-item .result-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    flex-wrap: wrap;
}

.compression-result-item .file-name {
    font-weight: 500;
    flex: 1;
    min-width: 150px;
}

.compression-result-item .size-info {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.compression-result-item .savings {
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}

.savings.positive {
    background: #d1fae5;
    color: #065f46;
}

.savings.negative {
    background: #fee2e2;
    color: #991b1b;
}

.compression-summary {
    padding: 1rem;
    background: var(--primary-blue);
    color: white;
    border-radius: var(--radius-md);
    text-align: center;
    margin-top: 1rem;
}

.compression-summary .positive {
    background: rgba(255,255,255,0.2);
    color: white;
}

