/* ============================================
   Favicon Package Generator - Styles
   Theme: Package/Archive (Purple-Blue gradient)
   ============================================ */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    /* Tool-specific theme colors */
    --tool-primary: #8b5cf6;
    --tool-primary-dark: #7c3aed;
    --tool-primary-light: #a78bfa;
    --tool-secondary: #3b82f6;
    --tool-gradient: linear-gradient(135deg, #8b5cf6, #3b82f6);
    --tool-gradient-hover: linear-gradient(135deg, #7c3aed, #2563eb);
    
    /* Status colors */
    --success-green: #10b981;
    --success-bg: #d1fae5;
    --error-red: #ef4444;
    --error-bg: #fee2e2;
    --warning-yellow: #f59e0b;
    --warning-bg: #fef3c7;
    
    /* Light mode specific */
    --panel-bg: #ffffff;
    --panel-border: #e5e7eb;
    --panel-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --input-bg: #f9fafb;
    --input-border: #d1d5db;
    --input-focus: #8b5cf6;
    --code-bg: #1f2937;
    --code-text: #e5e7eb;
}

[data-theme="dark"] {
    --panel-bg: #1e293b;
    --panel-border: #334155;
    --panel-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --input-bg: #334155;
    --input-border: #475569;
    --input-focus: #a78bfa;
    --code-bg: #0f172a;
    --code-text: #e2e8f0;
    
    --success-bg: rgba(16, 185, 129, 0.15);
    --error-bg: rgba(239, 68, 68, 0.15);
    --warning-bg: rgba(245, 158, 11, 0.15);
}

/* ============================================
   TOOL CONTAINER
   ============================================ */
.tool-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 15px 40px;
}

/* ============================================
   HEADER
   ============================================ */
.tool-header {
    text-align: center;
    margin-bottom: 30px;
}

.tool-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 12px;
}

.tool-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.tool-icon-wrapper.package-theme {
    background: var(--tool-gradient);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

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

.tool-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

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

/* ============================================
   MAIN AREA
   ============================================ */
.tool-main {
    background: var(--panel-bg);
    border-radius: 16px;
    box-shadow: var(--panel-shadow);
    padding: 30px;
    border: 1px solid var(--panel-border);
    transition: background-color 0.25s, border-color 0.25s;
}

/* ============================================
   UPLOAD SECTION
   ============================================ */
.upload-section {
    margin-bottom: 0;
}

.upload-area {
    border: 2px dashed var(--tool-primary-light);
    border-radius: 12px;
    padding: 50px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--input-bg);
}

.upload-area:hover {
    border-color: var(--tool-primary);
    background: rgba(139, 92, 246, 0.05);
}

.upload-area.drag-over {
    border-color: var(--tool-primary);
    background: rgba(139, 92, 246, 0.1);
    transform: scale(1.01);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.upload-icon {
    color: var(--tool-primary);
    margin-bottom: 5px;
}

.upload-lucide-icon {
    width: 64px;
    height: 64px;
}

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

.upload-subtitle {
    color: var(--text-muted);
    margin: 0;
}

.upload-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 10px;
}

.hint-icon {
    width: 14px;
    height: 14px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.25s ease;
    text-decoration: none;
}

.btn-icon {
    width: 18px;
    height: 18px;
}

.btn-icon-sm {
    width: 16px;
    height: 16px;
}

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

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

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

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

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

.btn-text {
    background: transparent;
    color: var(--tool-primary);
    padding: 8px 12px;
}

.btn-text:hover {
    background: rgba(139, 92, 246, 0.1);
}

.btn-browse {
    margin-top: 5px;
}

.btn-generate {
    padding: 14px 32px;
    font-size: 1.1rem;
}

.btn-download {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 18px 40px;
    font-size: 1.2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-download:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    color: white;
}

.download-size {
    display: block;
    font-size: 0.85rem;
    font-weight: 400;
    opacity: 0.9;
    margin-top: 4px;
}

/* ============================================
   EDITOR SECTION
   ============================================ */
.editor-section {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Panel styles */
.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

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

.panel-icon {
    width: 20px;
    height: 20px;
    color: var(--tool-primary);
}

/* Source Preview Panel */
.source-preview-panel {
    background: var(--input-bg);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--panel-border);
}

.source-preview-content {
    display: flex;
    gap: 20px;
    align-items: center;
}

.source-image-wrapper {
    width: 120px;
    height: 120px;
    background: repeating-conic-gradient(var(--panel-border) 0% 25%, transparent 0% 50%) 50% / 16px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.source-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.source-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.info-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
}

.info-value {
    color: var(--text-primary);
    font-weight: 500;
}

/* Preview Panel */
.preview-panel {
    background: var(--input-bg);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--panel-border);
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.preview-card {
    text-align: center;
}

.preview-mock {
    background: var(--panel-bg);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    border: 1px solid var(--panel-border);
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Browser tab mock */
.browser-tab .mock-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.mock-dots {
    display: flex;
    gap: 4px;
}

.mock-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--panel-border);
}

.mock-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--input-bg);
    padding: 6px 10px;
    border-radius: 6px 6px 0 0;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.mock-tab img {
    width: 16px;
    height: 16px;
}

/* Bookmark mock */
.mock-bookmark {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--input-bg);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.mock-bookmark img {
    width: 20px;
    height: 20px;
}

/* iOS mock */
.mock-ios-icon {
    width: 60px;
    height: 60px;
    border-radius: 13px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.mock-ios-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Android mock */
.mock-android-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.mock-android-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Package Contents */
.package-contents {
    background: var(--input-bg);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--panel-border);
}

.contents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.content-group h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 12px 0;
}

.group-icon {
    width: 18px;
    height: 18px;
    color: var(--tool-primary);
}

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

.file-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.file-icon {
    width: 14px;
    height: 14px;
    color: var(--text-muted);
}

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

/* Options Panel */
.options-panel {
    background: var(--input-bg);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--panel-border);
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.option-card {
    background: var(--panel-bg);
    border-radius: 10px;
    padding: 16px;
    border: 1px solid var(--panel-border);
}

.option-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.option-header h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.option-icon {
    width: 18px;
    height: 18px;
    color: var(--tool-primary);
}

.option-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0 0 12px 0;
}

/* Color Options */
.color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.color-option {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

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

.color-preview {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 2px solid var(--panel-border);
    transition: border-color 0.2s;
}

.color-preview.white {
    background: #ffffff;
}

.color-preview.transparent-check {
    background: repeating-conic-gradient(var(--panel-border) 0% 25%, transparent 0% 50%) 50% / 8px 8px;
}

.color-option input:checked + .color-preview {
    border-color: var(--tool-primary);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

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

.color-picker {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
}

/* Text Input */
.text-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--input-border);
    border-radius: 6px;
    font-size: 0.95rem;
    background: var(--input-bg);
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.text-input:focus {
    outline: none;
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

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

/* Theme Color Input */
.theme-color-input {
    display: flex;
    gap: 10px;
}

.color-input {
    width: 44px;
    height: 38px;
    border: 1px solid var(--input-border);
    border-radius: 6px;
    cursor: pointer;
    padding: 2px;
    background: var(--input-bg);
}

.hex-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--input-border);
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: monospace;
    background: var(--input-bg);
    color: var(--text-primary);
    text-transform: uppercase;
}

.hex-input:focus {
    outline: none;
    border-color: var(--input-focus);
}

/* Radio Options */
.radio-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.radio-option:hover {
    background: var(--input-bg);
}

.radio-option input {
    display: none;
}

.radio-mark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--input-border);
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    transition: border-color 0.2s;
}

.radio-option input:checked + .radio-mark {
    border-color: var(--tool-primary);
}

.radio-option input:checked + .radio-mark::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: var(--tool-primary);
    border-radius: 50%;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.radio-icon {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

/* Action Bar */
.action-bar {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding-top: 10px;
}

/* Progress */
.progress-container {
    margin-top: 20px;
    text-align: center;
}

.progress-bar {
    height: 8px;
    background: var(--input-bg);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress {
    height: 100%;
    background: var(--tool-gradient);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ============================================
   RESULTS SECTION
   ============================================ */
.results-section {
    background: var(--panel-bg);
    border-radius: 16px;
    box-shadow: var(--panel-shadow);
    padding: 40px 30px;
    border: 1px solid var(--panel-border);
    margin-top: 25px;
    text-align: center;
    transition: background-color 0.25s, border-color 0.25s;
}

.results-header {
    margin-bottom: 30px;
}

.results-icon {
    margin-bottom: 15px;
}

.success-icon {
    width: 64px;
    height: 64px;
    color: var(--success-green);
}

.results-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 10px 0;
}

.results-header p {
    color: var(--text-secondary);
    margin: 0;
}

.download-area {
    margin-bottom: 30px;
}

/* HTML Code Panel */
.html-code-panel {
    text-align: left;
    background: var(--input-bg);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--panel-border);
    margin-bottom: 25px;
}

.code-instruction {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0 0 12px 0;
}

.code-instruction code {
    background: var(--panel-border);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
}

.code-block {
    background: var(--code-bg);
    color: var(--code-text);
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
}

.btn-copy {
    font-size: 0.85rem;
}

.results-actions {
    padding-top: 10px;
}

/* ============================================
   ERROR MESSAGE
   ============================================ */
.error-message {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--error-bg);
    color: var(--error-red);
    padding: 14px 18px;
    border-radius: 10px;
    margin-top: 20px;
    position: relative;
}

.error-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.error-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--error-red);
    opacity: 0.7;
}

.error-close:hover {
    opacity: 1;
}

.close-icon {
    width: 16px;
    height: 16px;
}

/* ============================================
   RELATED TOOLS
   ============================================ */
.related-tools {
    margin-top: 30px;
    padding: 20px;
    background: var(--panel-bg);
    border-radius: 12px;
    border: 1px solid var(--panel-border);
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    transition: background-color 0.25s, border-color 0.25s;
}

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

.related-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.related-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--input-bg);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
}

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

.link-icon {
    width: 16px;
    height: 16px;
}

/* ============================================
   INFO SECTIONS
   ============================================ */
.info-sections {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.info-card {
    background: var(--panel-bg);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--panel-shadow);
    border: 1px solid var(--panel-border);
    transition: background-color 0.25s, border-color 0.25s;
}

.info-card h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 20px 0;
}

.info-icon {
    width: 24px;
    height: 24px;
    color: var(--tool-primary);
}

/* Included Grid */
.included-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.included-item {
    padding: 20px;
    background: var(--input-bg);
    border-radius: 12px;
    border: 1px solid var(--panel-border);
}

.included-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.included-header h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.included-icon {
    width: 24px;
    height: 24px;
}

.included-icon.browser { color: #3b82f6; }
.included-icon.apple { color: #6b7280; }
.included-icon.android { color: #10b981; }
.included-icon.microsoft { color: #0ea5e9; }

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

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

.steps-list li {
    position: relative;
    padding-left: 50px;
    margin-bottom: 18px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.steps-list li:last-child {
    margin-bottom: 0;
}

.steps-list li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 32px;
    height: 32px;
    background: var(--tool-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.steps-list li strong {
    color: var(--text-primary);
}

.steps-list li code {
    background: var(--input-bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--tool-primary);
}

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

.tip-item {
    display: flex;
    gap: 15px;
}

.tip-icon {
    width: 44px;
    height: 44px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tip-lucide-icon {
    width: 24px;
    height: 24px;
    color: var(--tool-primary);
}

.tip-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 6px 0;
}

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

/* FAQ */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

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

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

.faq-question:hover {
    background: var(--panel-border);
}

.faq-chevron {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    transition: transform 0.3s;
}

.faq-item.open .faq-chevron {
    transform: rotate(180deg);
}

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

.faq-item.open .faq-answer {
    max-height: 300px;
    padding: 0 20px 16px;
}

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

.faq-answer code {
    background: var(--input-bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
}

.faq-answer a {
    color: var(--tool-primary);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .tool-container {
        padding: 15px 10px 30px;
    }
    
    .tool-title {
        font-size: 1.5rem;
    }
    
    .tool-description {
        font-size: 1rem;
    }
    
    .tool-main,
    .results-section,
    .info-card {
        padding: 20px 15px;
        border-radius: 12px;
    }
    
    .upload-area {
        padding: 35px 20px;
    }
    
    .upload-lucide-icon {
        width: 48px;
        height: 48px;
    }
    
    .source-preview-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .source-image-wrapper {
        width: 100px;
        height: 100px;
    }
    
    .preview-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contents-grid,
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .action-bar {
        flex-direction: column;
    }
    
    .action-bar .btn {
        width: 100%;
    }
    
    .btn-download {
        padding: 16px 30px;
        font-size: 1.1rem;
    }
    
    .related-tools {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .included-grid,
    .tips-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .tool-title-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .preview-grid {
        grid-template-columns: 1fr;
    }
    
    .theme-color-input {
        flex-direction: column;
    }
    
    .color-input {
        width: 100%;
        height: 44px;
    }
    
    .steps-list li {
        padding-left: 45px;
    }
    
    .steps-list li::before {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
}

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

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

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