/* Color Shades 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: #4f46e5; }
.breadcrumb .separator { margin: 0 10px; color: #ddd; }
.breadcrumb .current { color: #333; font-weight: 600; }

.tool-header {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 40%, #0ea5e9 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; }
.shade-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; }

/* Input */
.input-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 26px; }
.lbl { display: block; font-size: 13px; font-weight: 700; color: #374151; margin-bottom: 8px; }
.lbl b { float: right; color: #4f46e5; font-weight: 800; }
.lbl.mt { margin-top: 16px; }
.color-input { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.color-input input[type="color"] { width: 64px; height: 52px; padding: 3px; border: 2px solid #e5e7eb; border-radius: 12px; background: #fff; cursor: pointer; }
.color-input input[type="text"] { flex: 1 1 200px; min-width: 0; padding: 13px 14px; border: 2px solid #e5e7eb; border-radius: 12px; font-size: 16px; font-weight: 700; font-family: ui-monospace, Menlo, Consolas, monospace; }
.color-input input[type="text"]:focus, .txt:focus { outline: none; border-color: #6366f1; }
.txt { width: 100%; box-sizing: border-box; padding: 11px 12px; border: 2px solid #e5e7eb; border-radius: 10px; font-size: 14px; font-weight: 600; background: #fff; }
.base-info { margin-top: 10px; font-size: 12.5px; color: #6b7280; font-family: ui-monospace, Menlo, Consolas, monospace; }
.recent { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; min-height: 4px; }
.recent-chip { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,0.18); cursor: pointer; transition: transform .15s; }
.recent-chip:hover { transform: scale(1.2); }

/* 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: #4f46e5; }
.seg button.active { background: #fff; color: #4f46e5; 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: #4f46e5; }

/* Swatches */
.swatch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 14px; }
.sw { border: 2px solid #eef2f7; border-radius: 16px; overflow: hidden; background: #fff; transition: transform .15s, box-shadow .15s; }
.sw:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(0,0,0,0.12); }
.sw.is-base { border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(99,102,241,0.18); }
.sw-color { width: 100%; height: 104px; border: none; cursor: pointer; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; padding: 10px 12px; box-sizing: border-box; text-align: left; }
.sw-step { font-weight: 800; font-size: 15px; }
.sw-aa { font-weight: 800; font-size: 20px; align-self: flex-end; opacity: 0.9; }
.sw-info { padding: 10px 12px 12px; }
.sw-hex { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; font-weight: 700; color: #111827; cursor: pointer; word-break: break-all; margin-bottom: 8px; }
.sw-hex:hover { color: #4f46e5; }
.sw-contrast { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; font-weight: 700; color: #4b5563; margin-bottom: 8px; }
.cb { display: inline-block; padding: 1px 7px; border-radius: 6px; font-size: 10.5px; font-weight: 800; margin-left: 4px; }
.cb.g3 { background: #dcfce7; color: #166534; }
.cb.g2 { background: #d1fae5; color: #047857; }
.cb.g1 { background: #fef9c3; color: #854d0e; }
.cb.g0 { background: #fee2e2; color: #b91c1c; }
.sw-use { width: 100%; border: 2px solid #e5e7eb; background: #fff; color: #4b5563; border-radius: 8px; padding: 5px 0; font-size: 11.5px; font-weight: 700; cursor: pointer; }
.sw-use:hover { border-color: #4f46e5; color: #4f46e5; }

.strip { height: 54px; border-radius: 14px; margin-top: 20px; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06); }
.strip-css { display: block; margin-top: 10px; font-size: 12px; color: #6b7280; word-break: break-all; font-family: ui-monospace, Menlo, Consolas, monospace; }

/* Two col */
.two-col { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 22px; align-items: start; }

/* UI preview */
.ui-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ui-light, .ui-dark { border-radius: 16px; padding: 18px; border: 1px solid; }
.ui-light { background: var(--c-50); border-color: var(--c-200); color: var(--c-700); }
.ui-dark { background: var(--c-950); border-color: var(--c-800); color: var(--c-200); }
.ui-light h4 { color: var(--c-900); margin: 10px 0 6px; font-size: 17px; }
.ui-dark h4 { color: var(--c-50); margin: 10px 0 6px; font-size: 17px; }
.ui-light p, .ui-dark p { font-size: 13px; line-height: 1.6; margin: 0 0 14px; }
.ui-badge { display: inline-block; font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 999px; }
.ui-light .ui-badge { background: var(--c-100); color: var(--c-700); }
.ui-dark .ui-badge { background: var(--c-900); color: var(--c-300); }
.ui-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ui-btn { border: none; padding: 9px 14px; border-radius: 10px; font-size: 13px; font-weight: 700; cursor: pointer; }
.ui-light .ui-btn { background: var(--c-600); color: #fff; }
.ui-light .ui-btn:hover { background: var(--c-700); }
.ui-light .ui-btn.alt { background: transparent; color: var(--c-700); border: 2px solid var(--c-300); }
.ui-dark .ui-btn { background: var(--c-500); color: #fff; }
.ui-dark .ui-btn:hover { background: var(--c-400); }
.ui-dark .ui-btn.alt { background: transparent; color: var(--c-300); border: 2px solid var(--c-700); }

/* Harmonies */
.harmonies { display: flex; flex-direction: column; gap: 14px; }
.harm-name { font-size: 12.5px; font-weight: 800; color: #374151; margin-bottom: 6px; }
.harm-row { display: flex; border-radius: 12px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06); }
.harm-chip { flex: 1; height: 44px; border: none; cursor: pointer; position: relative; transition: flex .2s; }
.harm-chip:hover { flex: 1.8; }
.harm-chip span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 800; font-family: ui-monospace, Menlo, Consolas, monospace; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.6); opacity: 0; transition: opacity .15s; }
.harm-chip:hover span { opacity: 1; }

/* 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: #4f46e5; 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, #6366f1 0%, #4338ca 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: #4f46e5; color: #4f46e5; }
.btn-sm { padding: 8px 14px; font-size: 13px; }

.shade-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; }
.shade-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: #eef2ff; border-left: 4px solid #6366f1; 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) {
    .input-grid, .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; }
    .swatch-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .ui-preview { grid-template-columns: 1fr; }
    .seg button { padding: 9px 10px; font-size: 12.5px; }
    .content-article h2 { font-size: 22px; }
}
