/* ============================================
   JPG Analyzer - Single Column Layout
   Blue Color Theme - Dark Mode Support
   ============================================ */

:root {
    --primary: #3399cc;
    --primary-light: #dbeafe;
    --primary-dark: #2a7fb3;
    --accent: #60a5fa;
    --success: #339966;
    --success-light: #D1FAE5;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --danger: #e64e4e;
    --danger-light: #FEE2E2;
    --bg: #f8fafc;
    --bg-elevated: #ffffff;
    --text: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}

/* ============================================
   DARK MODE
   ============================================ */
[data-theme="dark"] {
    --primary: #60a5fa;
    --primary-light: rgba(96, 165, 250, 0.15);
    --primary-dark: #3b82f6;
    --accent: #93c5fd;
    --success: #4ade80;
    --success-light: rgba(74, 222, 128, 0.15);
    --warning: #fbbf24;
    --warning-light: rgba(251, 191, 36, 0.15);
    --danger: #f87171;
    --danger-light: rgba(248, 113, 113, 0.15);
    --bg: #0f172a;
    --bg-elevated: #1e293b;
    --text: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border: rgba(255,255,255,0.1);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.4);
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

.tool-container {
    max-width: 1100px;
    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: var(--primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--shadow-lg);
    flex-shrink: 0;
}

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

.tool-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin: 0;
    color: var(--primary);
    letter-spacing: -0.02em;
}

.tool-description {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 800px;
    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);
    position: relative;
}

/* ============================================
   UPLOAD SECTION
   ============================================ */
.upload-section {
    padding: 3rem;
    position: relative;
}

.upload-form { width: 100%; }

.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: var(--bg);
    position: relative;
    overflow: hidden;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

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

.upload-icon svg { width: 64px; height: 64px; }
.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-block;
    background: var(--bg-elevated);
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    border: 1px solid var(--border);
}

/* ============================================
   PROCESSING OVERLAY
   ============================================ */
.processing-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(4px);
}

[data-theme="dark"] .processing-overlay {
    background: rgba(15, 23, 42, 0.95);
}

.processing-content { text-align: center; padding: 3rem; }
.processing-spinner { margin-bottom: 1.5rem; color: var(--primary); }
.processing-spinner svg { width: 48px; height: 48px; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.processing-status { font-size: 1.1rem; font-weight: 600; color: var(--text); margin: 0; }

/* ============================================
   FILE INFO BAR
   ============================================ */
.file-info-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 1.25rem 2rem;
    background: var(--primary-light);
    border-bottom: 1px solid var(--border);
}

.file-info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.file-info-item svg {
    width: 18px;
    height: 18px;
    color: var(--primary);
    flex-shrink: 0;
}

/* ============================================
   PREVIEW SECTION (Full Width, Single Column)
   ============================================ */
.preview-section {
    padding: 2rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.jpg-display {
    background-color: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    max-height: 500px;
    overflow: auto;
}

.jpg-display img {
    max-width: 100%;
    max-height: 450px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
}

.jpg-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
}
.jpg-placeholder svg { width: 64px; height: 64px; opacity: 0.5; }

.preview-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.control-button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.875rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.control-button svg { width: 16px; height: 16px; flex-shrink: 0; }

.control-button:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.control-button.download-btn {
    background: var(--success);
    color: white;
    border-color: transparent;
}

.control-button.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(51, 153, 102, 0.3);
}

/* ============================================
   QUALITY SCORE ROW
   ============================================ */
.quality-score-row {
    display: flex;
    justify-content: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
}

.quality-score-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 2rem;
    border-radius: var(--radius-lg);
}

.quality-score-card.score-high {
    background: rgba(51, 153, 102, 0.1);
    border: 1px solid rgba(51, 153, 102, 0.3);
}
.quality-score-card.score-medium {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.quality-score-card.score-low {
    background: rgba(230, 78, 78, 0.1);
    border: 1px solid rgba(230, 78, 78, 0.3);
}

.score-ring {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.score-high .score-ring { background: var(--success); box-shadow: 0 4px 15px rgba(51, 153, 102, 0.3); }
.score-medium .score-ring { background: var(--warning); box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3); }
.score-low .score-ring { background: var(--danger); box-shadow: 0 4px 15px rgba(230, 78, 78, 0.3); }

.score-ring .score-value { font-size: 1.75rem; font-weight: 700; color: white; }

.score-details { display: flex; flex-direction: column; }
.score-details .score-label { font-size: 1.25rem; font-weight: 600; color: var(--text); }
.score-details .score-hint { font-size: 0.85rem; color: var(--text-muted); }

/* ============================================
   STATS ROW
   ============================================ */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border-bottom: 1px solid var(--border);
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    transition: all 0.2s ease;
    border-right: 1px solid var(--border);
}

.stat-card:last-child {
    border-right: none;
}

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

.stat-card.exif-yes {
    background: rgba(51, 153, 102, 0.06);
}

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

.stat-icon svg { width: 20px; height: 20px; }
.stat-info { display: flex; flex-direction: column; min-width: 0; }
.stat-value { font-size: 1rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-label { font-size: 0.75rem; color: var(--text-muted); }

/* ============================================
   TWO-COLUMN INFO GRID
   ============================================ */
.info-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.info-column {
    padding: 2rem;
}

.info-column:first-child {
    border-right: 1px solid var(--border);
}

.column-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.column-header.mt-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

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

.column-header svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
    flex-shrink: 0;
}

/* ============================================
   PROPERTIES TABLE
   ============================================ */
.props-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.props-table td {
    padding: 0.625rem 0.75rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

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

.props-table td:first-child {
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    width: 40%;
}

.props-table td:last-child {
    color: var(--text-secondary);
    word-break: break-word;
}

.props-table tr:hover {
    background: var(--bg);
}

.inline-color-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    border: 1px solid var(--border);
    vertical-align: middle;
    margin-right: 4px;
}

/* ============================================
   NO METADATA + ANALYZER LINKS
   ============================================ */
.no-metadata {
    text-align: center;
    padding: 2rem 1.5rem 1.5rem;
    color: var(--text-muted);
}

.no-metadata svg {
    width: 40px;
    height: 40px;
    opacity: 0.35;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}

.no-metadata p {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.no-metadata-hint {
    font-size: 0.85rem !important;
    color: var(--text-muted) !important;
    font-style: italic;
}

.other-analyzers {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.other-analyzers h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 0.75rem;
}

.other-analyzers h4 svg {
    width: 16px;
    height: 16px;
    color: var(--primary);
}

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

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

.analyzer-link svg {
    width: 15px;
    height: 15px;
    color: var(--primary);
    flex-shrink: 0;
}

.analyzer-link:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.analyzer-link:hover svg {
    color: white;
}

/* ============================================
   COMPAT BADGE
   ============================================ */
.compat-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: 0.75rem 1rem;
    background: var(--success-light);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: var(--success);
    font-weight: 500;
}

.compat-badge svg { width: 16px; height: 16px; color: var(--success); flex-shrink: 0; }

/* ============================================
   COLOR PALETTE
   ============================================ */
.color-palette-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.color-palette-section h4 {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
}

.color-palette-section h4 svg { width: 18px; height: 18px; color: var(--primary); }

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

.color-swatch {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    border: 2px solid var(--border);
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
}

.color-swatch:hover {
    transform: scale(1.15);
    box-shadow: var(--shadow-md);
    z-index: 1;
}

.color-hex {
    font-size: 0.6rem;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 2px 4px;
    border-radius: 2px;
    margin-bottom: 2px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.color-swatch:hover .color-hex { opacity: 1; }

.color-tip {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0.5rem 0 0;
}

/* ============================================
   RECOMMENDATIONS
   ============================================ */
.recommendations-section {
    padding: 2rem;
    background: var(--primary-light);
    border-top: 1px solid var(--border);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

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

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

.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.recommendation-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
}

.recommendation-item a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}
.recommendation-item a:hover { text-decoration: underline; }

.rec-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    color: var(--primary);
    flex-shrink: 0;
}
.rec-icon svg { width: 18px; height: 18px; }


/* ============================================
   ACTION BAR + BUTTONS
   ============================================ */
.action-bar {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    background: var(--bg);
    border-top: 1px solid var(--border);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(51, 153, 204, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(51, 153, 204, 0.4);
}

/* ============================================
   ERROR MESSAGE
   ============================================ */
.error-message {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin: 2rem;
    padding: 1.25rem 1.5rem;
    background: var(--danger-light);
    border: 1px solid rgba(230, 78, 78, 0.2);
    border-radius: var(--radius-md);
    color: var(--danger);
}

.error-icon { flex-shrink: 0; }
.error-icon svg { width: 24px; height: 24px; }
.error-text span { font-weight: 500; display: block; }

.error-contact {
    margin: 0.5rem 0 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.error-contact a { color: var(--primary); text-decoration: none; font-weight: 500; }
.error-contact a:hover { text-decoration: underline; }

/* ============================================
   RELATED TOOLS
   ============================================ */
.related-tools {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    padding: 1.25rem 1.5rem;
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
    border: 1px solid var(--border);
}

.related-label { font-weight: 600; color: var(--text); font-size: 0.9rem; }
.related-links { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.related-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: var(--bg);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    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 { width: 16px; height: 16px; flex-shrink: 0; }

/* ============================================
   INFO SECTIONS - No background, shadow, or border
   ============================================ */
.info-sections {
    display: grid;
    gap: 2rem;
    margin-top: 3rem;
}

.info-card { padding: 0; }

.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 { width: 24px; height: 24px; color: var(--primary); flex-shrink: 0; }

.info-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0 0 1rem;
}
.info-card p:last-child { margin-bottom: 0; }

.info-card p a,
.info-card a:not(.related-link):not(.btn) {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px dotted var(--primary);
    transition: all 0.2s ease;
}
.info-card a:hover { border-bottom-style: solid; }

/* ============================================
   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 a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px dotted var(--primary);
}
.steps-list li a:hover { border-bottom-style: solid; }

.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: var(--primary);
    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;
}

/* ============================================
   FEATURE EXPLANATIONS
   ============================================ */
.feature-explanations { display: grid; gap: 1rem; }

.feature-explain {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.feature-tag {
    flex-shrink: 0;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
}

.feature-tag.quality-tag { background: #3399cc; }
.feature-tag.exif-tag { background: #8B5CF6; }
.feature-tag.iptc-tag { background: #339966; }
.feature-tag.compression-tag { background: #e64e4e; }

.feature-explain p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ============================================
   USE CASES GRID
   ============================================ */
.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

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

.use-case:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-sm);
}

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

.use-case-content h4 { margin: 0 0 0.375rem; font-size: 1rem; font-weight: 600; color: var(--text); }
.use-case-content p { margin: 0; font-size: 0.875rem; color: var(--text-secondary); line-height: 1.5; }
.use-case-content a { color: var(--primary); text-decoration: none; font-weight: 500; }
.use-case-content a:hover { text-decoration: underline; }

.use-cases-tip {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 1rem 1.25rem;
    background: var(--primary-light);
    border-radius: var(--radius-md);
    border: 1px solid var(--primary);
    margin-top: 0;
}

.use-cases-tip svg { width: 16px; height: 16px; color: var(--primary); flex-shrink: 0; margin-top: 2px; }
.use-cases-tip span { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.5; }
.use-cases-tip a { color: var(--primary); text-decoration: none; font-weight: 500; }
.use-cases-tip a:hover { text-decoration: underline; }

/* ============================================
   FORMATS GRID
   ============================================ */
.formats-grid { display: grid; gap: 0.75rem; }

.format-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.format-ext {
    flex-shrink: 0;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--primary);
    background: var(--primary-light);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    min-width: 120px;
    text-align: center;
}

.format-desc { 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;
}

.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 {
    width: 20px;
    height: 20px;
    color: var(--primary);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-item.open .faq-question svg { 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; }
.faq-answer a { color: var(--primary); text-decoration: none; font-weight: 500; }
.faq-answer a:hover { text-decoration: underline; }

/* ============================================
   TOAST NOTIFICATION
   ============================================ */
.toast-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--text);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}

.toast-notification.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .info-columns { grid-template-columns: 1fr; }
    .info-column:first-child {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .quality-score-row { padding: 1.25rem; }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .stat-card:nth-child(2) { border-right: none; }
}

@media (max-width: 768px) {
    .tool-container { padding: 1rem; }
    .tool-title-row { gap: 0.75rem; }
    .tool-icon-wrapper { width: 48px; height: 48px; }
    .tool-icon-wrapper svg { width: 24px; height: 24px; }
    .upload-section { padding: 2rem 1.5rem; }
    .preview-section { padding: 1.5rem; }
    .info-column { padding: 1.5rem; }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .stat-card:nth-child(2) { border-right: none; }
    .action-bar { flex-direction: column; padding: 1.5rem; }
    .btn { width: 100%; }
    .related-tools { flex-direction: column; text-align: center; }
    .related-links { justify-content: center; }
    .feature-explain { flex-direction: column; }
    .use-cases-grid { grid-template-columns: 1fr; }
    .quality-score-card { flex-direction: column; text-align: center; }
    .format-item { flex-direction: column; }
    .format-ext { min-width: auto; }
}

@media (max-width: 480px) {
    .tool-title { font-size: 1.5rem; }
    .file-info-bar { flex-direction: column; gap: 0.75rem; align-items: flex-start; }
    .steps-list li { padding-left: 3rem; }
    .preview-controls { flex-direction: column; align-items: stretch; }
    .control-button { justify-content: center; }
    .color-palette { justify-content: center; }
    .stats-row { grid-template-columns: 1fr; }
    .stat-card { border-right: none !important; border-bottom: 1px solid var(--border); }
    .stat-card:last-child { border-bottom: none; }
    .props-table td:first-child { white-space: normal; }
    .analyzer-links { grid-template-columns: 1fr; }
}

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

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

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