@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    /* Light theme variables */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #a5b4fc;
    --secondary: #f8fafc;
    --accent: #10b981;
    --accent-light: #34d399;
    --accent-dark: #059669;
    --danger: #ef4444;
    --danger-dark: #dc2626;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --slider-line: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 8px;
    --radius-lg: 12px;
    
    /* Background colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-gradient-start: #f8fafc;
    --bg-gradient-end: #e2e8f0;
    
    /* Card and panel backgrounds */
    --card-bg: #ffffff;
    --panel-bg: #ffffff;
    --header-bg: #f8fafc;
    --secondary-header-bg: var(--header-bg);
    
    /* Input and form elements */
    --input-bg: #ffffff;
    --input-border: #e2e8f0;
    --input-focus: #6366f1;
    
    /* Scrollbar */
    --scrollbar-track: #f1f5f9;
    --scrollbar-thumb: #cbd5e1;
    --scrollbar-thumb-hover: #94a3b8;
}

/* Dark theme variables */
[data-theme="dark"] {
    --primary: #818cf8;
    --primary-dark: #6366f1;
    --primary-light: #c7d2fe;
    --secondary: #1e293b;
    --accent: #34d399;
    --accent-light: #6ee7b7;
    --accent-dark: #10b981;
    --danger: #f87171;
    --danger-dark: #ef4444;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border: #334155;
    --slider-line: #546173;
    --border-light: #475569;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.3), 0 1px 2px -1px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
    
    /* Background colors */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-gradient-start: #0f172a;
    --bg-gradient-end: #1e293b;
    
    /* Card and panel backgrounds */
    --card-bg: #1e293b;
    --panel-bg: #1e293b;
    --header-bg: #334155;
    --secondary-header-bg: #141d30;
    
    /* Input and form elements */
    --input-bg: #334155;
    --input-border: #475569;
    --input-focus: #818cf8;
    
    /* Scrollbar */
    --scrollbar-track: #1e293b;
    --scrollbar-thumb: #475569;
    --scrollbar-thumb-hover: #64748b;
}

/* Theme toggle button styles */
.theme-toggle {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 1000;
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
}

.theme-toggle:hover {
    transform: scale(1.1);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.theme-toggle:hover svg {
    color: var(--primary);
}

/* Fixed Header Styles */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    z-index: 999;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: 8px;
    padding: 4px 8px;
    margin: -4px -8px;
}

.header-logo:hover {
    background-color: var(--hover-bg);
    transform: translateY(-1px);
}

.header-logo:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.logo-icon {
    color: var(--primary);
    transition: all 0.3s ease;
}

.header-logo:hover .logo-icon {
    color: var(--primary-hover);
    transform: scale(1.05);
}

.header-logo:hover .header-title {
    color: var(--primary-hover);
}


.header-title {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.header-subtitle {
    font-size: 0.9rem;
    margin-right: 50px;
    color: var(--text-secondary);
    font-weight: 400;
}

.version-badge {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 2px;
    box-shadow: var(--shadow);
    letter-spacing: 0.5px;
    /* text-transform: uppercase; */
}

/* Footer Styles */
.app-footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    margin-top: 60px;
    box-shadow: 0 -1px 3px 0 rgb(0 0 0 / 0.1);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

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

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

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

.footer-section li {
    margin-bottom: 8px;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
}

.footer-link:hover {
    color: var(--primary);
    transform: translateX(4px);
}

.footer-link.buy-me-coffee {
    color: var(--accent);
    font-weight: 500;
}

.footer-link.buy-me-coffee:hover {
    color: var(--accent-dark);
    transform: translateX(4px) scale(1.05);
}

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

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

/* Legal Pages Styles */
.legal-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 40px;
    position: relative;
}

/* Single column layout for privacy and terms pages */
.legal-page.single-column {
    display: block;
    max-width: 800px;
}

/* Legal pages list styling */
.legal-page.single-column ul {
    margin: 16px 0;
    padding-left: 44px; /* 24px base + 20px extra for legal pages */
}

.legal-page.single-column ol {
    margin: 16px 0;
    padding-left: 44px; /* Same as legal pages ULs */
}

/* Table of Contents */
.table-of-contents {
    position: sticky;
    top: 100px;
    height: fit-content;
    background: var(--panel-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.table-of-contents h3 {
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
}

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

.toc-list li {
    margin-bottom: 8px;
}

.toc-list a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 6px 12px;
    border-radius: 6px;
    display: block;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    outline: none;
}

.toc-list a:focus {
    outline: none;
}

.toc-list a:hover {
    color: var(--primary);
    background: var(--card-bg);
    border-left-color: var(--primary);
    transform: translateX(4px);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.toc-list a.active {
    color: var(--primary);
    background: var(--card-bg);
    border-left-color: var(--primary);
    font-weight: 700;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.toc-list .toc-sub {
    margin-left: 16px;
    margin-top: 4px;
}

.toc-list .toc-sub a {
    font-size: 0.8rem;
    padding: 4px 12px;
    color: var(--text-muted);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    outline: none;
}

.toc-list .toc-sub a:focus {
    outline: none;
}

.toc-list .toc-sub a:hover {
    color: var(--accent);
    border-left-color: var(--accent);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Documentation content area */
.documentation-content {
    min-width: 0; /* Prevents grid overflow */
}

/* Documentation content lists */
.documentation-content ul {
    margin: 16px 0;
    padding-left: 44px; /* 24px base + 20px extra for documentation content */
}

.documentation-content ol {
    margin: 16px 0;
    padding-left: 44px; /* Same as documentation content ULs */
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Section anchors for smooth scrolling */
.section-anchor {
    scroll-margin-top: 120px; /* Account for fixed header */
}

.legal-page h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    text-align: left;
}

.last-updated {
    text-align: left;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 40px;
}

.legal-page section {
    margin-bottom: 32px;
}

.legal-page h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    margin-top: 40px;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 8px;
}

.legal-page h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    margin-top: 40px;
}

.legal-page p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.legal-page ul {
    margin: 16px 0;
}

.legal-page ol {
    margin: 16px 0;
    padding-left: 44px; /* 24px base + 20px extra for ordered lists */
}

.legal-page li {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 8px;
}

.legal-page strong {
    color: var(--warning-text);
    font-weight: 600;
}

.warning-box {
    background: var(--warning-bg, #fff3cd);
    border: 1px solid var(--warning-border, #ffeaa7);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.warning-box strong {
    color: var(--warning-text, #856404) !important;
}

.warning-box h4 {
    color: var(--warning-text, #856404) !important;
}

.warning-box h3 {
    color: var(--warning-text, #856404) !important;
    margin-top: 0;
    margin-bottom: 12px;
}

.warning-box p {
    color: var(--warning-text, #856404) !important;
    margin-bottom: 0;
}

/* Code example styles */
.code-example {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.code-example h6 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
}

.code-example p {
    margin: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.code-example pre {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1rem;
    margin: 0.5rem 0;
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.4;
}

.code-example code {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.2rem 0.4rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
    color: var(--accent-color);
}

/* Editor comparison styles */
.editor-comparison {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
}

.comparison-item {
    flex: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.comparison-item h6 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.comparison-item p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-primary) !important;
}

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

.collaboration-cta {
    background: var(--card-bg);
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.collaboration-cta ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.collaboration-cta li {
    padding: 0.5rem 0;
    font-size: 1.1rem;
}

.collaboration-cta a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.collaboration-cta a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Documentation specific styles */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.feature-card {
    background: var(--panel-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.feature-card h5 {
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

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

.highlight-box {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    border-radius: 12px;
    padding: 24px;
    margin: 24px 0;
    box-shadow: var(--shadow);
}

.highlight-box h4 {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.highlight-box h5 {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-top: 20px;
    margin-bottom: 12px;
}

.highlight-box p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 16px;
}

.highlight-box ul, .highlight-box ol {
    color: rgba(255, 255, 255, 0.9);
}

.highlight-box li {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
}

.highlight-box strong {
    color: white;
    font-weight: 600;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.comparison-table th {
    background: var(--primary);
    color: white;
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}

.comparison-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-table tr:nth-child(even) {
    background: var(--panel-bg);
}

.comparison-table td:first-child {
    font-weight: 600;
    color: var(--text-primary);
}

.comparison-table td:not(:first-child) {
    text-align: center;
}

/* Responsive design for documentation */
@media (max-width: 768px) {
    .legal-page {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px 10px;
    }
    
    .legal-page h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .legal-page h2 {
        font-size: 1.3rem;
        line-height: 1.3;
    }
    
    .legal-page h3 {
        font-size: 1.1rem;
        line-height: 1.3;
    }
    
    .table-of-contents {
        position: static;
        order: -1;
        margin-bottom: 20px;
    }
    
    .table-of-contents h3 {
        font-size: 1rem;
        margin-bottom: 12px;
        line-height: 1.3;
    }
    
    .toc-list a {
        font-size: 0.85rem;
        padding: 8px 12px;
    }
    
    .toc-list .toc-sub a {
        font-size: 0.75rem;
        padding: 6px 12px;
    }
    
    .comparison-table {
        font-size: 0.8rem;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 8px 6px;
    }
}

/* Smooth transitions for theme switching */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    padding-top: 80px; /* Account for fixed header */
}

svg {
    overflow: hidden !important;
    height: auto !important;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 0;
}

.header h1 {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.main-grid {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 24px;
    margin-bottom: 40px;
}

.panel {
    background: var(--panel-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    /* overflow: hidden; */
}

/* Regular panel headers (for SVG Preview, Element Tree, Animation Selector) */
.panel-header {
    background: var(--header-bg);
    padding: 20px;
    border-bottom: 1px solid var(--border);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Create Recipe Button */
.create-recipe-btn {
    margin-left: auto;
    font-size: 0.9rem;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

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

/* Tabbed panel header (for Animation Controls) */
.panel-with-tabs .panel-header {
    background: var(--header-bg);
    padding: 0;
    border-bottom: 1px solid var(--border);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
}

.panel-tabs {
    display: flex;
    width: 100%;
}

.tab-button {
    background: none;
    border: none;
    padding: 20px;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    flex: 1;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.tab-button.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    background: var(--panel-bg);
}

.tab-button .animation-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.tab-button .animation-id {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
    opacity: 0.8;
}

.tab-content {
    display: none;
}

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

.tab-content-header {
    padding: 16px 20px 16px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.animation-id-display {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
    opacity: 0.8;
}

.bounds-control {
    display: none; /* Hidden by default */
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px;
    padding-right: 8px;
    border-radius: var(--radius);
    transition: background-color 0.2s ease;
}

.bounds-control.visible {
    display: flex;
}

.bounds-control:hover {
    background: var(--card-bg);
}

.bounds-control:hover .bounds-label {
    color: var(--primary);
}

.bounds-toggle {
    background: var(--header-bg);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    font-size: 12px;
}

.bounds-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.bounds-toggle:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: scale(1.05);
    box-shadow: var(--shadow);
}

.bounds-toggle.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
    animation: boundsPulse 2s ease-in-out infinite;
}

@keyframes boundsPulse {
    0%, 100% {
        box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
    }
}

.bounds-toggle svg {
    width: 14px;
    height: 14px;
}

.bounds-toggle:hover svg {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

.panel-content {
    height: 100%;
    padding: 20px;
}

.upload-section {
    text-align: center;
    padding: 40px 20px;
}

.file-upload {
    position: relative;
    display: inline-block;
    cursor: pointer;
    margin-bottom: 20px;
}

.file-upload input[type=file] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.upload-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow);
}

.upload-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.upload-button svg {
    width: 20px;
    height: 20px;
}

.svg-viewer:not(.has-content) {
    min-height: 400px;
}

.svg-viewer {
    background: var(--card-bg);
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    /* min-height: 400px; */
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: all 0.2s ease;
    position: relative;
    cursor: default;
}

.svg-viewer.has-content {
    border: 2px solid var(--border);
    background: var(--secondary);
    cursor: crosshair;
    position: relative;
}

.svg-viewer.has-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(90deg, transparent 0%, rgba(99, 102, 241, 0.05) 50%, transparent 100%),
        linear-gradient(0deg, transparent 0%, rgba(99, 102, 241, 0.05) 50%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

.svg-viewer.has-content:hover {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 1px var(--primary-light);
}

.svg-viewer.loading {
    border: 2px solid var(--primary);
    background: linear-gradient(45deg, var(--secondary) 25%, transparent 25%), 
                linear-gradient(-45deg, var(--secondary) 25%, transparent 25%), 
                linear-gradient(45deg, transparent 75%, var(--secondary) 75%), 
                linear-gradient(-45deg, transparent 75%, var(--secondary) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    animation: loading 1s linear infinite;
}

@keyframes loading {
    0% { background-position: 0 0, 0 10px, 10px -10px, -10px 0px; }
    100% { background-position: 20px 20px, 20px 30px, 30px 10px, 10px 20px; }
}

.svg-viewer svg {
    max-width: 100%;
    max-height: 100%;
    position: relative;
}

/* SVG Bounds Visualization Styles */
#svg-bounds {
    pointer-events: none;
    z-index: 1;
    filter: drop-shadow(0 0 2px rgba(148, 163, 184, 0.3));
}

#svg-bounds-group text {
    pointer-events: none;
    z-index: 1;
    filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.8));
}

/* Dark mode improvements for SVG bounds */
[data-theme="dark"] #svg-bounds {
    filter: drop-shadow(0 0 2px rgba(99, 102, 241, 0.5));
}

[data-theme="dark"] #svg-bounds-group text {
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.8));
}

.placeholder-text {
    color: var(--text-muted);
    font-size: 1.1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
    padding: 20px;
}

.placeholder-text:hover {
    color: var(--primary-color);
    background-color: var(--bg-hover);
    transform: translateY(-2px);
}

.placeholder-text svg {
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.placeholder-text:hover svg {
    opacity: 0.8;
}

.controls-section {
    background: var(--bg-tertiary);
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.controls-section.hidden {
    display: none;
}

.controls-placeholder {
    background: var(--bg-tertiary);
    padding: 40px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    border: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 1rem;
    font-style: italic;
}

.controls-placeholder.hidden {
    display: none;
}

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

.control-group:last-child {
    margin-bottom: 0;
}

.control-label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: '▼';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
    font-size: 0.8rem;
    font-weight: bold;
}

select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--input-bg);
    font-size: 1rem;
    color: var(--text-primary);
    cursor: pointer;
    appearance: none;
    transition: all 0.2s ease;
}

/* Dark mode improvements for select dropdowns */
select option {
    background: var(--input-bg);
    color: var(--text-primary);
    padding: 8px 12px;
}

select:focus option:hover,
select:focus option:focus {
    background: var(--primary);
    color: white;
}

select:focus {
    outline: none;
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px rgb(99 102 241 / 0.1);
}

select:disabled {
    background: var(--border-light);
    color: var(--text-muted);
    cursor: not-allowed;
}

.speed-control {
    display: flex;
    align-items: center;
    gap: 16px;
}

.speed-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: var(--slider-line) !important;
    outline: none;
    appearance: none;
}

.speed-slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
}

.speed-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

.speed-display {
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius);
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
    min-width: 60px;
    text-align: center;
}

/* Shape Styling Controls Panel Styles */
.styling-panel {
    margin-top: 16px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--card-bg);
    box-shadow: var(--shadow);
    min-width: 0; /* Allow the panel to shrink below its content size */
}

.styling-panel-header {
    background: var(--secondary-header-bg);
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.styling-controls {
    padding: 20px;
    background: var(--card-bg);
    min-width: 0; /* Allow the controls to shrink below their content size */
}

.unsupported-fill-message {
    margin-top: 12px;
    padding: 8px 12px;
    background: var(--warning-bg, #fff3cd);
    border: 1px solid var(--warning-border, #ffeaa7);
    border-radius: var(--radius);
    color: var(--warning-text, #856404);
    font-size: 0.85rem;
    text-align: center;
    font-style: italic;
}

.color-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
    min-width: 0; /* Allow flex items to shrink below their content size */
}

.color-controls:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.color-picker-wrapper {
    width: 36px;
    height: 32px;
    border-radius: var(--radius);
    position: relative;
    display: inline-block;
}

.color-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    border-radius: var(--radius);
    border: 1px solid #ddd;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.color-indicator.no-fill {
    background: #ffffff;
    background-image: linear-gradient(45deg, transparent 45%, #ff0000 45%, #ff0000 55%, transparent 55%);
}

.color-indicator.unsupported {
    background: #808080;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.color-indicator.unsupported::after {
    content: "?";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: bold;
}

.color-picker {
    width: 36px; /* Slightly reduced from 40px to save space */
    height: 32px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    background: none;
    flex-shrink: 0;
}

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

.color-picker::-webkit-color-swatch {
    border: none;
    border-radius: var(--radius);
}

.opacity-slider {
    flex: 1;
    min-width: 80px; /* Reduced from 120px to give more space for display values */
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, var(--border) 0%, var(--border) 100%);
    outline: none;
    appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.opacity-slider:hover {
    background: linear-gradient(to right, var(--primary-light) 0%, var(--primary-light) 100%);
}

.opacity-slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    transition: all 0.2s ease;
    border: 2px solid var(--card-bg);
}

.opacity-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    background: var(--accent-dark);
}

.opacity-slider::-webkit-slider-thumb:active {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.5);
}

.opacity-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: 2px solid var(--card-bg);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.opacity-display {
    min-width: 70px; /* Increased from 60px to accommodate longer values like "100%" */
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    flex-shrink: 0;
    overflow: hidden; /* Prevent text overflow */
    text-overflow: ellipsis; /* Show ellipsis if text is too long */
    white-space: nowrap; /* Prevent text wrapping */
}

.stroke-width-control {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
    min-width: 0; /* Allow flex items to shrink below their content size */
}

.stroke-width-control:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.stroke-width-slider {
    flex: 1;
    min-width: 80px; /* Reduced from 120px to give more space for display values */
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, var(--border) 0%, var(--border) 100%);
    outline: none;
    appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.stroke-width-slider:hover {
    background: linear-gradient(to right, var(--primary-light) 0%, var(--primary-light) 100%);
}

.stroke-width-slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    transition: all 0.2s ease;
    border: 2px solid var(--card-bg);
}

.stroke-width-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    background: var(--accent-dark);
}

.stroke-width-slider::-webkit-slider-thumb:active {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.5);
}

.stroke-width-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: 2px solid var(--card-bg);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.stroke-width-display {
    min-width: 70px; /* Increased from 60px to accommodate longer values like "2px" */
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    flex-shrink: 0;
    overflow: hidden; /* Prevent text overflow */
    text-overflow: ellipsis; /* Show ellipsis if text is too long */
    white-space: nowrap; /* Prevent text wrapping */
}

/* Demo-specific styles */
.demo-instructions {
    margin-top: 24px;
    padding: 20px;
    background: var(--bg-tertiary);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    color: var(--text-primary);
}

/* Dark mode improvements for file upload */
.file-upload {
    position: relative;
    margin-bottom: 20px;
}

/* Root element message styling */
.root-element-message {
    margin: 20px 0;
    padding: 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
}

.root-message-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.root-message-icon {
    font-size: 2rem;
    opacity: 0.7;
}

.root-message-text {
    text-align: left;
}

.root-message-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.root-message-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ClipPath Element Message Styles */
.clippath-element-message {
    margin: 20px 0;
    padding: 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
}

.clippath-message-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.clippath-message-icon {
    font-size: 2rem;
    opacity: 0.7;
}

.clippath-message-text {
    text-align: left;
}

.clippath-message-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.clippath-message-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.file-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.upload-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 16px 24px;
    background: var(--card-bg);
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.upload-button:hover {
    border-color: var(--primary);
    background: var(--bg-tertiary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.upload-button svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

/* Dark mode improvements for status messages */
.status-message {
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: var(--radius);
    margin: 16px 0;
    font-size: 0.9rem;
}

.status-message.success {
    border-color: var(--accent);
    background: rgba(16, 185, 129, 0.1);
}

.status-message.error {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.status-message.info {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.demo-instructions h3 {
    margin-bottom: 12px;
    color: var(--text-primary);
    font-size: 1rem;
}

.demo-instructions ol {
    padding-left: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.demo-instructions li {
    margin-bottom: 8px;
}

.info-section {
    margin-bottom: 24px;
}

.info-section h3 {
    margin-bottom: 12px;
    color: var(--text-primary);
    font-size: 1rem;
}

.info-section p, .info-section ul {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.info-section ul {
    padding-left: 20px;
}

.info-section li {
    margin-bottom: 6px;
}

/* Parameter Controls Panel Styles */
.param-panel {
    margin-top: 16px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--card-bg);
    box-shadow: var(--shadow);
}

.param-panel-header {
    background: var(--secondary-header-bg);
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

#applied-param-controls {
    padding: 16px 0 0 0 !important;
    border-top: 1px solid var(--border);
    background: var(--card-bg);
}

.param-controls {
    padding: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    background: var(--card-bg);
    
}

.param-control {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
    flex-wrap: wrap;
}

.param-control:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.param-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: capitalize;
    letter-spacing: 0.025em;
    min-width: 80px;
    flex-shrink: 0;
}

.param-slider {
    flex: 1;
    min-width: 120px;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, var(--border) 0%, var(--border) 100%);
    outline: none;
    appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.param-slider:hover {
    background: linear-gradient(to right, var(--primary-light) 0%, var(--primary-light) 100%);
}

.param-slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    transition: all 0.2s ease;
    border: 2px solid var(--card-bg);
}

.param-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    background: var(--accent-dark);
}

.param-slider::-webkit-slider-thumb:active {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.5);
}

/* Firefox slider styling */
.param-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: 2px solid var(--card-bg);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    transition: all 0.2s ease;
}

.param-slider::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    background: var(--accent-dark);
}

.param-slider::-moz-range-track {
    height: 6px;
    border-radius: 3px;
    background: var(--border);
    border: none;
}

/* Edge/IE slider styling */
.param-slider::-ms-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: 2px solid var(--card-bg);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.param-slider::-ms-track {
    height: 6px;
    border-radius: 3px;
    background: var(--border);
    border: none;
    color: transparent;
}

.param-dropdown {
    flex: 1;
    min-width: 120px;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.param-dropdown:hover {
    border-color: var(--primary-light);
}

.param-dropdown:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-light);
}

.param-value {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: white;
    padding: 6px 10px;
    border-radius: var(--radius);
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    min-width: 50px;
    max-width: 80px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    user-select: none;
    flex-shrink: 0;
}

/* Animation for parameter panel appearance */
.param-panel {
    animation: slideDown 0.3s ease-out;
}

/* Applied Animation Editor Panel - Now using tab system */

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

.applied-animation-controls {
    padding: 20px;
}

.applied-animation-controls .control-group {
    margin-bottom: 20px;
}

.applied-animation-controls .control-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.applied-animation-controls .speed-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.applied-animation-controls .speed-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: var(--border);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.applied-animation-controls .speed-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.applied-animation-controls .speed-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.applied-animation-controls .speed-display {
    font-weight: 500;
    /* color: var(--accent); */
    min-width: 40px;
    text-align: center;
    font-size: 0.9rem;
}

.applied-animation-controls .param-control {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 8px 0;
}

.applied-animation-controls .param-label {
    min-width: 100px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.applied-animation-controls .param-slider {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: var(--border);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.applied-animation-controls .param-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.applied-animation-controls .param-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.applied-animation-controls .param-value {
    min-width: 56px;
    text-align: center;
    font-weight: 500;
    /* color: var(--accent); */
    font-size: 0.85rem;
}

.applied-animation-actions {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
    justify-content: flex-start;
}

.applied-animation-actions .btn {
    padding: 10px 16px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-danger {
    background: var(--danger);
    color: white;
    border: 1px solid var(--danger);
}

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

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .param-controls {
        padding: 16px;
    }
    
    .param-control {
        gap: 10px;
        padding: 10px 0;
        flex-direction: column;
        align-items: stretch;
    }
    
    .param-label {
        font-size: 0.85rem;
        min-width: auto;
        margin-bottom: 4px;
    }
    
    .param-slider {
        min-width: 100px;
        margin: 4px 0;
    }
    
    .param-value {
        font-size: 0.8rem;
        min-width: 45px;
        max-width: 60px;
        padding: 5px 8px;
        align-self: center;
    }
}

@media (max-width: 480px) {
    .param-controls {
        padding: 12px;
    }
    
    .param-control {
        gap: 8px;
        padding: 8px 0;
    }
    
    .param-label {
        font-size: 0.8rem;
    }
    
    .param-slider {
        min-width: 80px;
    }
    
    .param-value {
        font-size: 0.75rem;
        min-width: 40px;
        max-width: 50px;
        padding: 4px 6px;
    }
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

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

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

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

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-success {
    background: var(--accent);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

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

.btn-danger:hover:not(:disabled) {
    background: var(--danger-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover:not(:disabled) {
    background: var(--border-light);
    transform: translateY(-1px);
}

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

.btn:disabled::before {
    display: none;
}

.btn-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

.btn-group-left {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-group-right {
    display: flex;
    gap: 12px;
    align-items: center;
}

.element-tree {
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 100%;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    padding-right: 8px; /* Accommodate translateX(4px) transform */
}

.element-tree summary,
.element-tree div {
    padding: 8px 12px;
    cursor: pointer;
    border-radius: var(--radius);
    transition: all 0.2s ease;
    margin: 2px 0;
    position: relative;
    display: flex;
    align-items: center;
}

.element-tree summary:hover,
.element-tree div:hover {
    background: var(--border-light);
    transform: translateX(4px);
}

.element-tree .selected {
    background: var(--primary);
    color: white;
    transform: translateX(4px);
}

.element-tree .selected .tree-item-icon {
    filter: brightness(0) invert(1);
}

.element-tree details {
    margin-left: 0;
}

.element-tree details[open] summary {
    background: var(--border-light);
}

/* Tree item structure */
.tree-item-label {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.tree-item-icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

/* Make rectangle icon bigger */
.rect-element .tree-item-icon {
    font-size: 1.2rem;
}

/* Alternative approach for rectangle icon size */
.element-tree summary[data-element-id-full] .tree-item-icon,
.element-tree div[data-element-id-full] .tree-item-icon {
    font-size: 1.1rem;
}

.tree-item-text {
    flex: 1;
    min-width: 0;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
}

.element-tree summary:hover .tree-item-icon,
.element-tree div:hover .tree-item-icon {
    opacity: 1;
}

.element-tree .selected .tree-item-icon {
    filter: brightness(0) invert(1);
    opacity: 1;
}

/* Fix text visibility in light mode when selected */
.element-tree .selected .tree-item-text {
    color: white !important;
    font-weight: 500;
}

/* Custom tooltip for element information */
.element-tree summary[data-element-id-full],
.element-tree div[data-element-id-full] {
    position: relative;
}

.element-tree summary[data-element-id-full]::after,
.element-tree div[data-element-id-full]::after {
    content: attr(data-element-id-full);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: var(--text-primary);
    color: var(--card-bg);
    padding: 4px 8px;
    border-radius: var(--radius);
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    margin-left: 8px;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.element-tree summary[data-element-id-full]:hover::after,
.element-tree div[data-element-id-full]:hover::after {
    opacity: 1;
}

/* Indentation using CSS instead of inline styles */
.element-tree summary[data-depth="1"],
.element-tree div[data-depth="1"] {
    margin-left: 28px;
    padding-left: 12px;
    position: relative;
}

.element-tree summary[data-depth="2"],
.element-tree div[data-depth="2"] {
    margin-left: 44px;
    padding-left: 12px;
    position: relative;
}

.element-tree summary[data-depth="3"],
.element-tree div[data-depth="3"] {
    margin-left: 60px;
    padding-left: 12px;
    position: relative;
}

.element-tree summary[data-depth="4"],
.element-tree div[data-depth="4"] {
    margin-left: 76px;
    padding-left: 12px;
    position: relative;
}

.element-tree summary[data-depth="5"],
.element-tree div[data-depth="5"] {
    margin-left: 92px;
    padding-left: 12px;
    position: relative;
}

/* Improve border positioning for better visual flow */
.element-tree summary[data-depth="1"]::before,
.element-tree div[data-depth="1"]::before,
.element-tree summary[data-depth="2"]::before,
.element-tree div[data-depth="2"]::before,
.element-tree summary[data-depth="3"]::before,
.element-tree div[data-depth="3"]::before,
.element-tree summary[data-depth="4"]::before,
.element-tree div[data-depth="4"]::before,
.element-tree summary[data-depth="5"]::before,
.element-tree div[data-depth="5"]::before {
    content: '';
    position: absolute;
    left: -1px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--border-light);
    opacity: 0.6;
}

/* Nested details indentation */
.element-tree details details {
    margin-left: 0;
}

.element-tree details details summary,
.element-tree details details div {
    padding-left: 16px;
}

/* Better visual hierarchy for groups vs shapes */
.element-tree summary[data-depth="0"] {
    font-weight: 600;
    color: var(--text-primary);
}

.element-tree summary[data-depth="1"],
.element-tree div[data-depth="1"] {
    font-weight: 500;
}

.element-tree summary[data-depth="2"],
.element-tree div[data-depth="2"],
.element-tree summary[data-depth="3"],
.element-tree div[data-depth="3"],
.element-tree summary[data-depth="4"],
.element-tree div[data-depth="4"],
.element-tree summary[data-depth="5"],
.element-tree div[data-depth="5"] {
    font-weight: 400;
    color: var(--text-secondary);
}

.animation-list {
    max-height: 300px;
    overflow-y: auto;
}

#animation-type {
    background: var(--panel-bg);
}

.animation-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--secondary);
    border-radius: var(--radius);
    margin-bottom: 8px;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    cursor: pointer;
}

.animation-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    background: var(--accent-light);
}

.animation-item.selected {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.animation-item.selected .animation-name,
.animation-item.selected .animation-speed {
    color: white;
}

.animation-selector {
    position: relative;
}

.animation-selector::after {
    content: '✏️';
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.2s ease;
    font-size: 14px;
}

.animation-selector:hover::after {
    opacity: 1;
}

.animation-item.selected::after {
    opacity: 1;
    content: '✓';
}

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

.animation-info {
    flex: 1;
    font-size: 0.9rem;
}

.animation-name {
    font-weight: 500;
    color: var(--text-primary);
}

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

.animation-speed-slider {
    width: 80px;
    height: 4px;
    border-radius: 2px;
    background: var(--border);
    outline: none;
    appearance: none;
}

.animation-speed-slider::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: var(--shadow);
}

.remove-btn {
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.remove-btn:hover {
    background: var(--danger-dark);
    transform: scale(1.1);
}

.status-bar {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    padding: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.status-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    animation: statusBar 3s ease-in-out infinite;
}

@keyframes statusBar {
    0%, 100% { left: -100%; }
    50% { left: 100%; }
}

.status-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

.tooltip {
    position: absolute;
    background: var(--text-primary);
    color: white;
    text-align: center;
    padding: 8px 12px;
    border-radius: var(--radius);
    visibility: hidden;
    font-size: 0.8rem;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.2s ease;
}

.tooltip.visible {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

/* Special styling for clear selection tooltip */
.clear-selection-tooltip {
    background: var(--accent) !important;
    color: white !important;
    font-weight: 600;
    border: 2px solid var(--accent-dark);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.hover-effect {
    fill: var(--primary-light) !important;
    pointer-events: visiblePainted;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Special hover effect for image elements using filters */
.hover-effect[data-tag="image"] {
    fill: none !important; /* Reset fill for images */
    /* filter: brightness(0) saturate(100%) invert(100%) sepia(100%); */
    filter: brightness(0.2) saturate(100%) invert(75%) sepia(74%) saturate(2419%) hue-rotate(194deg) brightness(107%) contrast(98%);

    pointer-events: visiblePainted;
    cursor: pointer !important;
    transition: all 0.2s ease;
}

g {
    pointer-events: none;
}

g * {
    pointer-events: visiblePainted;
}

svg {
    overflow: visible;
}

#selection-box {
    animation: dash 2s linear infinite;
}

@keyframes dash {
    to {
        stroke-dashoffset: 20;
    }
}

/* Loading spinner for buttons */
.btn.loading {
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Scrollbar styling */
.element-tree::-webkit-scrollbar,
.animation-list::-webkit-scrollbar,
::-webkit-scrollbar {
    width: 8px;
}

.element-tree::-webkit-scrollbar-track,
.animation-list::-webkit-scrollbar-track,
::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: 4px;
}

.element-tree::-webkit-scrollbar-thumb,
.animation-list::-webkit-scrollbar-thumb,
::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 4px;
}

.element-tree::-webkit-scrollbar-thumb:hover,
.animation-list::-webkit-scrollbar-thumb:hover,
::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

/* Dark mode improvements for form elements */
input[type="color"] {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

input[type="color"]:hover {
    border-color: var(--input-focus);
    transform: scale(1.05);
}

input[type="range"] {
    background: var(--border);
    border-radius: 3px;
    outline: none;
    transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb {
    background: var(--primary);
    border: 2px solid var(--card-bg);
    box-shadow: var(--shadow);
}

input[type="range"]::-moz-range-thumb {
    background: var(--primary);
    border: 2px solid var(--card-bg);
    box-shadow: var(--shadow);
}

/* Dark mode improvements for notifications */
.notification {
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
}

/* Animation count message styling */
.animation-count-message {
    margin-bottom: 16px;
    padding: 12px 16px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius);
    font-size: 0.9rem;
    animation: slideInDown 0.3s ease-out;
    cursor: pointer;
    transition: all 0.2s ease;
}

.animation-count-message:hover {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
}

.animation-count-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.count-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.count-text {
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Animation Names List */
.animation-names-list {
    margin-bottom: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.animation-names-list .animation-name-link {
    color: var(--text-primary);
    text-decoration: underline;
    text-decoration-color: rgba(99, 102, 241, 0.4);
    text-underline-offset: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.animation-names-list .animation-name-link:hover {
    color: var(--primary);
    text-decoration-color: var(--primary);
}

/* Dark theme adjustments for animation names list */
[data-theme="dark"] .animation-names-list .animation-name-link {
    text-decoration-color: rgba(129, 140, 248, 0.4);
}

[data-theme="dark"] .animation-names-list .animation-name-link:hover {
    color: var(--primary-light);
    text-decoration-color: var(--primary-light);
}

/* Dark theme adjustments for animation count message */
[data-theme="dark"] .animation-count-message {
    background: rgba(129, 140, 248, 0.08);
    border-color: rgba(129, 140, 248, 0.2);
}

/* Animation for slide in effect */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dark mode improvements for tooltips */
.tooltip {
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
}

/* Dark mode improvements for modals */
.modal {
    background: var(--card-bg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--border);
}

/* Dark mode improvements for status bar */
.status-bar {
    background: var(--header-bg);
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
}

/* Dark mode improvements for animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

/* Dark mode improvements for focus states */
*:focus {
    outline: 2px solid var(--input-focus);
    outline-offset: 2px;
}

/* Dark mode improvements for selection */
::selection {
    background: var(--primary);
    color: white;
}

/* Dark mode improvements for placeholder text */
::placeholder {
    color: var(--text-muted);
    opacity: 1;
}

/* Dark mode improvements for disabled states */
*:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Dark mode improvements for loading states */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: loading 1.5s infinite;
}

/* Dark mode improvements for code blocks and monospace text */
code, pre, .monospace {
    font-family: 'JetBrains Mono', monospace;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2px 6px;
    color: var(--text-primary);
}

/* Dark mode improvements for links */
a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* Dark mode improvements for tables */
table {
    border-collapse: collapse;
    width: 100%;
    margin: 16px 0;
}

th, td {
    border: 1px solid var(--border);
    padding: 12px;
    text-align: left;
}

th {
    background: var(--header-bg);
    color: var(--text-primary);
    font-weight: 600;
}

td {
    background: var(--card-bg);
    color: var(--text-primary);
}

/* Dark mode improvements for blockquotes */
blockquote {
    border-left: 4px solid var(--primary);
    margin: 16px 0;
    padding: 12px 20px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-style: italic;
}

@media (max-width: 1024px) {
    .main-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 16px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .btn-group {
        flex-direction: column;
        gap: 16px;
    }
    
    .btn-group-left,
    .btn-group-right {
        justify-content: center;
        width: 100%;
    }
    
    .btn-group-left {
        order: 1;
    }
    
    .btn-group-right {
        order: 2;
    }
    
    .upload-button {
        padding: 14px 24px;
        font-size: 0.9rem;
    }
    
    .theme-toggle {
        top: 100px;
        right: 16px;
        width: 44px;
        height: 44px;
    }
    
    .theme-toggle svg {
        width: 20px;
        height: 20px;
    }
    
    /* Header responsive adjustments */
    .header-content {
        padding: 12px 16px;
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .header-title {
        font-size: 1.3rem;
        line-height: 1.2;
    }
    
    .header-subtitle {
        font-size: 0.8rem;
        line-height: 1.3;
        display: none; /* Hide tagline on mobile */
    }
    
    body {
        padding-top: 120px; /* Adjust for taller mobile header */
    }
    
    /* Footer responsive adjustments */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 30px 16px 20px;
    }
    
    .footer-section {
        text-align: center;
    }
    
    /* Adjust styling panel for small screens */
    .styling-controls {
        padding: 16px;
    }
    
    .color-controls {
        gap: 8px; /* Reduce gap between elements */
    }
    
    .opacity-slider,
    .stroke-width-slider {
        min-width: 60px; /* Further reduce minimum width on small screens */
    }
    
    .opacity-display,
    .stroke-width-display {
        min-width: 60px; /* Reduce display width on small screens */
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .header-content {
        padding: 10px 12px;
    }
    
    .header-title {
        font-size: 1.1rem;
        line-height: 1.2;
    }
    
    .header-subtitle {
        font-size: 0.75rem;
        line-height: 1.3;
        display: none; /* Hide tagline on mobile */
    }
    
    .legal-page h1 {
        font-size: 1.8rem;
        line-height: 1.2;
    }
    
    .legal-page h2 {
        font-size: 1.2rem;
        line-height: 1.3;
    }
    
    .legal-page h3 {
        font-size: 1rem;
        line-height: 1.3;
    }
    
    .footer-content {
        padding: 20px 12px 16px;
        gap: 20px;
    }
    
    .footer-section h3 {
        font-size: 1.1rem;
    }
    
    .footer-section h4 {
        font-size: 0.9rem;
    }
}

/* Dark mode improvements for high contrast mode */
@media (prefers-contrast: high) {
    :root {
        --border: #000000;
        --text-primary: #000000;
        --text-secondary: #333333;
    }
    
    [data-theme="dark"] {
        --border: #ffffff;
        --text-primary: #ffffff;
        --text-secondary: #cccccc;
    }
}

/* Dark mode improvements for reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dropdown Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.dropdown-menu.open {
    min-width: 230px;
}

#export-lottie-item:disabled {
    cursor: not-allowed;
}

#export-lottie-item .dropdown-item-text {
    color: var(--text-muted);
}

.dropdown-toggle:hover {
    background: var(--border-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.dropdown-toggle::after {
    content: '▼';
    font-size: 0.8rem;
    transition: transform 0.2s ease;
    margin-left: 4px;
}

.dropdown-toggle.open::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    margin-top: 4px;
    overflow: hidden;
}

.dropdown-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    font-size: 0.9rem;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: var(--bg-tertiary);
    color: var(--primary);
    transform: translateX(4px);
}

.dropdown-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.dropdown-item:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    color: var(--text-muted);
}

.dropdown-item:disabled:hover {
    background: transparent;
    transform: none;
    color: var(--text-muted);
}

/* Soon badge for disabled items */
.soon-badge {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: auto;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(255, 107, 107, 0.3);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 1px 3px rgba(255, 107, 107, 0.3);
    }
    50% {
        box-shadow: 0 2px 8px rgba(255, 107, 107, 0.5);
    }
}

/* Dark theme adjustment for soon badge */
[data-theme="dark"] .soon-badge {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    box-shadow: 0 1px 3px rgba(255, 107, 107, 0.4);
}

[data-theme="dark"] .soon-badge {
    animation: pulse-glow-dark 2s ease-in-out infinite;
}

@keyframes pulse-glow-dark {
    0%, 100% {
        box-shadow: 0 1px 3px rgba(255, 107, 107, 0.4);
    }
    50% {
        box-shadow: 0 2px 8px rgba(255, 107, 107, 0.6);
    }
}

/* Disabled dropdown toggle */
.dropdown.disabled .dropdown-toggle {
    opacity: 0.6;
    cursor: not-allowed;
    background: var(--border-light);
    color: var(--text-muted);
    border-color: var(--border);
}

.dropdown.disabled .dropdown-toggle:hover {
    background: var(--border-light);
    transform: none;
    box-shadow: none;
}

.dropdown.disabled .dropdown-toggle::after {
    color: var(--text-muted);
}

/* Special styling for open dropdown */
.dropdown.open .dropdown-toggle {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.dropdown.open .dropdown-toggle:hover {
    background: var(--primary-dark);
}

/* Special styling for save dropdown - use same color as open dropdown */
.dropdown.save .dropdown-toggle {
    background: var(--secondary);
    color: var(--text-primary);
    border-color: var(--border);
}

.dropdown.save .dropdown-toggle:hover {
    background: var(--border-light);
}

.dropdown.save .dropdown-toggle::after {
    color: var(--text-primary);
}

/* Animation for dropdown items */
.dropdown-item {
    animation: slideInFromTop 0.2s ease-out;
}

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

/* Stagger animation for multiple items */
.dropdown-item:nth-child(1) { animation-delay: 0.05s; }
.dropdown-item:nth-child(2) { animation-delay: 0.1s; }
.dropdown-item:nth-child(3) { animation-delay: 0.15s; }
.dropdown-item:nth-child(4) { animation-delay: 0.2s; }

/* Preview Badge Styles */
.preview-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 998;
    background: var(--warning-bg, #fef3c7);
    border: 1px solid var(--warning-border, #f59e0b);
    border-radius: var(--radius);
    padding: 8px 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    animation: slideInFromRight 0.3s ease-out;
}

.preview-badge.hidden {
    display: none;
}

.preview-badge-content {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 500;
}

.preview-warning {
    color: var(--warning-text, #92400e);
    white-space: nowrap;
}

.preview-badge .btn {
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.preview-badge .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Dark mode styles for preview badge */
[data-theme="dark"] .preview-badge {
    background: var(--warning-bg-dark, #451a03);
    border-color: var(--warning-border-dark, #d97706);
}

[data-theme="dark"] .preview-warning {
    color: var(--warning-text-dark, #fbbf24);
}

/* Animation for badge appearance */
@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Ensure panel-content has relative positioning for absolute badge */
.panel-content {
    position: relative;
}

/* SVG Tools Gallery Styles */
.tools-gallery {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 60px 0;
}

.gallery-header {
    text-align: center;
    margin-bottom: 50px;
}

.gallery-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.gallery-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Filter Bar Styles */
.filter-bar {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 40px;
    box-shadow: var(--shadow);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.search-container {
    margin-bottom: 20px;
}

.search-input-wrapper {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 12px 16px 12px 48px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

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

.clear-search {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    opacity: 0;
    pointer-events: none;
}

.clear-search.visible {
    opacity: 1;
    pointer-events: auto;
}

.clear-search:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.tag-filters {
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

.tag-filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.tag-filters-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}


.clear-tags-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.clear-tags-btn:hover {
    color: var(--primary);
    background: var(--bg-tertiary);
}

.tag-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-filter-btn {
    padding: 8px 16px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: lowercase;
}

.tag-filter-btn:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
    border-color: var(--primary-light);
    transform: translateY(-1px);
}

.tag-filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.tag-filter-btn.active:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
}

.favorites-tag-btn {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

.favorites-tag-btn:hover {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fca5a5;
}

.favorites-tag-btn.active {
    background: #dc2626;
    color: white;
    border-color: #dc2626;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.favorites-tag-btn.active:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    transform: translateY(-1px);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, 377px);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    justify-content: start;
}

.tool-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    max-width: 377px;
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(16, 185, 129, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

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

.tool-image-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.tool-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-bottom: 1px solid var(--border);
    transition: transform 0.3s ease;
}

.tool-card:hover .tool-image {
    transform: scale(1.05);
}

.favorite-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
    z-index: 10;
}

.favorite-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.favorite-btn.favorited {
    background: #ef4444;
    color: white;
}

.favorite-btn.favorited:hover {
    background: #dc2626;
}

.heart-icon {
    transition: all 0.2s ease;
}

.favorite-btn.favorited .heart-icon {
    fill: currentColor;
}

.tool-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

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

.tool-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
    font-size: 0.95rem;
}

.tool-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    margin-top: auto;
}

.tool-link:hover {
    color: var(--primary-dark);
    transform: translateX(4px);
}

.tool-link svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.tool-link:hover svg {
    transform: translateX(2px);
}

.tool-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.tool-tag {
    display: inline-block;
    padding: 4px 8px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: lowercase;
    transition: all 0.2s ease;
    cursor: default;
}

.tool-tag:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-1px);
}

.tool-tag-more {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    cursor: help;
    position: relative;
}

.tool-tag-more:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
}

.tool-tag-more:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    background: var(--bg-dark);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: var(--radius);
    font-size: 0.75rem;
    white-space: nowrap;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    margin-left: 8px;
    border: 1px solid var(--border);
}

.tool-tag-more:hover::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    border: 4px solid transparent;
    border-right-color: var(--bg-dark);
    z-index: 1000;
    margin-left: 4px;
}

/* Loading state for tools grid */
.tools-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

.tools-grid.loading::after {
    content: 'Loading tools...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-secondary);
    font-size: 1.1rem;
    z-index: 10;
}

/* Error state for tools grid */
.tools-grid.error {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.tools-grid.error::before {
    content: '⚠️';
    display: block;
    font-size: 2rem;
    margin-bottom: 16px;
}

/* Responsive adjustments for tools gallery */
@media (max-width: 1024px) {
    .tools-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 24px;
    }
    
    .gallery-header h2 {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .tools-gallery {
        padding: 40px 0;
    }
    
    .gallery-header {
        margin-bottom: 40px;
    }
    
    .gallery-header h2 {
        font-size: 2rem;
    }
    
    .gallery-header p {
        font-size: 1rem;
    }
    
    .filter-bar {
        padding: 20px;
        margin-bottom: 30px;
    }
    
    .search-input-wrapper {
        max-width: 100%;
    }
    
    .tag-filters-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .tag-buttons {
        gap: 6px;
    }
    
    .tag-filter-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 400px;
    }
    
    .tool-content {
        padding: 20px;
    }
    
    .tool-name {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .tools-gallery {
        padding: 30px 0;
    }
    
    .gallery-header {
        margin-bottom: 30px;
    }
    
    .gallery-header h2 {
        font-size: 1.8rem;
    }
    
    .gallery-header p {
        font-size: 0.95rem;
    }
    
    .tool-content {
        padding: 16px;
    }
    
    .tool-name {
        font-size: 1.1rem;
    }
    
    .tool-description {
        font-size: 0.9rem;
    }
}

/* Articles Section Styles */
.articles-section {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 60px 0;
}

.articles-header {
    text-align: center;
    margin-bottom: 50px;
}

.articles-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.articles-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.articles-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.article-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: row;
    text-decoration: none;
    color: inherit;
    min-height: 120px;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
    text-decoration: none;
    color: inherit;
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(16, 185, 129, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

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

.article-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.article-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.3;
}

.article-author {
    color: var(--primary);
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.article-description {
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
    font-size: 0.9rem;
    flex: 1;
}

.article-url {
    color: var(--text-tertiary);
    font-size: 0.8rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    background: var(--bg-tertiary);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    word-break: break-all;
    margin-top: auto;
    align-self: flex-start;
}

.read-more-badge {
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    margin-left: 4px;
    font-family: inherit;
}

.article-card:hover .article-url {
    background: var(--hover-bg);
    border-color: var(--primary-light);
}

.articles-empty,
.articles-error {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    grid-column: 1 / -1;
}

.empty-icon,
.error-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

.articles-empty h3,
.articles-error h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.articles-empty p,
.articles-error p {
    font-size: 1rem;
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto;
}

/* Responsive adjustments for articles section */
@media (max-width: 1024px) {
    .articles-grid {
        max-width: 700px;
    }
    
    .articles-header h2 {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .articles-section {
        padding: 40px 0;
    }
    
    .articles-header {
        margin-bottom: 40px;
    }
    
    .articles-header h2 {
        font-size: 2rem;
    }
    
    .articles-header p {
        font-size: 1rem;
    }
    
    .articles-grid {
        max-width: 600px;
        gap: 16px;
    }
    
    .article-card {
        min-height: 100px;
    }
    
    .article-content {
        padding: 16px;
    }
    
    .article-title {
        font-size: 1.1rem;
    }
    
    .article-description {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .articles-section {
        padding: 30px 0;
    }
    
    .articles-header {
        margin-bottom: 30px;
    }
    
    .articles-header h2 {
        font-size: 1.8rem;
    }
    
    .articles-header p {
        font-size: 0.95rem;
    }
    
    .articles-grid {
        max-width: 100%;
        padding: 0 16px;
    }
    
    .article-card {
        min-height: 90px;
    }
    
    .article-content {
        padding: 14px;
    }
    
    .article-title {
        font-size: 1rem;
    }
    
    .article-description {
        font-size: 0.8rem;
    }
    
    .article-author {
        font-size: 0.85rem;
    }
    
    .article-url {
        font-size: 0.75rem;
    }
}

/* Hamburger Menu Styles */
.hamburger-menu {
    position: fixed;
    top: 14px;
    right: 20px;
    z-index: 999;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    width: 40px;
    height: 40px;
    justify-content: center;
    align-items: center;
}

.hamburger-menu:hover {
    background: var(--hover-bg);
    transform: scale(1.05);
}

.hamburger-menu.active {
    background: var(--primary);
}

.hamburger-line {
    width: 18px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Navigation Overlay */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.nav-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 320px;
    height: 100%;
    background: var(--card-bg);
    border-left: 1px solid var(--border);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.nav-overlay.active .nav-content {
    transform: translateX(0);
}

.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}

.nav-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
}

.nav-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

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

.nav-menu {
    padding: 20px;
}

.nav-section {
    margin-bottom: 30px;
}

.nav-section:last-child {
    margin-bottom: 0;
}

.nav-section h4 {
    margin: 0 0 15px 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.nav-section ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-section li {
    margin-bottom: 8px;
}

.nav-section li:last-child {
    margin-bottom: 0;
}

.nav-link {
    display: block;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-link:hover {
    background: var(--hover-bg);
    color: var(--primary);
    transform: translateX(4px);
}

.nav-link.scroll-link {
    position: relative;
}

.nav-link.scroll-link::after {
    content: '↗';
    position: absolute;
    right: 16px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.nav-link.scroll-link:hover::after {
    opacity: 1;
}

/* Dark theme adjustments */
[data-theme="dark"] .nav-overlay {
    background: rgba(0, 0, 0, 0.7);
}

[data-theme="dark"] .nav-content {
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .hamburger-menu {
        top: 8px;
        right: 15px;
        width: 36px;
        height: 36px;
    }
    
    .nav-content {
        width: 280px;
    }
    
    .nav-header {
        padding: 15px;
    }
    
    .nav-menu {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .nav-content {
        width: 100%;
        max-width: 300px;
    }
}

/* Recipe Overlay Styles */
.recipe-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
}

.recipe-overlay.hidden {
    display: none;
}

.recipe-modal {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    border: 1px solid var(--border);
}

.recipe-modal-header {
    background: var(--header-bg);
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.recipe-modal-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
}

.recipe-close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.recipe-close-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.recipe-modal-content {
    padding: 20px;
    max-height: calc(80vh - 80px);
    overflow-y: auto;
}

.recipe-form {
    margin-bottom: 30px;
}

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

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

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--input-border);
    border-radius: var(--radius);
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-input:disabled {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.6;
}

.form-error {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: 6px;
}

.form-error.hidden {
    display: none;
}

.form-error .override-link a {
    color: var(--primary);
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.8rem;
    margin-left: 4px;
}

.form-error .override-link a:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

.recipe-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.recipe-list-section {
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

.recipe-list-section h4 {
    margin: 0 0 15px 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.recipe-list {
    max-height: 200px;
    overflow-y: auto;
}

.recipe-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.recipe-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-light);
}

.recipe-item-info {
    flex: 1;
}

.recipe-item-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.recipe-item-details {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.recipe-item-actions {
    display: flex;
    gap: 8px;
}

.recipe-item-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius);
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.recipe-item-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.recipe-item-btn.delete:hover {
    background: var(--danger);
    color: white;
}

.recipe-placeholder {
    text-align: center;
    color: var(--text-muted);
    padding: 20px;
    font-style: italic;
}

/* Recipe selector dropdown */
#recipe-selector {
    background: var(--panel-bg);
    font-size: 0.95rem;
}

#recipe-selector option {
    padding: 8px;
}

/* Recipe manage link */
.recipe-manage-link {
    margin-top: 8px;
    text-align: right;
}

.manage-recipes-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

.manage-recipes-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* Rails Overlay Styles */
.rails-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
}

.rails-overlay.hidden {
    display: none;
}

.rails-modal {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    border: 1px solid var(--border);
}

.rails-modal-header {
    background: var(--header-bg);
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rails-modal-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
}

.rails-close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.rails-close-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.rails-modal-content {
    padding: 20px;
    max-height: calc(80vh - 80px);
    overflow-y: auto;
}

.rails-form {
    margin-bottom: 30px;
}

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

.rails-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.rails-list-section {
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

.rails-list-section h4 {
    margin: 0 0 15px 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.rails-list {
    max-height: 200px;
    overflow-y: auto;
}

.rails-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.rails-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-light);
}

.rails-item-info {
    flex: 1;
}

.rails-item-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.rails-item-details {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.rails-item-actions {
    display: flex;
    gap: 8px;
}

.rails-item-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.rails-item-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.rails-item-btn.delete:hover {
    background: var(--danger);
    color: white;
}

.rails-placeholder {
    text-align: center;
    color: var(--text-muted);
    padding: 20px;
    font-style: italic;
}

/* ClipPath Warning Styles */
.clippath-warning {
    background: var(--warning-bg, #fff3cd);
    border: 1px solid var(--warning-border, #ffeaa7);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin: 12px 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow: var(--shadow-sm);
}

.warning-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.warning-content {
    flex: 1;
}

.warning-title {
    font-weight: 600;
    color: var(--warning-text, #856404);
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.warning-text {
    color: var(--warning-text, #856404);
    font-size: 0.85rem;
    line-height: 1.4;
}

/* ClipPath Element Styles in Treeview */
.clippath-element {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.1) 0%, transparent 100%);
    border-left: 3px solid var(--primary);
    border-radius: 0 var(--radius) var(--radius) 0;
    opacity: 0.7;
    cursor: default;
}

.clippath-element:hover {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.15) 0%, transparent 100%);
}

.clippath-element .tree-item-text {
    color: var(--primary);
    font-weight: 600;
}

.clippath-element .tree-item-icon {
    color: var(--primary);
}

/* .clippath-element::after {
    content: " (Not selectable)";
    font-size: 0.75rem;
    color: var(--muted-foreground);
    font-weight: normal;
    margin-left: 0.5rem;
} */

/* Named Destinations Styles */
.named-destinations-section {
    margin-top: 16px;
    padding: 16px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.named-destinations-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.named-destinations-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 32px;
}

.named-destinations-empty {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.9rem;
    padding: 8px 0;
}

.named-destination-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: var(--primary);
    color: white;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    max-width: 200px;
    min-width: 0;
}

.named-destination-tag:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.destination-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.destination-edit-btn,
.destination-delete-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.destination-edit-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.destination-delete-btn:hover {
    background: rgba(239, 68, 68, 0.8);
    transform: scale(1.1);
}

/* Edit Destination Modal */
.edit-destination-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.edit-destination-modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.edit-destination-modal-content {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(1);
    transition: transform 0.3s ease;
}

.edit-destination-modal.hidden .edit-destination-modal-content {
    transform: scale(0.9);
}

.edit-destination-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--header-bg);
}

.edit-destination-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.edit-destination-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.edit-destination-close-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.edit-destination-modal-body {
    padding: 24px;
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--input-border);
    border-radius: var(--radius);
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-help {
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.edit-destination-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

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

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

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

.btn-primary:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
}

/* Context Menu Styles */
.context-menu {
    position: absolute;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 900;
    min-width: 180px;
    padding: 4px 0;
    font-size: 0.9rem;
    user-select: none;
}

.context-menu.hidden {
    display: none;
}

.context-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    color: var(--text-primary);
}

.context-menu-item:hover {
    background: var(--bg-tertiary);
}

.context-menu-arrow {
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: transform 0.15s ease;
}

.context-menu-item:hover .context-menu-arrow {
    transform: translateX(2px);
}

.context-submenu {
    position: absolute;
    left: 100%;
    top: 0;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 160px;
    padding: 4px 0;
    margin-left: 4px;
    z-index: 1001;
    max-height: 300px;
    overflow-y: auto;
}

.context-submenu.hidden {
    display: none;
}

.context-submenu-item {
    padding: 8px 16px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    color: var(--text-primary);
    font-size: 0.85rem;
}

.context-submenu-item:hover {
    background: var(--bg-tertiary);
}

.context-submenu-item-disabled {
    color: var(--text-muted) !important;
    cursor: not-allowed !important;
    background: none !important;
}

.context-submenu-item-disabled:hover {
    background: none !important;
}

/* Dark theme context menu */
[data-theme="dark"] .context-menu {
    background: var(--card-bg);
    border-color: var(--border);
}

[data-theme="dark"] .context-submenu {
    background: var(--card-bg);
    border-color: var(--border);
}

/* Image container styles for origin story */
.image-container {
    margin: auto;
    text-align: center;
    max-width: 85%;
    overflow: hidden;
}

.ugly-interface-image {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ugly-interface-image:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 10px 10px -5px rgb(0 0 0 / 0.04);
}

.image-caption {
    margin-top: 1rem;
    font-style: italic;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Dark theme adjustments for image container */
[data-theme="dark"] .image-caption {
    color: var(--text-secondary);
}

/* Landing Page Styles */
.hero-section {
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    padding: 80px 0 120px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.product-hunt-badge {
    margin-bottom: 40px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.product-hunt-badge:hover {
    transform: translateY(-2px);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 48px;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease-in-out infinite;
}

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

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 180px;
    justify-content: center;
}

.btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    color: white;
}

.social-proof {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .social-proof {
        flex-direction: column;
        gap: 16px;
    }
}

.avatars {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.avatar-group {
    display: flex;
    margin-right: 16px;
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid var(--bg-primary);
    margin-left: -12px;
    transition: transform 0.3s ease;
    object-fit: cover;
    object-position: center;
}

.avatar:first-child {
    margin-left: 0;
}


.rating-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.stars {
    display: flex;
    gap: 4px;
}

.testimonial-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-align: center;
}

.testimonial-number {
    font-weight: 700;
    color: var(--text-primary);
}

.demo-section {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.demo-video-container {
    position: relative;
    max-width: 800px;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: var(--card-bg);
}

.demo-video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
}

.demo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: all 0.3s ease;
    cursor: pointer;
}

.demo-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.play-button {
    width: 80px;
    height: 80px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: white;
    transition: all 0.3s ease;
}

.demo-overlay:hover .play-button {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.demo-overlay p {
    color: white;
    font-weight: 500;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Tech Stack Section */
.tech-stack-section {
    padding: 60px 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.tech-stack-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.tech-stack-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 32px;
}

.tech-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.tech-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

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

.tech-badge svg {
    color: var(--primary);
    flex-shrink: 0;
}

.tech-badge span {
    font-weight: 500;
    font-size: 0.95rem;
}

.tech-description {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
    font-style: italic;
}

/* Responsive Tech Stack */
@media (max-width: 768px) {
    .tech-stack-section {
        padding: 40px 0;
    }
    
    .tech-badges {
        gap: 16px;
    }
    
    .tech-badge {
        padding: 10px 16px;
    }
    
    .tech-badge span {
        font-size: 0.9rem;
    }
    
    .tech-stack-content h3 {
        font-size: 1.25rem;
        margin-bottom: 24px;
    }
}

@media (max-width: 480px) {
    .tech-badges {
        flex-direction: column;
        gap: 12px;
    }
    
    .tech-badge {
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }
}

.features-section {
    padding: 80px 0;
    background: var(--bg-primary);
}

.features-section h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 60px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 24px;
    display: block;
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-large {
        width: 100%;
        max-width: 300px;
    }
    
    .avatars {
        justify-content: center;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .feature-card {
        padding: 24px 20px;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 60px 0 80px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .features-section {
        padding: 60px 0;
    }
    
    .features-section h2 {
        font-size: 2rem;
        margin-bottom: 40px;
    }
    
    .demo-video-container {
        max-width: 100%;
        margin: 0 20px;
    }
    
    .play-button {
        width: 60px;
        height: 60px;
    }
    
    .demo-overlay p {
        font-size: 0.9rem;
    }
}

/* Animation Cards Section */
.animation-cards-section {
    padding: 80px 0;
}

.animation-cards-section h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.animation-subtitle {
    text-align: center;
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 60px;
    font-weight: 400;
}

.animation-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.animation-count {
    text-align: center;
    font-size: 1rem;
    color: var(--text-muted);
    margin-top: 40px;
    font-weight: 500;
}

.animation-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px 16px 24px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    margin: 20px 0;
}

.animation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    border-radius: 16px 16px 0 0;
    z-index: 1;
}

.animation-card:hover::before {
    transform: scaleX(1);
}

.animation-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.animation-circle {
    width: 120px;
    height: 120px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    position: relative;
    z-index: 0;
}

.animation-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
}

.animation-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 8px 0 0;
    line-height: 1.4;
}

.documentation-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    border: none;
    text-decoration: none;
    display: block;
}

.documentation-card h3 {
    color: white;
}

.documentation-card p {
    color: rgba(255, 255, 255, 0.9);
}

.documentation-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    text-decoration: none;
    color: white;
}

.documentation-card::before {
    display: none;
}

/* Animation keyframes for the circles */
@keyframes beating {
    0% { transform: scale(1); }
    34% { transform: scale(1.2); }
    68% { transform: scale(1.04); }
    84% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

@keyframes fade {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes tremble {
    0% { transform: translate(0px,0px) rotate(0deg) scale(1); }
    3.33333% { transform: translate(-0.28px,2.18px) rotate(0deg) scale(1); }
    6.66667% { transform: translate(-1.26px,-1.99px) rotate(0deg) scale(1); }
    10% { transform: translate(1.02px,1.51px) rotate(0deg) scale(1); }
    13.33333% { transform: translate(-0.76px,1.25px) rotate(0deg) scale(1); }
    16.66667% { transform: translate(1.97px,-0.77px) rotate(0deg) scale(1); }
    20% { transform: translate(-1.82px,2.24px) rotate(0deg) scale(1); }
    23.33333% { transform: translate(1.64px,-0.32px) rotate(0deg) scale(1); }
    26.66667% { transform: translate(-2.25px,0.84px) rotate(0deg) scale(1); }
    30% { transform: translate(2.22px,1.82px) rotate(0deg) scale(1); }
    33.33333% { transform: translate(-2.16px,-1.73px) rotate(0deg) scale(1); }
    36.66667% { transform: translate(2.04px,2.02px) rotate(0deg) scale(1); }
    40% { transform: translate(-2.14px,0.46px) rotate(0deg) scale(1); }
    43.33333% { transform: translate(2.21px,-2.25px) rotate(0deg) scale(1); }
    46.66667% { transform: translate(-1.39px,2.16px) rotate(0deg) scale(1); }
    50% { transform: translate(1.60px,-1.13px) rotate(0deg) scale(1); }
    53.33333% { transform: translate(-1.79px,-1.61px) rotate(0deg) scale(1); }
    56.66667% { transform: translate(0.43px,1.19px) rotate(0deg) scale(1); }
    60% { transform: translate(-0.71px,-2.14px) rotate(0deg) scale(1); }
    63.33333% { transform: translate(0.97px,-0.15px) rotate(0deg) scale(1); }
    66.66667% { transform: translate(0.62px,-0.39px) rotate(0deg) scale(1); }
    70% { transform: translate(-0.34px,-2.05px) rotate(0deg) scale(1); }
    73.33333% { transform: translate(0.05px,1.39px) rotate(0deg) scale(1); }
    76.66667% { transform: translate(-1.53px,-1.78px) rotate(0deg) scale(1); }
    80% { transform: translate(1.31px,-0.91px) rotate(0deg) scale(1); }
    83.33333% { transform: translate(-1.07px,2.22px) rotate(0deg) scale(1); }
    86.66667% { transform: translate(2.11px,-2.24px) rotate(0deg) scale(1); }
    90% { transform: translate(-2.00px,0.70px) rotate(0deg) scale(1); }
    93.33333% { transform: translate(1.85px,1.90px) rotate(0deg) scale(1); }
    96.66667% { transform: translate(-2.23px,-1.56px) rotate(0deg) scale(1); }
    100% { transform: translate(0,0) rotate(0) scale(1); }
}

@keyframes blink {
    0% { opacity: 1; }
    49.75% { opacity: 1; }
    50.25% { opacity: 0; }
    99.5% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes bounce {
    0% { transform: translate(0,0px) scaleY(1); }
    37% { transform: translate(0,-39.96px) scaleY(1); }
    72% { transform: translate(0,0px) scaleY(1); }
    87% { transform: translate(0,19.90px) scaleY(0.602); }
    100% { transform: translate(0,0px) scaleY(1); }
}

@keyframes breath {
    0% { transform: scale(0.91); }
    51% { transform: scale(1.03); }
    100% { transform: scale(0.91); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes flip-horizontal {
    0% { transform: rotateY(0deg); }
    30% { transform: rotateY(153.72deg); }
    50% { transform: rotateY(180deg); }
    55% { transform: rotateY(238.68deg); }
    100% { transform: rotateY(360deg); }
}

@keyframes blur {
    0% { filter: blur(0); }
    50% { filter: blur(10px); }
    100% { filter: blur(0); }
}

@keyframes pulse {
    0% { transform: scale(0.85); }
    0.5% { transform: scale(1.141); }
    1.5% { transform: scale(1.124); }
    11% { transform: scale(0.992); }
    25% { transform: scale(0.887); }
    49.5% { transform: scale(0.85); }
    50% { transform: scale(1.15); }
    51% { transform: scale(1.132); }
    73.5% { transform: scale(0.894); }
    100% { transform: scale(0.85); }
}

@keyframes skew {
    0% { transform: skewY(20deg) scale(1); }
    25% { transform: skewY(0deg) scale(0.9); }
    50% { transform: skewY(-20deg) scale(1); }
    75% { transform: skewY(0deg) scale(0.9); }
    100% { transform: skewY(20deg) scale(1); }
}

@keyframes swim {
    0% { transform: translate(0px,0px) rotate(0deg) scale(1); }
    8.33333% { transform: translate(-5.96px,4.91px) rotate(-13.67deg) scale(1); }
    16.66667% { transform: translate(5.25px,-2.06px) rotate(0.47deg) scale(1); }
    25% { transform: translate(2.31px,5.79px) rotate(13.86deg) scale(1); }
    33.33333% { transform: translate(-5.76px,-4.61px) rotate(10.94deg) scale(1); }
    41.66667% { transform: translate(3.74px,5.98px) rotate(-14.03deg) scale(1); }
    50% { transform: translate(4.26px,-3.01px) rotate(-10.61deg) scale(1); }
    58.33333% { transform: translate(-4.66px,-2.51px) rotate(5.29deg) scale(1); }
    66.66667% { transform: translate(1.64px,-1.05px) rotate(10.27deg) scale(1); }
    75% { transform: translate(5.56px,-4.23px) rotate(-5.73deg) scale(1); }
    83.33333% { transform: translate(-2.85px,5.91px) rotate(-14.99deg) scale(1); }
    91.66667% { transform: translate(-0.71px,-5.43px) rotate(6.16deg) scale(1); }
    100% { transform: translate(0,0) rotate(0) scale(1); }
}

/* Apply animations to specific cards */
.animation-card[data-animation="beating"] .animated-circle {
    animation: beating 1.5s infinite;
}

.animation-card[data-animation="fade"] .animated-circle {
    animation: fade 0.5s infinite alternate;
}

.animation-card[data-animation="tremble"] .animated-circle {
    animation: tremble 0.5s infinite;
}

.animation-card[data-animation="blink"] .animated-circle {
    animation: blink 0.5s infinite;
}

.animation-card[data-animation="bounce"] .animated-circle {
    animation: bounce 0.5s infinite;
}

.animation-card[data-animation="breath"] .animated-circle {
    animation: breath 0.5s infinite;
}

.animation-card[data-animation="spin"] .animated-circle {
    animation: spin 0.5s infinite linear;
}

.animation-card[data-animation="flip-horizontal"] .animated-circle {
    animation: flip-horizontal 0.5s infinite;
}

.animation-card[data-animation="blur"] .animated-circle {
    animation: blur 0.5s infinite;
}

.animation-card[data-animation="pulse"] .animated-circle {
    animation: pulse 0.5s infinite;
}

.animation-card[data-animation="skew"] .animated-circle {
    animation: skew 0.5s infinite;
}

.animation-card[data-animation="swim"] .animated-circle {
    animation: swim 0.5s infinite;
}

/* Responsive adjustments for animation cards */
@media (max-width: 768px) {
    .animation-cards-section {
        padding: 60px 0;
    }
    
    .animation-cards-section h2 {
        font-size: 2rem;
        margin-bottom: 12px;
    }
    
    .animation-subtitle {
        font-size: 1rem;
        margin-bottom: 40px;
    }
    
    .animation-cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 16px;
    }
    
    .animation-card {
        padding: 28px 12px 20px;
    }
    
    .animation-circle {
        width: 100px;
        height: 100px;
        margin-bottom: 12px;
    }
    
    .animation-card h3 {
        font-size: 0.9rem;
    }
    
    .animation-card p {
        font-size: 0.8rem;
    }
    
    .animation-count {
        font-size: 0.9rem;
        margin-top: 32px;
    }
}

/* Page Header Styles */
.page-header {
    padding: 40px 0 60px;
}

.page-header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.page-header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.2;
}

.page-header p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto;
}

/* Tools Gallery Page Adjustments */
.tools-gallery {
    padding: 60px 0;
}

.tools-gallery .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Articles Section Page Adjustments */
.articles-section {
    padding: 60px 0;
}

.articles-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Responsive Page Headers */
@media (max-width: 768px) {
    .page-header {
        padding: 30px 0 40px;
    }
    
    .page-header h1 {
        font-size: 1.875rem;
    }
    
    .page-header p {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 24px 0 32px;
    }
    
    .page-header h1 {
        font-size: 1.625rem;
    }
    
    .page-header p {
        font-size: 0.9rem;
    }
}
