/* ============================================
   Emoji to ICO & PNG - Modern Stylesheet
   Yellow/Amber theme for emoji aesthetic
   Based on ConvertICO design system
   ============================================ */

/* CSS Variables */
:root {
    --primary: #F59E0B;
    --primary-light: #FEF3C7;
    --primary-dark: #D97706;
    --accent: #F97316;
    --success: #10B981;
    --success-light: #D1FAE5;
    --warning: #F59E0B;
    --danger: #EF4444;
    
    --bg: #fffbeb;
    --bg-elevated: #ffffff;
    --text: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #fde68a;
    --border-light: #fef3c7;
    
    --shadow-sm: 0 1px 3px rgba(245, 158, 11, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(245, 158, 11, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(245, 158, 11, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(245, 158, 11, 0.1);
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}

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

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

/* 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(245, 158, 11, 0.3);
    flex-shrink: 0;
}

.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.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    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);
}

/* Emoji Section */
.emoji-section {
    padding: 2rem;
}

/* Source Toggle */
.source-toggle {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: var(--bg);
    padding: 0.25rem;
    border-radius: var(--radius-full);
}

.source-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: var(--radius-full);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.source-btn:hover {
    color: var(--text);
}

.source-btn.active {
    background: var(--bg-elevated);
    color: var(--primary);
    box-shadow: var(--shadow-md);
}

/* Emoji Search */
.emoji-search-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
}

.emoji-search-wrapper > svg,
.emoji-search-wrapper > i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

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

.emoji-search-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-elevated);
    box-shadow: 0 0 0 4px var(--primary-light);
}

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

.search-clear {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.search-clear:hover {
    color: var(--text);
    background: var(--border-light);
}

/* Category Tabs */
.category-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.category-tabs::-webkit-scrollbar {
    height: 4px;
}

.category-tabs::-webkit-scrollbar-track {
    background: transparent;
}

.category-tabs::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: var(--radius-full);
}

.category-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: 70px;
}

.category-tab:hover {
    background: var(--border-light);
    color: var(--text-secondary);
}

.category-tab.active {
    background: linear-gradient(135deg, var(--primary-light), #fef3c7);
    color: var(--primary-dark);
}

.category-tab svg,
.category-tab i {
    flex-shrink: 0;
}

/* Emoji Grid */
.emoji-grid-wrapper {
    min-height: 250px;
    max-height: 350px;
    overflow-y: auto;
    padding: 0.5rem;
    background: var(--bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
    gap: 0.25rem;
}

.emoji-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: var(--radius-md);
    background: transparent;
    font-size: 1.75rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.emoji-btn:hover {
    background: var(--primary-light);
    transform: scale(1.15);
}

.emoji-btn.selected {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: var(--shadow-md);
}

.emoji-btn img {
    width: 28px;
    height: 28px;
}

/* Empty State */
.emoji-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-muted);
    text-align: center;
}

.emoji-empty svg,
.emoji-empty i {
    margin-bottom: 1rem;
    opacity: 0.5;
}

.emoji-empty p {
    margin: 0;
    font-size: 0.95rem;
}

/* Editor Section */
.editor-section {
    padding: 0;
    border-top: 1px solid var(--border);
}

/* Selected Emoji Bar */
.selected-emoji-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary-light) 0%, #fef9e7 100%);
    border-bottom: 1px solid var(--border);
}

.selected-emoji-display {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.selected-emoji {
    font-size: 3rem;
    line-height: 1;
}

.selected-emoji img {
    width: 48px;
    height: 48px;
}

.selected-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

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

.emoji-code {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-family: monospace;
}

/* Editor Grid */
.editor-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

/* Panels */
.preview-panel,
.controls-panel {
    padding: 2rem;
}

.preview-panel {
    background: #fefce8;
    border-right: 1px solid var(--border);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

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

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

/* Preview Container */
.preview-container {
    position: relative;
}

.preview-canvas-wrapper {
    background: 
        linear-gradient(45deg, #f0f0f0 25%, transparent 25%),
        linear-gradient(-45deg, #f0f0f0 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #f0f0f0 75%),
        linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    border: 1px solid var(--border);
}

.preview-canvas-wrapper canvas {
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
}

/* Size Previews */
.size-previews {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.size-preview-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.size-preview-item canvas {
    background: 
        linear-gradient(45deg, #e5e5e5 25%, transparent 25%),
        linear-gradient(-45deg, #e5e5e5 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #e5e5e5 75%),
        linear-gradient(-45deg, transparent 75%, #e5e5e5 75%);
    background-size: 8px 8px;
    background-position: 0 0, 0 4px, 4px -4px, -4px 0px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.size-preview-item span {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Controls */
.control-section {
    margin-bottom: 1.75rem;
}

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

.control-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.75rem;
}

.control-label svg,
.control-label i {
    color: var(--primary);
}

/* Size Checkboxes */
.size-checkboxes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.size-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.size-checkbox:hover {
    border-color: var(--primary-light);
}

.size-checkbox input {
    display: none;
}

.size-checkbox input:checked + .checkbox-box {
    background: var(--primary);
    border-color: var(--primary);
}

.size-checkbox input:checked + .checkbox-box::after {
    opacity: 1;
    transform: scale(1);
}

.size-checkbox input:checked ~ .checkbox-label {
    color: var(--primary-dark);
}

.checkbox-box {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.checkbox-box::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    opacity: 0;
    transition: all 0.15s ease;
}

.checkbox-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.2s ease;
}

.size-quick-actions {
    display: flex;
    gap: 1rem;
    margin-top: 0.75rem;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}

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

/* Background Options */
.background-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

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

.bg-option:hover {
    border-color: var(--primary-light);
}

.bg-option.active {
    border-color: var(--primary);
    background: var(--primary-light);
}

.bg-option input[type="radio"] {
    display: none;
}

.bg-preview {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.bg-preview.transparent-bg {
    background: 
        linear-gradient(45deg, #ccc 25%, transparent 25%),
        linear-gradient(-45deg, #ccc 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #ccc 75%),
        linear-gradient(-45deg, transparent 75%, #ccc 75%);
    background-size: 10px 10px;
    background-position: 0 0, 0 5px, 5px -5px, -5px 0px;
}

.bg-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.color-input {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 0;
}

/* Slider */
.slider-wrapper {
    padding: 0 0.25rem;
}

.slider-input {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border);
    border-radius: var(--radius-full);
    outline: none;
    cursor: pointer;
}

.slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-full);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: transform 0.15s ease;
}

.slider-input::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.slider-input::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-full);
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-md);
}

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

/* Action Bar */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #fefce8 0%, #fef9e7 100%);
    border-top: 1px solid var(--border);
}

.action-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.action-buttons {
    display: flex;
    gap: 0.75rem;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    box-shadow: var(--shadow-md), 0 0 20px rgba(245, 158, 11, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(245, 158, 11, 0.4);
}

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

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

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

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

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn svg,
.btn i {
    flex-shrink: 0;
}

/* Code Section */
.code-section {
    padding: 1.5rem 2rem;
    background: var(--bg);
    border-top: 1px solid var(--border);
}

.code-header {
    margin-bottom: 1rem;
}

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

.code-header h4 svg,
.code-header h4 i {
    color: var(--primary);
}

.code-items {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.code-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.code-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.code-item code {
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.85rem;
    color: var(--primary-dark);
    background: var(--primary-light);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}

.copy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.copy-btn.copied {
    background: var(--success-light);
    color: var(--success);
}

/* Error Message */
.error-message {
    margin: 1rem 2rem;
    padding: 1rem 1.5rem;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-left: 4px solid var(--danger);
    border-radius: var(--radius-md);
    color: var(--danger);
    font-weight: 500;
}

/* Emoji Library Callout */
.emoji-library-callout {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, var(--primary-light) 0%, #fef9e7 100%);
    border-radius: var(--radius-xl);
    border: 1px solid var(--primary);
    box-shadow: var(--shadow-md), 0 0 20px rgba(245, 158, 11, 0.15);
}

.callout-icon {
    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;
    flex-shrink: 0;
}

.callout-content {
    flex: 1;
}

.callout-content h3 {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
    color: var(--text);
}

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

.emoji-library-callout .btn {
    flex-shrink: 0;
    white-space: nowrap;
}

/* 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;
}

.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.featured {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border-color: var(--primary);
    font-weight: 600;
}

.related-link.featured:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* 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);
}

.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;
}

/* Format Explanations */
.format-explanations {
    display: grid;
    gap: 1rem;
}

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

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

.format-tag.twemoji {
    background: linear-gradient(135deg, #1DA1F2, #0d8ecf);
}

.format-tag.system {
    background: linear-gradient(135deg, #6B7280, #4B5563);
}

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

/* 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,
.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) {
    .editor-grid {
        grid-template-columns: 1fr;
    }
    
    .preview-panel {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
}

@media (max-width: 768px) {
    .tool-container {
        padding: 1rem;
    }
    
    .tool-icon-wrapper {
        width: 48px;
        height: 48px;
    }
    
    .tool-icon-wrapper svg,
    .tool-icon-wrapper i {
        width: 24px;
        height: 24px;
    }
    
    .emoji-section {
        padding: 1.5rem;
    }
    
    .source-toggle {
        flex-direction: column;
    }
    
    .category-tabs {
        gap: 0.125rem;
    }
    
    .category-tab {
        min-width: 60px;
        padding: 0.5rem 0.75rem;
    }
    
    .preview-panel,
    .controls-panel {
        padding: 1.5rem;
    }
    
    .size-checkboxes {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .background-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .action-bar {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .action-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
    }
    
    .related-tools {
        flex-direction: column;
        text-align: center;
    }
    
    .related-links {
        justify-content: center;
    }
    
    .emoji-library-callout {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .emoji-library-callout .btn {
        width: 100%;
    }
    
    .code-items {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .tool-title {
        font-size: 1.5rem;
    }
    
    .emoji-grid {
        grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    }
    
    .emoji-btn {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .selected-emoji-bar {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .selected-emoji-display {
        flex-direction: column;
    }
    
    .steps-list li {
        padding-left: 3rem;
    }
    
    .format-explain {
        flex-direction: column;
    }
}

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

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

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