/* Favicon Generator - Complete Styling */

.tool-page {
    padding-top: 0;
}

.breadcrumb {
    padding: 20px 0;
    font-size: 14px;
    color: #666;
}

.breadcrumb a {
    color: #666;
    transition: all 0.3s;
}

.breadcrumb a:hover {
    color: #7c3aed;
}

.breadcrumb .separator {
    margin: 0 10px;
    color: #ddd;
}

.breadcrumb .current {
    color: #333;
    font-weight: 600;
}

.tool-header {
    background: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.tool-header::before {
    content: '🔖';
    position: absolute;
    font-size: 300px;
    opacity: 0.05;
    top: -50px;
    right: -50px;
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.tool-header-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.tool-icon-large {
    font-size: 72px;
    margin-bottom: 20px;
    animation: bounce 2s ease-in-out infinite;
}

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

.tool-header h1 {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.tool-subtitle {
    font-size: 20px;
    opacity: 0.95;
    margin-bottom: 25px;
    line-height: 1.6;
}

.tool-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 16px;
}

.meta-separator {
    opacity: 0.5;
}

.tool-content {
    padding: 60px 20px;
    background: #f8f9fa;
}

.favicon-root {
    max-width: 1200px;
    margin: 0 auto;
}

/* Upload Section */
.upload-section {
    margin-bottom: 30px;
}

.upload-area {
    background: white;
    border: 3px dashed #cbd5e1;
    border-radius: 20px;
    padding: 60px 30px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #7c3aed;
    background: #f5f3ff;
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(124, 58, 237, 0.15);
}

.upload-area.drag-over {
    border-color: #7c3aed;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    transform: scale(1.02);
}

.upload-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

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

.upload-area h3 {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 10px;
}

.upload-area p {
    color: #6b7280;
    margin-bottom: 25px;
    font-size: 15px;
}

.upload-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Editor Layout */
.editor-section {
    display: none;
}

.editor-grid {
    display: grid;
    grid-template-columns: minmax(260px, 340px) 1fr;
    gap: 25px;
    align-items: start;
}

/* Preview Card (left) */
.preview-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 2px solid rgba(124, 58, 237, 0.1);
    position: sticky;
    top: 20px;
}

.preview-card h3 {
    color: #7c3aed;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
}

.crop-frame-wrapper {
    position: relative;
    width: 100%;
    max-width: 260px;
    aspect-ratio: 1 / 1;
    margin: 0 auto 20px;
    background: repeating-conic-gradient(#e5e7eb 0% 25%, #f3f4f6 0% 50%) 50% / 16px 16px;
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid #e5e7eb;
    cursor: grab;
    touch-action: none;
}

.crop-frame-wrapper.dragging {
    cursor: grabbing;
}

#cropCanvas {
    display: block;
    width: 100%;
    height: 100%;
}

.crop-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.crop-control-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.crop-control-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 700;
    color: #1f2937;
}

.crop-control-label span.value {
    color: #7c3aed;
}

.rotate-btn-row {
    display: flex;
    gap: 10px;
}

.icon-btn {
    flex: 1;
    padding: 10px;
    border-radius: 10px;
    border: 2px solid #e5e7eb;
    background: white;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
}

.icon-btn:hover {
    border-color: #7c3aed;
    background: #f5f3ff;
}

/* Browser tab preview mockup */
.tab-preview-wrap {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid #f3f4f6;
}

.tab-preview-label {
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 10px;
}

.browser-mockup {
    background: #e2e8f0;
    border-radius: 10px 10px 6px 6px;
    overflow: hidden;
    font-family: -apple-system, sans-serif;
}

.browser-mockup-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    background: #cbd5e1;
}

.browser-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94a3b8;
}

.browser-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    background: white;
    border-radius: 6px 6px 0 0;
    padding: 6px 10px;
    margin-top: 6px;
    max-width: 140px;
}

.browser-tab img {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.browser-tab span {
    font-size: 11px;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.browser-mockup-address {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 8px 12px;
}

.browser-mockup-address img {
    width: 14px;
    height: 14px;
}

.browser-mockup-address .addr-pill {
    flex: 1;
    background: #f1f5f9;
    border-radius: 20px;
    padding: 5px 10px;
    font-size: 11px;
    color: #64748b;
}

/* Panel (right) */
.panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.panel-section {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 2px solid rgba(124, 58, 237, 0.1);
    overflow: hidden;
}

.panel-section-header {
    padding: 20px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}

.panel-section-header h3 {
    color: #7c3aed;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-chevron {
    transition: transform 0.3s;
    color: #9ca3af;
}

.panel-section.collapsed .panel-chevron {
    transform: rotate(-90deg);
}

.panel-section-body {
    padding: 0 25px 25px;
}

.panel-section.collapsed .panel-section-body {
    display: none;
}

/* Form controls */
.control-group {
    margin-bottom: 20px;
}

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

.control-label {
    display: block;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
    font-size: 14px;
}

.control-hint {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 500;
    margin-left: 6px;
}

.control-input {
    width: 100%;
    padding: 11px 14px;
    border-radius: 10px;
    border: 2px solid rgba(0,0,0,0.1);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
}

.control-input:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
}

.input-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.color-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-input-row input[type="color"] {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

.color-input-row input[type="text"] {
    flex: 1;
}

.slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #e5e7eb;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
    border: 3px solid #7c3aed;
    transition: all 0.3s;
}

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

.slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: 3px solid #7c3aed;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
}

/* Toggle switch */
.switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #cbd5e1;
    border-radius: 24px;
    transition: 0.3s;
}

.switch-slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.switch input:checked + .switch-slider {
    background: #7c3aed;
}

.switch input:checked + .switch-slider::before {
    transform: translateX(18px);
}

.bg-enable-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid #f3f4f6;
}

.bg-enable-row span {
    font-weight: 700;
    color: #1f2937;
    font-size: 14px;
}

.bg-controls {
    display: none;
}

.bg-controls.active {
    display: block;
}

.swatch-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.swatch {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 3px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.2s;
}

.swatch:hover {
    transform: translateY(-2px);
}

.swatch.selected {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.swatch-custom {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0;
}

.swatch-custom input[type="color"] {
    width: 150%;
    height: 150%;
    border: none;
    cursor: pointer;
}

.apple-note {
    font-size: 12px;
    color: #6b7280;
    margin-top: 14px;
    line-height: 1.6;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

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

.btn-primary {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-ghost {
    background: white;
    border: 2px solid rgba(0,0,0,0.1);
    color: #1f2937;
}

.btn-ghost:hover {
    border-color: #7c3aed;
    color: #7c3aed;
}

.btn-large {
    width: 100%;
    padding: 16px 24px;
    font-size: 15px;
}

.btn-sm {
    padding: 7px 14px;
    font-size: 13px;
}

/* Individual sizes list */
.sizes-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
}

.size-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 14px;
}

.size-row-thumb {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: repeating-conic-gradient(#e5e7eb 0% 25%, #f3f4f6 0% 50%) 50% / 8px 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.size-row-thumb img {
    max-width: 100%;
    max-height: 100%;
}

.size-row-info {
    flex: 1;
    min-width: 0;
}

.size-row-name {
    font-weight: 700;
    font-size: 13px;
    color: #1f2937;
}

.size-row-dim {
    font-size: 12px;
    color: #6b7280;
}

/* HTML snippet box */
.snippet-box {
    position: relative;
    background: #1e293b;
    border-radius: 12px;
    padding: 16px;
    margin-top: 6px;
}

.snippet-box pre {
    color: #e2e8f0;
    font-size: 12px;
    line-height: 1.7;
    overflow-x: auto;
    white-space: pre;
    font-family: 'Courier New', monospace;
    margin: 0;
}

.snippet-copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.12);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.snippet-copy-btn:hover {
    background: rgba(255,255,255,0.22);
}

/* Info Box */
.info-box {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 5px solid #f59e0b;
    padding: 30px;
    border-radius: 15px;
    margin-top: 30px;
}

.info-box h4 {
    color: #92400e;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 700;
}

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

.info-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    line-height: 1.7;
    font-size: 14px;
    color: #555;
    border: 2px solid rgba(245, 158, 11, 0.2);
}

.info-item strong {
    color: #92400e;
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
}

/* SEO Content */
.seo-content {
    padding: 80px 20px;
    background: white;
}

.content-article {
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
}

.content-article h2 {
    font-size: 32px;
    font-weight: 800;
    margin-top: 40px;
    margin-bottom: 20px;
    color: #333;
}

.content-article h2:first-child {
    margin-top: 0;
}

.content-article p {
    margin-bottom: 20px;
    color: #666;
    font-size: 16px;
}

.content-article strong {
    color: #333;
    font-weight: 700;
}

/* Related Tools */
.related-tools {
    max-width: 900px;
    margin: 60px auto 0;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 15px;
}

.related-tools h3 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 30px;
    text-align: center;
    color: #7c3aed;
}

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

.related-tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 25px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s;
    text-align: center;
    text-decoration: none;
}

.related-tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #7c3aed;
}

.related-tool-card .tool-icon {
    font-size: 42px;
}

.related-tool-card .tool-name {
    font-weight: 700;
    color: #333;
    font-size: 16px;
}

/* Notification Toast */
.notification-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 15px 22px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    font-size: 15px;
    font-weight: 600;
    z-index: 10000;
    animation: slideInUp 0.3s ease-out;
}

.notification-toast.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

@keyframes slideInUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

    .preview-card {
        position: static;
    }
}

@media (max-width: 768px) {
    .tool-header h1 {
        font-size: 32px;
    }

    .tool-subtitle {
        font-size: 16px;
    }

    .tool-icon-large {
        font-size: 52px;
    }

    .upload-area {
        padding: 40px 20px;
    }

    .upload-buttons {
        flex-direction: column;
    }

    .upload-buttons .btn {
        width: 100%;
    }

    .input-row-2 {
        grid-template-columns: 1fr;
    }

    .content-article h2 {
        font-size: 26px;
    }
}

@media (max-width: 520px) {
    .tool-header {
        padding: 40px 20px;
    }

    .tool-header h1 {
        font-size: 28px;
    }

    .tool-meta {
        flex-direction: column;
        gap: 8px;
    }

    .meta-separator {
        display: none;
    }

    .notification-toast {
        bottom: 20px;
        right: 20px;
        left: 20px;
        font-size: 14px;
    }
}

html {
    scroll-behavior: smooth;
}
