/* SVG Code to Image Converter - 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: #db2777;
}

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

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

.tool-header {
    background: linear-gradient(135deg, #f472b6 0%, #db2777 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: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

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

.svg-code-root {
    max-width: 1100px;
    margin: 0 auto;
}

/* Converter Grid (code + preview) */
.converter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 25px;
    align-items: stretch;
}

.code-card,
.preview-card,
.settings-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 2px solid rgba(219, 39, 119, 0.1);
}

.code-card,
.preview-card {
    display: flex;
    flex-direction: column;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 12px;
}

.card-header h3,
.settings-card h3 {
    color: #db2777;
    font-size: 20px;
    font-weight: 700;
}

.card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Code textarea */
.code-input {
    width: 100%;
    flex: 1;
    min-height: 360px;
    resize: vertical;
    background: #0f172a;
    color: #e2e8f0;
    border: 2px solid #1e293b;
    border-radius: 12px;
    padding: 16px;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 13px;
    line-height: 1.6;
    transition: all 0.3s;
    box-sizing: border-box;
}

.code-input::placeholder {
    color: #64748b;
}

.code-input:focus {
    outline: none;
    border-color: #db2777;
    box-shadow: 0 0 0 4px rgba(219, 39, 119, 0.15);
}

.code-input.drag-over {
    border-color: #db2777;
    border-style: dashed;
    background: #1e1b2e;
}

.code-status {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
}

.code-status.idle {
    background: #f9fafb;
    color: #6b7280;
}

.code-status.ok {
    background: #ecfdf5;
    color: #059669;
}

.code-status.error {
    background: #fef2f2;
    color: #dc2626;
}

/* Preview */
.preview-bg-switch {
    display: flex;
    gap: 6px;
}

.bg-chip {
    width: 36px;
    height: 32px;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    background: white;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.bg-chip:hover {
    border-color: #db2777;
}

.bg-chip.active {
    border-color: #db2777;
    background: #fdf2f8;
}

.preview-box {
    flex: 1;
    min-height: 360px;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
    overflow: hidden;
    transition: background 0.3s;
}

.preview-box.checker {
    background: repeating-conic-gradient(#e5e7eb 0% 25%, #f9fafb 0% 50%) 50% / 20px 20px;
}

.preview-box.light {
    background: #ffffff;
}

.preview-box.dark {
    background: #111827;
}

.preview-box img {
    width: 100%;
    height: 100%;
    max-height: 320px;
    object-fit: contain;
}

.preview-empty {
    text-align: center;
    color: #9ca3af;
}

.preview-empty span {
    font-size: 56px;
    display: block;
    margin-bottom: 10px;
    animation: float 3s ease-in-out infinite;
}

.preview-box.dark .preview-empty {
    color: #6b7280;
}

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

.preview-meta {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    background: #fdf2f8;
    color: #be185d;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

/* Settings */
.settings-card {
    margin-bottom: 25px;
}

.settings-card h3 {
    margin-bottom: 20px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 22px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.control-value {
    float: right;
    color: #db2777;
    font-weight: 700;
}

.control-hint {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

.control-hint.warn {
    color: #b45309;
    font-weight: 600;
}

.control-select,
.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;
    background: #f9fafb;
    transition: all 0.3s;
    box-sizing: border-box;
}

.control-select {
    cursor: pointer;
}

.control-select:focus,
.control-input:focus {
    outline: none;
    border-color: #db2777;
    box-shadow: 0 0 0 4px rgba(219, 39, 119, 0.1);
    background: white;
}

.size-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.size-chip {
    padding: 5px 10px;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    background: white;
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
}

.size-chip:hover {
    border-color: #db2777;
    color: #db2777;
}

.size-chip.active {
    border-color: #db2777;
    background: #fdf2f8;
    color: #db2777;
}

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

.color-row.disabled {
    opacity: 0.45;
}

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

.color-row input[type="color"]:disabled {
    cursor: not-allowed;
}

.color-row-text {
    font-size: 13px;
    color: #6b7280;
    font-weight: 600;
}

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.autofix-row {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #f3f4f6;
}

.autofix-row small {
    display: block;
    font-weight: 500;
    color: #6b7280;
    font-size: 12px;
    margin-top: 3px;
}

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

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

/* Slider */
.slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: linear-gradient(to right, #fbcfe8, #db2777);
    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(219, 39, 119, 0.4);
    border: 3px solid #db2777;
    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 #db2777;
    box-shadow: 0 4px 12px rgba(219, 39, 119, 0.4);
}

/* Bulk Actions */
.bulk-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.bulk-actions .btn {
    flex: 1;
    min-width: 220px;
}

#resetBtn {
    margin-bottom: 30px;
}

/* 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, #db2777 0%, #be185d 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: #db2777;
    color: #db2777;
}

.btn-large {
    padding: 16px 28px;
    font-size: 16px;
}

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

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

.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: #db2777;
}

.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: #db2777;
}

.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) {
    .converter-grid {
        grid-template-columns: 1fr;
    }

    .code-input {
        min-height: 260px;
    }

    .preview-box {
        min-height: 280px;
    }
}

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

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

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

    .card-actions {
        width: 100%;
    }

    .card-actions .btn {
        flex: 1;
    }

    .bulk-actions {
        flex-direction: column;
    }

    .bulk-actions .btn {
        width: 100%;
    }

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

    .code-card,
    .preview-card,
    .settings-card {
        padding: 18px;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

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

html {
    scroll-behavior: smooth;
}
