/* Universe Zoom - 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: #6366f1; }
.breadcrumb .separator { margin: 0 10px; color: #ddd; }
.breadcrumb .current { color: #333; font-weight: 600; }

.tool-header {
    background: linear-gradient(135deg, #0b1030 0%, #312e81 50%, #6d28d9 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; }
.uz-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; }
.lbl { display: block; font-size: 13px; font-weight: 700; color: #374151; margin-bottom: 8px; }
.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; font-family: inherit; }
.txt:focus { outline: none; border-color: #6366f1; }

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

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

.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); font-family: inherit; }
.btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.15); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, #0b1030 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: #6366f1; color: #6366f1; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-xs { padding: 6px 10px; font-size: 12px; border-radius: 8px; box-shadow: none; }
.link-btn { border: none; background: none; color: #6366f1; font-weight: 700; font-size: 13px; cursor: pointer; padding: 0; font-family: inherit; }
.link-btn:hover { text-decoration: underline; }

.uz-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; }
.uz-toast.show { opacity: 1; transform: translate(-50%, 0); }

.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: 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; }
    .content-article h2 { font-size: 22px; }
}

.uz-root .card { margin-bottom: 0; }
.uz-root { display: flex; flex-direction: column; gap: 22px; }
.mt { margin-top: 16px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.stage { position: relative; height: clamp(500px, 74vh, 780px); border-radius: 20px; overflow: hidden; background: #02030a; box-shadow: 0 10px 30px rgba(0,0,0,.3); touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.stage:fullscreen { height: 100vh; border-radius: 0; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.loader { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; color: #cbd5e1; font-weight: 700; background: #02030a; z-index: 6; }
.ui { position: absolute; z-index: 3; }
.ui.top { top: 12px; right: 12px; display: flex; gap: 8px; align-items: center; }
.tb { background: rgba(12,14,34,.72); color: #f1f5f9; border: 1px solid rgba(255,255,255,.18); border-radius: 10px; padding: 8px 12px; font-size: 13.5px; font-weight: 700; cursor: pointer; font-family: inherit; transition: all .15s; }
.tb:hover { background: rgba(99,102,241,.8); border-color: #c7d2fe; }
.seg-mini { display: inline-flex; border: 1px solid rgba(255,255,255,.18); border-radius: 10px; overflow: hidden; }
.seg-mini button { background: rgba(12,14,34,.72); color: #cbd5e1; border: none; padding: 8px 12px; font-size: 13px; font-weight: 800; cursor: pointer; font-family: inherit; }
.seg-mini button.active { background: #6366f1; color: #fff; }
.readout { top: 12px; left: 12px; background: rgba(12,14,34,.68); border: 1px solid rgba(255,255,255,.14); border-radius: 12px; padding: 9px 13px; color: #cbd5e1; font-size: 12.5px; max-width: 58%; }
.r-line { line-height: 1.65; }
.r-line b { color: #fff; }
.idea-badge { position: absolute; z-index: 3; top: 70px; left: 50%; transform: translateX(-50%); background: rgba(124,58,237,.85); color: #fff; font-weight: 900; letter-spacing: 1.2px; font-size: 12px; padding: 5px 14px; border-radius: 999px; border: 1px solid #ddd6fe; opacity: 0; pointer-events: none; transition: opacity .4s; white-space: nowrap; }
.stage.idea .idea-badge { opacity: 1; }
.lvcard { left: 12px; bottom: 44px; width: min(440px, calc(100% - 24px)); background: rgba(8,10,28,.84); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.16); border-radius: 16px; padding: 14px 16px; color: #e2e8f0; }
.lv-head { display: flex; gap: 11px; align-items: center; margin-bottom: 7px; }
.lv-ico { font-size: 30px; line-height: 1; }
.lv-tt { flex: 1; min-width: 0; }
.lv-tg { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); color: #e2e8f0; border-radius: 8px; width: 28px; height: 28px; cursor: pointer; font-size: 14px; flex: 0 0 auto; }
.lvcard.min p, .lvcard.min .lv-extra, .lvcard.min .lv-fact { display: none; }
.lvcard.min .lv-head { margin-bottom: 0; }
.lvcard h3 { margin: 0; font-size: 19px; color: #fff; line-height: 1.25; }
.lv-size { font-size: 12.5px; font-weight: 800; color: #a5b4fc; margin-top: 2px; }
.lvcard p { margin: 0 0 8px; font-size: 13.5px; line-height: 1.6; color: #cbd5e1; }
.lv-extra { font-size: 13px; font-weight: 800; color: #fde68a; margin-bottom: 6px; }
.lv-extra:empty { display: none; }
.lv-fact { font-size: 12.5px; line-height: 1.55; color: #c7d2fe; background: rgba(99,102,241,.16); border-radius: 10px; padding: 7px 10px; }
.hint { position: absolute; z-index: 2; right: 14px; bottom: 12px; color: rgba(226,232,240,.5); font-size: 12px; font-weight: 600; pointer-events: none; text-align: right; max-width: 45%; }
.ctl { padding-bottom: 18px; }
.slider-wrap { margin-bottom: 14px; }
.sl-ends { display: flex; justify-content: space-between; font-size: 13px; font-weight: 800; color: #4338ca; margin-bottom: 6px; }
.sl-track { position: relative; height: 34px; }
.sl-track::before { content: ''; position: absolute; left: 0; right: 0; top: 13px; height: 8px; border-radius: 6px; background: linear-gradient(90deg, #1e1b4b, #4c1d95, #1d4ed8, #0e7490, #15803d); opacity: .35; }
.sl-fill { position: absolute; left: 0; top: 13px; height: 8px; border-radius: 6px; background: linear-gradient(90deg, #6366f1, #a78bfa); pointer-events: none; }
.ticks { position: absolute; left: 0; right: 0; top: 0; height: 34px; pointer-events: none; }
.ticks i { position: absolute; top: 9px; width: 6px; height: 16px; margin-left: -3px; border-radius: 3px; background: rgba(67,56,202,.55); pointer-events: auto; cursor: pointer; }
.ticks i:hover { background: #f59e0b; }
.sl-track input[type="range"] { position: absolute; left: 0; top: 0; width: 100%; height: 34px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; accent-color: #6366f1; }
.sl-track input[type="range"]::-webkit-slider-runnable-track { height: 34px; background: transparent; }
.sl-track input[type="range"]::-moz-range-track { height: 34px; background: transparent; }
.sl-track input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 24px; height: 24px; margin-top: 5px; border-radius: 50%; background: #fff; border: 4px solid #6366f1; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.sl-track input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 4px solid #6366f1; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.ctl-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ctl-row.opts { margin-top: 12px; gap: 14px; }
.btn-play { border: 2px solid #6366f1; background: linear-gradient(135deg, #6366f1, #7c3aed); color: #fff; font-weight: 800; font-size: 14px; padding: 9px 18px; border-radius: 12px; cursor: pointer; font-family: inherit; transition: all .15s; }
.btn-play.alt { background: linear-gradient(135deg, #0ea5e9, #6366f1); border-color: #0ea5e9; }
.btn-play.ghost { background: #fff; color: #4338ca; border-color: #c7d2fe; }
.btn-play:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.btn-play.on { box-shadow: 0 0 0 3px rgba(99,102,241,.35); }
.btn-play:disabled { opacity: .45; cursor: default; }
.chip-row { display: flex; gap: 8px; overflow-x: auto; padding: 8px 2px 4px; scrollbar-width: thin; }
.chip-row button { flex: 0 0 auto; border: 2px solid #e5e7eb; background: #f9fafb; color: #374151; font-weight: 700; font-size: 12.5px; padding: 7px 13px; border-radius: 999px; cursor: pointer; font-family: inherit; white-space: nowrap; transition: all .15s; }
.chip-row button:hover { border-color: #6366f1; background: #eef2ff; color: #4338ca; }
.chip-row button.active { background: #6366f1; border-color: #6366f1; color: #fff; }
.frow { margin-bottom: 12px; }
.frow .txt, .lbl .txt { width: 100%; }
.muted-p { font-size: 14px; color: #4b5563; line-height: 1.6; margin: 0 0 12px; }
.tr-out { background: #0b1030; border-radius: 14px; padding: 16px 18px; color: #e2e8f0; }
.tr-sub { font-size: 13px; color: #a5b4fc; font-weight: 700; }
.tr-val { font-size: 32px; font-weight: 900; color: #fde68a; margin: 4px 0; word-break: break-word; }
.tr-cmp { font-size: 14px; line-height: 1.6; color: #cbd5e1; }
.tr-cmp b { color: #fff; }
.quiz-n { font-size: 12px; font-weight: 800; color: #6366f1; letter-spacing: .5px; }
.quiz-q { font-size: 17px; font-weight: 800; color: #1f2937; margin: 6px 0 12px; line-height: 1.4; }
.quiz-opts { display: grid; gap: 8px; }
.opt { text-align: left; border: 2px solid #e5e7eb; background: #fff; border-radius: 12px; padding: 11px 14px; font-size: 14px; font-weight: 600; color: #374151; cursor: pointer; font-family: inherit; transition: all .15s; }
.opt:hover:not(:disabled) { border-color: #6366f1; background: #eef2ff; }
.opt.right { border-color: #16a34a; background: #f0fdf4; color: #166534; }
.opt.wrong { border-color: #dc2626; background: #fef2f2; color: #991b1b; }
.opt:disabled { cursor: default; }
.quiz-fb { margin: 12px 0 10px; font-weight: 800; color: #1f2937; }
.quiz-done { text-align: center; padding: 10px 0; }
.quiz-done .big { font-size: 54px; }
.quiz-done h4 { margin: 8px 0 14px; font-size: 20px; color: #1f2937; }

@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
    .stage { height: 82vh; min-height: 540px; }
    .lvcard { bottom: 40px; left: 8px; width: calc(100% - 16px); padding: 11px 13px; max-height: 46%; overflow-y: auto; }
    .lvcard h3 { font-size: 16px; }
    .lvcard p { font-size: 12.5px; }
    .lv-fact { font-size: 12px; }
    .readout { max-width: 64%; font-size: 11.5px; padding: 7px 10px; }
    .hint { display: none; }
    .ctl-row .btn-play { padding: 8px 12px; font-size: 13px; }
}
