/* SVG Blob 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, #8b5cf6 0%, #6366f1 45%, #06b6d4 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.tool-header::before {
    content: '🫧';
    position: absolute;
    font-size: 300px;
    opacity: 0.07;
    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: 50px 20px 60px; background: #f8f9fa; }
.blob-root { max-width: 1240px; margin: 0 auto; }

/* Tabs */
.tabs { display: flex; gap: 10px; justify-content: center; margin-bottom: 28px; flex-wrap: wrap; }
.tab {
    border: 2px solid rgba(0,0,0,0.08); background: #fff; color: #374151;
    padding: 14px 30px; border-radius: 14px; font-weight: 800; font-size: 16px; cursor: pointer;
    transition: all .25s; box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}
.tab:hover { border-color: #7c3aed; color: #7c3aed; }
.tab.active { background: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%); color: #fff; border-color: transparent; box-shadow: 0 8px 22px rgba(124, 58, 237, 0.35); }

/* Layout */
.blob-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.blob-preview-col { position: sticky; top: 16px; }

.preview-card { background: #fff; border-radius: 20px; padding: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.08); }

.seed-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.seed-bar .btn-primary { flex: 1 1 140px; }
.btn-icon { padding: 12px 14px; }
.seed-field { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; color: #6b7280; margin-left: auto; }
.seed-field input { width: 110px; padding: 9px 10px; border: 2px solid #e5e7eb; border-radius: 10px; font-weight: 700; font-size: 13px; }
.seed-field input:focus { outline: none; border-color: #7c3aed; }

.svg-stage {
    border-radius: 14px; padding: 18px; min-height: 280px;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
    transition: background .2s;
}
.svg-stage svg { display: block; max-width: 100%; max-height: 60vh; width: 100%; height: auto; }
.svg-stage[data-bg="checker"] {
    background:
        linear-gradient(45deg, #eef0f3 25%, transparent 25%) 0 0 / 20px 20px,
        linear-gradient(-45deg, #eef0f3 25%, transparent 25%) 0 10px / 20px 20px,
        linear-gradient(45deg, transparent 75%, #eef0f3 75%) 10px -10px / 20px 20px,
        linear-gradient(-45deg, transparent 75%, #eef0f3 75%) -10px 0 / 20px 20px,
        #fafbfc;
}
.svg-stage[data-bg="white"] { background: #ffffff; border: 1px solid #e5e7eb; }
.svg-stage[data-bg="dark"] { background: #0f172a; }

.stage-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 12px 2px 14px; font-size: 13px; font-weight: 700; color: #374151; flex-wrap: wrap; }
.muted { color: #6b7280; font-weight: 500; }

.export-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; align-items: center; }
.export-actions .btn-success { flex: 1 1 100px; }
.scale-pick select { padding: 11px 10px; border-radius: 10px; border: 2px solid #e5e7eb; font-weight: 700; background: #fff; }

/* Control groups */
.blob-controls-col { display: flex; flex-direction: column; }
.ctl-group { background: #fff; border-radius: 16px; box-shadow: 0 6px 20px rgba(0,0,0,0.06); overflow: hidden; margin-bottom: 14px; }
.ctl-group > summary { cursor: pointer; list-style: none; padding: 16px 20px; font-weight: 800; font-size: 16px; color: #1f2937; display: flex; align-items: center; justify-content: space-between; }
.ctl-group > summary::-webkit-details-marker { display: none; }
.ctl-group > summary::after { content: '▾'; color: #9ca3af; transition: transform .2s; }
.ctl-group[open] > summary::after { transform: rotate(180deg); }
.ctl-group[open] > summary { border-bottom: 1px solid #f1f5f9; }
.ctl-body { padding: 16px 20px 20px; }

.row { margin-bottom: 14px; }
.row > label { display: block; font-size: 13px; font-weight: 700; color: #374151; margin-bottom: 6px; }
.row > label b { float: right; color: #7c3aed; font-weight: 800; }
.row input[type="range"] { width: 100%; accent-color: #7c3aed; }
.row input[type="color"] { width: 46px; height: 34px; padding: 2px; border: 2px solid #e5e7eb; border-radius: 8px; background: #fff; cursor: pointer; vertical-align: middle; }
.hint { font-size: 12px; color: #6b7280; line-height: 1.6; margin: 4px 0 12px; }

.check-row { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.check { display: inline-flex !important; align-items: center; gap: 8px; font-size: 13px !important; font-weight: 600 !important; color: #374151; cursor: pointer; margin: 0 !important; }
.check input { width: 17px; height: 17px; accent-color: #7c3aed; cursor: pointer; }
.inline-colors { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; }
.inline-colors > label { display: inline-flex !important; align-items: center; gap: 10px; margin: 0 !important; }
.inline-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }

/* Segmented */
.seg { display: flex; background: #f3f4f6; border-radius: 10px; padding: 3px; gap: 3px; flex-wrap: wrap; }
.seg button { flex: 1 1 auto; border: none; background: transparent; padding: 9px 12px; border-radius: 8px; font-weight: 700; font-size: 13px; color: #4b5563; cursor: pointer; transition: all .2s; white-space: nowrap; }
.seg button:hover { color: #7c3aed; }
.seg button.active { background: #fff; color: #7c3aed; box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
.seg-sm button { padding: 6px 10px; font-size: 12px; }

/* Palettes */
.palettes { display: flex; flex-wrap: wrap; gap: 10px; }
.palette-btn { width: 40px; height: 40px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.18); transition: transform .15s; }
.palette-btn:hover { transform: scale(1.1); }
.palette-btn.active { border-color: #111827; }

/* Wide cards */
.wide-card { background: #fff; border-radius: 20px; padding: 22px; margin-top: 24px; box-shadow: 0 10px 30px rgba(0,0,0,0.08); }
.wide-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.wide-head h3 { font-size: 20px; color: #1f2937; margin: 0; }
.wide-head h3 small { font-size: 12px; color: #6b7280; font-weight: 600; margin-left: 8px; }

.variant-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.variant {
    background: #f8fafc; border: 2px solid #eef2f7; border-radius: 14px; padding: 10px; cursor: pointer;
    aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; transition: all .2s;
}
.variant.wide { aspect-ratio: 16 / 9; }
.variant:hover { border-color: #7c3aed; transform: translateY(-3px); box-shadow: 0 10px 22px rgba(124,58,237,0.22); }
.variant svg { width: 100%; height: 100%; display: block; }

/* Code */
.code-tabs { display: flex; gap: 4px; flex-wrap: wrap; background: #f3f4f6; padding: 3px; border-radius: 10px; }
.code-tabs button { border: none; background: transparent; padding: 8px 14px; border-radius: 8px; font-weight: 700; font-size: 13px; color: #4b5563; cursor: pointer; }
.code-tabs button.active { background: #fff; color: #7c3aed; box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
.code-box {
    width: 100%; min-height: 220px; max-height: 420px; resize: vertical; box-sizing: border-box;
    background: #0f172a; color: #e2e8f0; border: none; border-radius: 12px; padding: 16px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.6;
    white-space: pre; overflow: auto;
}
.code-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: 13px; }

/* 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.4; cursor: not-allowed; transform: none; }
.btn-primary { background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 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:not(:disabled) { border-color: #7c3aed; color: #7c3aed; }
.btn-sm { padding: 8px 14px; font-size: 13px; }

/* Toast */
.blob-toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 30px); background: #111827; color: #fff; padding: 12px 22px; border-radius: 12px; font-weight: 700; font-size: 14px; opacity: 0; pointer-events: none; transition: all .3s; z-index: 9999; }
.blob-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Info */
.info-box { background: white; border-radius: 20px; padding: 30px; margin-top: 36px; box-shadow: 0 10px 30px rgba(0,0,0,0.08); }
.info-box h4 { font-size: 20px; margin-bottom: 20px; color: #1f2937; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.info-item { background: #f5f3ff; border-left: 4px solid #7c3aed; padding: 16px; border-radius: 10px; font-size: 14px; line-height: 1.6; color: #374151; }

.seo-content { padding: 50px 20px; background: #fff; }
.content-article { max-width: 900px; margin: 0 auto; }
.content-article h2 { font-size: 28px; margin: 32px 0 14px; color: #1f2937; }
.content-article p { font-size: 16px; line-height: 1.8; color: #4b5563; margin-bottom: 14px; }

/* Responsive */
@media (max-width: 960px) {
    .blob-layout { grid-template-columns: 1fr; }
    .blob-preview-col { position: static; }
    .variant-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 600px) {
    .tool-header { padding: 40px 16px; }
    .tool-header h1 { font-size: 32px; }
    .tool-subtitle { font-size: 16px; }
    .tool-icon-large { font-size: 56px; }
    .tool-content { padding: 30px 12px 40px; }
    .tab { padding: 12px 18px; font-size: 14px; flex: 1 1 100%; }
    .variant-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .seed-field { margin-left: 0; width: 100%; }
    .content-article h2 { font-size: 22px; }
}
