/* ============================================
   SVG Icon Animator - Stylesheet
   Purple/Violet Color Theme with Dark Mode
   ============================================ */

/* CSS Variables - Purple/Violet Theme */
:root {
    --primary: #8B5CF6;
    --primary-light: #EDE9FE;
    --primary-dark: #6D28D9;
    --accent: #A78BFA;
    --accent-light: #DDD6FE;
    --success: #10B981;
    --success-light: #D1FAE5;
    --warning: #F59E0B;
    --danger: #EF4444;
    
    --bg: #FAF5FF;
    --bg-elevated: #ffffff;
    --text: #1e1b4b;
    --text-secondary: #5b21b6;
    --text-muted: #7c3aed;
    --border: #DDD6FE;
    
    --shadow-sm: 0 1px 3px rgba(139, 92, 246, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(139, 92, 246, 0.15);
    --shadow-lg: 0 10px 15px -3px rgba(139, 92, 246, 0.15);
    --shadow-xl: 0 20px 25px -5px rgba(139, 92, 246, 0.15);
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Preview area */
    --preview-bg: #f5f3ff;
    --preview-grid: rgba(139, 92, 246, 0.1);
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --primary: #A78BFA;
    --primary-light: #3730A3;
    --primary-dark: #C4B5FD;
    --accent: #C4B5FD;
    --accent-light: #4C1D95;
    
    --bg: #0f0a1f;
    --bg-elevated: #1a1333;
    --text: #f5f3ff;
    --text-secondary: #c4b5fd;
    --text-muted: #a78bfa;
    --border: #3730a3;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4);

    --preview-bg: #1a1333;
    --preview-grid: rgba(167, 139, 250, 0.15);
}

/* Base */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, var(--bg) 0%, #EDE9FE 100%);
    color: var(--text);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] body {
    background: linear-gradient(135deg, var(--bg) 0%, #1a0a2e 100%);
}

/* Container */
.tool-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header */
.tool-header {
    text-align: center;
    margin-bottom: 2rem;
}

.tool-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tool-icon-wrapper {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--shadow-lg), 0 0 40px rgba(139, 92, 246, 0.3);
    flex-shrink: 0;
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.tool-icon-wrapper svg,
.tool-icon-wrapper i {
    width: 28px;
    height: 28px;
}

.tool-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.tool-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Main Tool Area */
.tool-main {
    background: var(--bg-elevated);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Upload Section */
.upload-section {
    padding: 3rem;
}

.upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 4rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #FEFFFE 0%, var(--bg) 100%);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .upload-area {
    background: linear-gradient(135deg, #1a1333 0%, #0f0a1f 100%);
}

.upload-area::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05), rgba(167, 139, 250, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.upload-area:hover,
.upload-area.dragover,
.upload-area.active {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--bg) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

[data-theme="dark"] .upload-area:hover,
[data-theme="dark"] .upload-area.dragover,
[data-theme="dark"] .upload-area.active {
    background: linear-gradient(135deg, var(--primary-light) 0%, #1a1333 100%);
}

.upload-area:hover::before,
.upload-area.dragover::before,
.upload-area.active::before {
    opacity: 1;
}

.upload-content {
    position: relative;
    z-index: 1;
}

.upload-icon {
    color: var(--primary);
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.upload-area:hover .upload-icon {
    transform: translateY(-5px);
}

.upload-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 0.5rem;
}

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

.upload-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
}

[data-theme="dark"] .upload-hint {
    background: var(--primary-light);
    color: var(--accent);
}

.upload-hint i,
.upload-hint svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Editor Section */
.editor-section {
    padding: 0;
}

/* Preview Area */
.preview-area {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--bg) 0%, var(--primary-light) 100%);
    border-bottom: 1px solid var(--border);
}

[data-theme="dark"] .preview-area {
    background: linear-gradient(135deg, #0f0a1f 0%, #1a1333 100%);
}

.preview-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    min-height: 300px;
}

.preview-panel {
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.preview-panel .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--primary-light);
    border-bottom: 1px solid var(--border);
}

[data-theme="dark"] .preview-panel .panel-header {
    background: var(--primary-light);
}

.preview-panel .panel-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.preview-panel .panel-header h3 svg,
.preview-panel .panel-header h3 i {
    color: var(--primary);
}

.svg-info {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-elevated);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}

.panel-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    overflow: hidden;
    min-height: 250px;
}

/* Checkerboard background for SVG preview */
.svg-preview-content {
    background-image: 
        linear-gradient(45deg, var(--preview-grid) 25%, transparent 25%),
        linear-gradient(-45deg, var(--preview-grid) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, var(--preview-grid) 75%),
        linear-gradient(-45deg, transparent 75%, var(--preview-grid) 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
    background-color: var(--preview-bg);
}

.svg-container {
    max-width: 100%;
    max-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.svg-container svg {
    max-width: 100%;
    max-height: 200px;
    width: auto;
    height: auto;
}

.preview-placeholder {
    text-align: center;
    color: var(--text-muted);
}

.preview-placeholder i,
.preview-placeholder svg {
    width: 48px;
    height: 48px;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.preview-placeholder p {
    margin: 0;
    font-size: 0.9rem;
}

/* Settings Panel */
.settings-panel {
    padding: 1.5rem 2rem;
}

.settings-panel > .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.settings-panel > .panel-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.settings-panel > .panel-header h3 svg,
.settings-panel > .panel-header h3 i {
    color: var(--primary);
}

.btn-text {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

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

/* Settings Sections */
.settings-section {
    margin-bottom: 1.5rem;
}

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

.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--border);
}

.section-title svg,
.section-title i {
    color: var(--primary);
    width: 16px;
    height: 16px;
}

/* Animation Presets Grid */
.animation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
}

.animation-preset {
    position: relative;
}

.animation-preset input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.animation-preset label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.75rem;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.animation-preset label:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.animation-preset input[type="radio"]:checked + label {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.preset-icon {
    width: 32px;
    height: 32px;
    color: var(--primary);
    transition: transform 0.3s ease;
}

.animation-preset label:hover .preset-icon {
    transform: scale(1.1);
}

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

/* Setting Row */
.setting-row {
    margin-bottom: 1rem;
}

.setting-row:last-child {
    margin-bottom: 0;
}

.setting-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.setting-label svg,
.setting-label i {
    color: var(--primary);
    width: 16px;
    height: 16px;
}

/* Slider Row */
.slider-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.slider-input {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: var(--border);
    border-radius: var(--radius-full);
    outline: none;
    transition: all 0.2s ease;
}

.slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(139, 92, 246, 0.3);
    transition: all 0.2s ease;
}

.slider-input::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 10px rgba(139, 92, 246, 0.4);
}

.slider-input::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(139, 92, 246, 0.3);
}

.value-display {
    min-width: 60px;
    padding: 0.35rem 0.75rem;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-dark);
    text-align: center;
}

[data-theme="dark"] .value-display {
    color: var(--accent);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Styled Dropdown */
.styled-dropdown {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%238B5CF6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 18px;
    padding-right: 2.5rem;
}

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

.styled-dropdown:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

/* Color Picker Row */
.color-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.color-picker {
    width: 40px;
    height: 40px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    padding: 0;
    overflow: hidden;
}

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

.color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 6px;
}

.color-value {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

/* Action Bar */
.action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.5rem 2rem;
    background: var(--primary-light);
    border-top: 1px solid var(--border);
}

[data-theme="dark"] .action-bar {
    background: var(--primary-light);
}

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

.btn svg,
.btn i {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

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

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

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Error Message */
.error-message {
    background: #FEE2E2;
    color: #B91C1C;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

[data-theme="dark"] .error-message {
    background: rgba(239, 68, 68, 0.15);
    color: #FCA5A5;
}

/* Browser Support */
.browser-support {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2rem;
    padding: 1rem 1.5rem;
    background: var(--success-light);
    border-radius: var(--radius-lg);
    color: #065F46;
    font-size: 0.9rem;
}

[data-theme="dark"] .browser-support {
    background: rgba(16, 185, 129, 0.15);
    color: #6EE7B7;
}

.browser-support svg,
.browser-support i {
    color: var(--success);
    flex-shrink: 0;
}

/* Related Tools */
.related-tools {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1.25rem 1.5rem;
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.related-label {
    font-weight: 600;
    color: var(--text);
    font-size: 0.9rem;
}

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

.related-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    background: var(--bg);
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid var(--border);
}

.related-link:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

.related-link svg,
.related-link i {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

/* Info Sections */
.info-sections {
    display: grid;
    gap: 2rem;
    margin-top: 3rem;
}

.info-card {
    background: var(--bg-elevated);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.info-card h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.35rem;
    color: var(--text);
    margin: 0 0 1.5rem;
}

.info-card h2 svg,
.info-card h2 i {
    color: var(--primary);
    flex-shrink: 0;
}

/* Steps List */
.steps-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: step;
}

.steps-list li {
    position: relative;
    padding-left: 3.5rem;
    padding-bottom: 1.25rem;
    counter-increment: step;
    color: var(--text-secondary);
    line-height: 1.6;
}

.steps-list li:not(:last-child)::after {
    content: '';
    position: absolute;
    left: calc(1rem - 1px);
    top: 2rem;
    bottom: 0;
    width: 2px;
    background: var(--primary-light);
}

.steps-list li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 2rem;
    height: 2rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    z-index: 1;
}

/* Animation Examples Grid */
.animation-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.animation-example {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem;
    background: var(--bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.animation-example:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.example-icon {
    width: 40px;
    height: 40px;
    color: var(--primary);
}

/* Animation demo classes */
.demo-pulse {
    animation: demoPulse 1.5s ease-in-out infinite;
}

.demo-spin {
    animation: demoSpin 2s linear infinite;
}

.demo-bounce {
    animation: demoBounce 1s ease infinite;
}

.demo-shake {
    animation: demoShake 0.5s ease-in-out infinite;
}

.demo-fade {
    animation: demoFade 2s ease-in-out infinite;
}

.demo-float {
    animation: demoFloat 2s ease-in-out infinite;
}

@keyframes demoPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

@keyframes demoSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes demoBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes demoShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes demoFade {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

@keyframes demoFloat {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-8px) rotate(5deg); }
}

.example-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
}

.example-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}

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

.tip-item {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.tip-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.tip-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary);
}

.tip-content h4 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    color: var(--text);
}

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

/* FAQ */
.faq-list {
    display: grid;
    gap: 0.75rem;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.faq-item:hover {
    border-color: var(--primary);
}

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

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

.faq-question svg,
.faq-question i {
    color: var(--primary);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-item.open .faq-question svg,
.faq-item.open .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    display: none;
    padding: 0 1.25rem 1rem;
    background: var(--bg-elevated);
}

.faq-item.open .faq-answer {
    display: block;
}

.faq-answer p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Responsive */
@media (max-width: 900px) {
    .preview-panels {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .tool-container {
        padding: 1rem;
    }
    
    .tool-title-row {
        flex-direction: row;
        gap: 0.75rem;
    }
    
    .tool-icon-wrapper {
        width: 48px;
        height: 48px;
    }
    
    .tool-icon-wrapper svg,
    .tool-icon-wrapper i {
        width: 24px;
        height: 24px;
    }
    
    .upload-section {
        padding: 2rem 1.5rem;
    }
    
    .upload-area {
        padding: 2.5rem 1.5rem;
    }
    
    .preview-area {
        padding: 1rem;
    }
    
    .settings-panel {
        padding: 1.5rem;
    }
    
    .action-bar {
        flex-direction: column;
        padding: 1.5rem;
    }
    
    .btn {
        width: 100%;
    }
    
    .related-tools {
        flex-direction: column;
        text-align: center;
    }
    
    .related-links {
        justify-content: center;
    }
    
    .animation-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .browser-support {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .tool-title {
        font-size: 1.5rem;
    }
    
    .preview-panel .panel-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .animation-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .steps-list li {
        padding-left: 3rem;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.editor-section {
    animation: fadeIn 0.4s ease;
}

/* Copy Success Animation */
@keyframes copySuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.btn.copy-success {
    animation: copySuccess 0.3s ease;
    background: var(--success) !important;
    border-color: var(--success) !important;
    color: white !important;
}

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