/* Color Mixer - 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, #ec4899 0%, #db2777 40%, #f97316 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; }
.mixer-root { max-width: 1240px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }

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

/* 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: 10px 14px; border-radius: 8px; font-weight: 700; font-size: 13.5px; color: #4b5563; cursor: pointer; transition: all .2s; white-space: nowrap; }
.seg button:hover { color: #db2777; }
.seg button.active { background: #fff; color: #db2777; box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
.seg-sm button { padding: 7px 11px; font-size: 12.5px; }

.opts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; margin-top: 20px; }
.opt { margin-bottom: 14px; }
.opt input[type="range"] { width: 100%; accent-color: #db2777; }

/* 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: #db2777; box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
.code-box { width: 100%; 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; resize: vertical; white-space: pre; overflow: auto; }
.code-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }

/* 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-primary { background: linear-gradient(135deg, #ec4899 0%, #be185d 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: #db2777; color: #db2777; }
.btn-sm { padding: 8px 14px; font-size: 13px; }

.mixer-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; max-width: 90vw; text-align: center; }
.mixer-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Info + SEO */
.info-box { background: white; border-radius: 20px; padding: 30px; 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: #fdf2f8; border-left: 4px solid #ec4899; 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; }
.content-article code { background: #f1f5f9; padding: 2px 6px; border-radius: 6px; font-size: 14px; }

@media (max-width: 960px) {
    .two-col { grid-template-columns: 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; }
        .seg button { padding: 9px 10px; font-size: 12.5px; }
    .content-article h2 { font-size: 22px; }
}

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.lbl b { float: none; }
.card-head h3 small { display: inline-block; }

/* Colour rows */
.color-rows { display: flex; flex-direction: column; gap: 12px; }
.crow { display: grid; grid-template-columns: 54px minmax(0, 120px) minmax(0, 1fr) 36px; gap: 10px; align-items: center; background: #f9fafb; border: 2px solid #f1f5f9; border-radius: 14px; padding: 8px; }
.crow input[type="color"] { width: 54px; height: 44px; padding: 2px; border: 2px solid #e5e7eb; border-radius: 10px; background: #fff; cursor: pointer; }
.crow .hex { width: 100%; box-sizing: border-box; padding: 10px; border: 2px solid #e5e7eb; border-radius: 10px; font-size: 14px; font-weight: 700; font-family: ui-monospace, Menlo, Consolas, monospace; }
.crow .hex:focus { outline: none; border-color: #ec4899; }
.wbox { display: flex; align-items: center; gap: 8px; min-width: 0; }
.wbox input[type="range"] { flex: 1; min-width: 0; accent-color: #db2777; }
.wpct { font-weight: 800; font-size: 13px; color: #db2777; min-width: 40px; text-align: right; }
.crow-del { width: 34px; height: 34px; border: none; border-radius: 10px; background: #fee2e2; color: #b91c1c; font-weight: 800; cursor: pointer; }
.crow-del:disabled { opacity: .35; cursor: not-allowed; }
.rows-foot { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Result */
.result-swatch { height: 170px; border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08); transition: background .2s; }
.result-swatch b { font-size: 34px; font-weight: 900; font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: 1px; }
.result-swatch span { font-size: 14px; font-weight: 700; opacity: .9; }
.name-box { margin-top: 14px; display: flex; align-items: center; gap: 8px; font-size: 14px; flex-wrap: wrap; }
.chip-dot { width: 18px; height: 18px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,0.2); display: inline-block; }
.contrast-box { display: flex; gap: 18px; margin-top: 10px; font-size: 13px; font-weight: 700; color: #4b5563; flex-wrap: wrap; }
.value-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; margin-top: 14px; }
.val { display: flex; justify-content: space-between; gap: 8px; align-items: center; background: #f9fafb; border: 2px solid #f1f5f9; border-radius: 10px; padding: 8px 10px; cursor: pointer; text-align: left; font-family: inherit; }
.val:hover { border-color: #ec4899; }
.val span { font-size: 11px; font-weight: 800; color: #6b7280; }
.val b { font-size: 12.5px; font-family: ui-monospace, Menlo, Consolas, monospace; color: #111827; word-break: break-all; text-align: right; }
.result-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }

/* Modes */
.mode-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.mode-card { border: 2px solid #eef2f7; background: #fff; border-radius: 16px; padding: 10px; cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 8px; transition: all .15s; font-family: inherit; }
.mode-card:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(0,0,0,0.1); }
.mode-card.active { border-color: #db2777; box-shadow: 0 0 0 3px rgba(236,72,153,0.2); }
.mc-sw { height: 64px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; font-family: ui-monospace, Menlo, Consolas, monospace; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08); }
.mc-name { font-weight: 800; font-size: 15px; color: #1f2937; }
.mc-desc { font-size: 12px; line-height: 1.5; color: #6b7280; }

/* Ladder */
.steps-ctl { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; color: #374151; }
.steps-ctl b { color: #db2777; }
.steps-ctl input { accent-color: #db2777; width: 160px; }
.ladder { display: flex; border-radius: 14px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06); }
.lad { flex: 1; min-width: 0; height: 96px; border: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-family: inherit; transition: flex .2s; }
.lad:hover { flex: 1.6; }
.lad span { font-size: 12px; font-weight: 800; }
.lad em { font-style: normal; font-size: 10px; font-weight: 700; font-family: ui-monospace, Menlo, Consolas, monospace; }
.sub-h { margin: 22px 0 10px; font-size: 14px; color: #374151; }
.compare { display: flex; flex-direction: column; gap: 8px; }
.cmp { display: grid; grid-template-columns: 70px 1fr; gap: 12px; align-items: center; }
.cmp-name { font-size: 12.5px; font-weight: 700; color: #6b7280; }
.cmp-name.on { color: #db2777; font-weight: 900; }
.cmp-strip { height: 30px; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06); }

/* Saved */
.saved-row { display: flex; gap: 10px; flex-wrap: wrap; }
.saved-chip { display: inline-flex; align-items: center; background: #f9fafb; border: 2px solid #f1f5f9; border-radius: 999px; padding: 4px; gap: 4px; }
.sc-color { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,0.2); cursor: pointer; }
.sc-add, .sc-del { width: 24px; height: 24px; border: none; background: transparent; border-radius: 50%; cursor: pointer; font-weight: 800; color: #6b7280; }
.sc-add:hover { background: #fce7f3; color: #db2777; }
.sc-del:hover { background: #fee2e2; color: #b91c1c; }

@media (max-width: 600px) {
    .crow { grid-template-columns: 48px minmax(0, 1fr) 34px; }
    .crow .wbox { grid-column: 1 / -1; order: 5; }
    .result-swatch b { font-size: 26px; }
    .steps-ctl input { width: 110px; }
    .lad em { display: none; }
}
