/* Favicon Converter - Light Theme */
:root {
    --bg: #f8f9fa;
    --bg-white: #ffffff;
    --text: #1a1a1a;
    --text-secondary: #555;
    --text-muted: #888;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: rgba(249, 115, 22, 0.1);
    --success: #22c55e;
    --border: #e5e5e5;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
}

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

/* Header */
.header { background: var(--bg-white); border-bottom: 1px solid var(--border); padding: 14px 20px; position: sticky; top: 0; z-index: 100; }
.header__inner { display: flex; align-items: center; justify-content: space-between; max-width: 900px; margin: 0 auto; }
.back-btn { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: #f5f5f5; border-radius: 10px; color: #333; margin-right: 12px; transition: all 0.2s; text-decoration: none; }
.back-btn:hover { background: var(--primary); color: white; }
.back-btn svg { width: 20px; height: 20px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-size: 20px; font-weight: 700; }
.logo__icon { width: 28px; height: 28px; color: var(--primary); }
.nav { display: flex; gap: 8px; }
.nav__link { padding: 8px 16px; font-size: 14px; font-weight: 500; color: var(--text-secondary); text-decoration: none; border-radius: 8px; transition: all 0.2s; }
.nav__link:hover { background: var(--primary-light); color: var(--primary); }
.nav__link--active { background: var(--primary); color: white; }

/* Main */
.main { padding: 40px 0; min-height: calc(100vh - 140px); }

/* Steps */
.step { display: none; }
.step.active { display: block; }

/* Upload Box */
.upload-box {
    max-width: 550px;
    margin: 0 auto;
    text-align: center;
    background: var(--bg-white);
    padding: 48px 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.upload-icon { margin-bottom: 20px; }
.upload-icon svg { width: 72px; height: 72px; color: var(--primary); }

.upload-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
}

.upload-desc {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 28px;
    line-height: 1.6;
}

.dropzone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all 0.3s;
    background: var(--bg);
}

.dropzone:hover, .dropzone.drag-over {
    border-color: var(--primary);
    background: var(--primary-light);
}

.upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: var(--primary);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.upload-btn:hover { background: var(--primary-hover); transform: translateY(-2px); }
.upload-btn svg { width: 20px; height: 20px; }

.upload-hint { margin-top: 14px; font-size: 14px; color: var(--text-muted); }
.upload-formats { margin-top: 6px; font-size: 12px; color: var(--text-muted); opacity: 0.7; }

.tip-box {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    padding: 10px 18px;
    background: #fef3c7;
    border-radius: 50px;
    font-size: 13px;
    color: #92400e;
}

.tip-icon { font-size: 16px; }

.privacy-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 10px 18px;
    background: #dcfce7;
    border-radius: 50px;
    font-size: 13px;
    color: #166534;
}

.privacy-badge svg { width: 16px; height: 16px; }

/* Preview Container */
.preview-container {
    background: var(--bg-white);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 28px;
}

.preview-grid {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 24px;
    margin-bottom: 28px;
}

/* Source Panel */
.source-panel {
    text-align: center;
}

.panel-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.source-image-box {
    width: 160px;
    height: 160px;
    margin: 0 auto;
    background: repeating-conic-gradient(#f0f0f0 0% 25%, #fff 0% 50%) 50% / 16px 16px;
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border);
}

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

.image-info {
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-muted);
}

/* Sizes Panel */
.sizes-panel { grid-column: 2; }

.sizes-grid {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

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

.size-item canvas {
    background: repeating-conic-gradient(#f0f0f0 0% 25%, #fff 0% 50%) 50% / 8px 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
    image-rendering: pixelated;
}

.size-item span {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
}

/* Browser Panel */
.browser-panel {
    grid-column: 1 / -1;
    margin-top: 16px;
}

.browser-mockup {
    background: #f1f3f4;
    border-radius: 8px;
    overflow: hidden;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.browser-bar {
    background: #dee1e6;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.browser-dots {
    display: flex;
    gap: 6px;
}

.browser-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #c0c5cc;
}

.browser-tabs {
    display: flex;
    gap: 2px;
    flex: 1;
}

.browser-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #e8eaed;
    border-radius: 6px 6px 0 0;
    font-size: 12px;
    color: #5f6368;
}

.browser-tab.active {
    background: var(--bg-white);
    color: var(--text);
}

.browser-tab canvas {
    border-radius: 2px;
}

.browser-content {
    background: var(--bg-white);
    padding: 10px 16px;
}

.mock-address-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f1f3f4;
    border-radius: 20px;
    font-size: 13px;
    color: #5f6368;
}

.mock-address-bar canvas { border-radius: 2px; }

/* Settings Box */
.settings-box {
    background: var(--bg);
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 24px;
}

.settings-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.setting-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.setting-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.bg-options { display: flex; gap: 8px; }

.bg-btn {
    width: 36px;
    height: 36px;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    padding: 4px;
    background: var(--bg-white);
    transition: all 0.2s;
}

.bg-btn:hover, .bg-btn.active { border-color: var(--primary); }

.bg-btn span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 4px;
}

.transparent-bg {
    background: repeating-conic-gradient(#ddd 0% 25%, #fff 0% 50%) 50% / 8px 8px;
}

.bg-btn--custom {
    position: relative;
    overflow: hidden;
}

.bg-btn--custom input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.bg-btn--custom svg { width: 16px; height: 16px; color: var(--text-muted); }

/* Action Buttons */
.action-buttons { text-align: center; margin-bottom: 20px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-family: inherit;
}

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

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

.btn--large { padding: 16px 32px; font-size: 16px; }
.btn--small { padding: 10px 16px; font-size: 13px; }

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

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

.secondary-downloads {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.reset-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    margin-top: 8px;
}

.reset-btn:hover { color: var(--primary); }
.reset-btn svg { width: 16px; height: 16px; }

/* Usage Box */
.usage-box {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    padding: 20px;
    border-radius: var(--radius);
    margin-top: 28px;
}

.usage-box h3 {
    font-size: 14px;
    font-weight: 600;
    color: #166534;
    margin-bottom: 12px;
}

.code-block {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #166534;
    padding: 12px 16px;
    border-radius: 6px;
}

.code-block code {
    flex: 1;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 13px;
    color: #fff;
    word-break: break-all;
}

.copy-btn {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #166534;
    background: #bbf7d0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.copy-btn:hover { background: #86efac; }

.usage-note {
    margin-top: 12px;
    font-size: 13px;
    color: #166534;
}

.usage-note code {
    background: #bbf7d0;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Monaco', 'Consolas', monospace;
}

/* Footer */
.footer {
    text-align: center;
    padding: 24px;
    font-size: 14px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 700px) {
    .preview-grid {
        grid-template-columns: 1fr;
    }
    
    .source-panel { order: 1; }
    .sizes-panel { order: 2; grid-column: 1; }
    .browser-panel { order: 3; grid-column: 1; }
    
    .nav { display: none; }
    
    .upload-box { padding: 32px 20px; }
    .preview-container { padding: 20px; }
    
    .sizes-grid { gap: 12px; }
    
    .setting-row { flex-direction: column; align-items: flex-start; gap: 10px; }
    
    .secondary-downloads { flex-direction: column; }
    .secondary-downloads .btn { width: 100%; }
}

