/* Quantum Countdown Clock - blue and white cube look */
.qc-panel { position: relative; overflow: hidden; border: 2px solid #1e90ff; background: linear-gradient(160deg, rgba(8, 18, 40, .96), rgba(15, 32, 66, .96)); color: #eaf4ff; box-shadow: 0 0 28px rgba(30, 144, 255, .28), inset 0 0 28px rgba(30, 144, 255, .08); }
.qc-panel { scroll-margin-top: 110px; }
#quantum-countdown-section p.eyebrow { color: #7cc4ff !important; -webkit-text-fill-color: #7cc4ff !important; }
#quantum-countdown-section h2.qc-title, #quantum-countdown-section h3 { color: #ffffff !important; -webkit-text-fill-color: #ffffff !important; background: none !important; -webkit-text-stroke: 0 !important; text-shadow: 0 0 14px rgba(30, 144, 255, .8) !important; }
#quantum-countdown-section p.muted { -webkit-text-fill-color: #cfe6ff !important; color: #cfe6ff !important; }
.qc-title { cursor: default; user-select: none; -webkit-user-select: none; }
.qc-dates { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin: 16px 0; align-items: end; }
.qc-dates label { display: grid; gap: 6px; font-weight: 700; color: #cfe6ff; }
.qc-dates input { width: 100%; min-height: 44px; padding: 8px 10px; border-radius: 8px; border: 2px solid #1e90ff; background: #06122a; color: #ffffff; font: inherit; color-scheme: dark; }
.qc-clock { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 8px 0 14px; }
.qc-unit { display: grid; place-items: center; gap: 4px; padding: 14px 6px; border: 2px solid #ffffff; border-radius: 10px; background: linear-gradient(145deg, #1e90ff, #00b4ff); box-shadow: 0 0 18px rgba(30, 144, 255, .55); transform: perspective(500px) rotateX(6deg); }
.qc-unit b { font-size: clamp(2rem, 9vw, 3.6rem); line-height: 1; font-variant-numeric: tabular-nums; color: #ffffff; text-shadow: 0 2px 6px rgba(0, 20, 60, .6); }
.qc-unit span { font-size: .75rem; letter-spacing: .14em; font-weight: 800; color: #eaf6ff; }
.qc-progress { height: 12px; border-radius: 999px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(124, 196, 255, .5); overflow: hidden; }
.qc-progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, #ffffff, #1e90ff); transition: width .25s linear; }
.qc-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin: 6px 0 14px; color: #bcdcff; font-size: .9rem; }
.qc-controls, .qc-speeds { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.qc-speed { min-width: 58px; min-height: 42px; border-radius: 8px; border: 2px solid #1e90ff; background: #06122a; color: #ffffff; font-weight: 800; cursor: pointer; }
#quantum-countdown-section .qc-speed.is-active { background: #ffffff !important; color: #0a2a5c !important; -webkit-text-fill-color: #0a2a5c !important; border-color: #ffffff !important; box-shadow: 0 0 16px rgba(255, 255, 255, .7) !important; }
#quantum-countdown-section .qc-speed.is-admin { border-color: #ffd54a !important; color: #ffd54a !important; -webkit-text-fill-color: #ffd54a !important; }
#quantum-countdown-section .qc-speed.is-admin.is-active { background: #ffd54a !important; color: #1a1400 !important; -webkit-text-fill-color: #1a1400 !important; }
#quantum-countdown-section .qc-lesson strong, #quantum-countdown-section .qc-badge strong, #quantum-countdown-section .qc-dates label { color: #ffffff; -webkit-text-fill-color: #ffffff; }
.qc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 8px; }
.qc-grid h3 { margin: 0 0 8px; color: #ffffff; }
.qc-lessons, .qc-achievements { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.qc-lesson { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-left: 4px solid #1e90ff; border-radius: 6px; background: rgba(30, 144, 255, .14); }
.qc-lesson.is-locked { opacity: .55; }
.qc-lesson-icon { font-size: 1.4rem; line-height: 1; }
#quantum-countdown-section .qc-lesson small, #quantum-countdown-section .qc-badge small, #quantum-countdown-section .qc-meta span { -webkit-text-fill-color: #bcdcff !important; color: #bcdcff !important; } .qc-lesson small, .qc-badge small { display: block; color: #bcdcff; margin-top: 2px; }
.qc-badge { padding: 10px; border-radius: 6px; border: 1px solid rgba(124, 196, 255, .35); background: rgba(255, 255, 255, .04); opacity: .7; }
.qc-badge.is-earned { opacity: 1; border-color: #ffffff; background: rgba(30, 144, 255, .25); }
.qc-toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 9000; max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 10px; border: 2px solid #ffffff; background: #1e90ff; color: #ffffff; font-weight: 800; box-shadow: 0 6px 24px rgba(0, 0, 0, .45); }
.qc-open-button { margin-left: 8px; }
@media (max-width: 520px) {
  .qc-clock { gap: 6px; grid-template-columns: 1.7fr 1fr 1fr 1fr; }
  .qc-unit b { font-size: clamp(1.5rem, 7.5vw, 2.4rem); }
  .qc-unit { padding: 10px 2px; }
  .qc-unit span { font-size: .62rem; letter-spacing: .08em; }
}

/* Backwards Clock year display */
.qc-backwards { display: grid; justify-items: center; gap: 4px; margin: 14px 0 4px; padding: 18px 12px; border: 2px solid #1e90ff; border-radius: 12px; background: #06122a; box-shadow: 0 0 30px rgba(0, 255, 255, .12); text-align: center; }
#quantum-countdown-section .qc-backwards-label { font-size: .8rem; letter-spacing: .2em; font-weight: 800; color: #88ccff !important; -webkit-text-fill-color: #88ccff !important; }
#quantum-countdown-section .qc-year { font: 700 clamp(3.4rem, 16vw, 5.6rem)/1 "Courier New", monospace; font-variant-numeric: tabular-nums; color: #00ffff !important; -webkit-text-fill-color: #00ffff !important; text-shadow: 0 0 12px #1e90ff; }
#quantum-countdown-section .qc-current-date, #quantum-countdown-section .qc-direction { color: #bcdcff !important; -webkit-text-fill-color: #bcdcff !important; font-size: .9rem; }
.qc-presets { display: flex; gap: 8px; flex-wrap: wrap; }

/* Quantum concept of the moment + visuals */
.qc-moment { margin: 6px 0 16px; padding: 16px; border: 2px solid #4169e1; background: #06122a; box-shadow: 3px 3px 0 #4169e1; }
#quantum-countdown-section .qc-moment-label { margin: 0 0 6px; font-size: .78rem; letter-spacing: .08em; color: #88ccff !important; -webkit-text-fill-color: #88ccff !important; }
#quantum-countdown-section .qc-moment > strong { display: block; font-size: 1.15rem; color: #ffffff; -webkit-text-fill-color: #ffffff; }
#quantum-countdown-section .qc-moment > p:not(.qc-moment-label) { color: #cfe6ff !important; -webkit-text-fill-color: #cfe6ff !important; }
.qc-visual { display: flex; align-items: center; justify-content: center; min-height: 110px; margin-top: 10px; border: 2px solid #1e90ff; background: rgba(30, 144, 255, .06); padding: 10px; }
.qc-qubits, .qc-future { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
.qc-future { display: grid; grid-template-columns: repeat(4, auto); }
.qc-future small { grid-column: 1 / -1; text-align: center; }
#quantum-countdown-section .qc-visual small { color: #88ccff !important; -webkit-text-fill-color: #88ccff !important; font-size: .8rem; }
.qc-qubit { display: inline-flex; align-items: center; justify-content: center; width: 58px; height: 58px; border-radius: 50%; border: 2px solid #1e90ff; font-weight: 800; color: #ffffff; }
.qc-qubit.q0 { background: rgba(30, 144, 255, .25); box-shadow: 0 0 15px rgba(30, 144, 255, .6); }
.qc-qubit.q1 { background: rgba(65, 105, 225, .25); border-color: #4169e1; box-shadow: 0 0 15px rgba(65, 105, 225, .6); }
.qc-qubit.qs { background: conic-gradient(rgba(30, 144, 255, .45), rgba(65, 105, 225, .45)); animation: qc-pulse 2s ease-in-out infinite; }
.qc-gate { display: inline-flex; align-items: center; justify-content: center; width: 62px; height: 62px; border: 2px solid #4169e1; background: rgba(65, 105, 225, .15); color: #9fb8ff; font-weight: 800; font-size: 1.3rem; box-shadow: 2px 2px 0 #4169e1; }
.qc-link { width: 80px; height: 4px; }
.qc-link line { stroke: #4169e1; stroke-width: 2; stroke-dasharray: 5 5; animation: qc-dash 1s linear infinite; }
.qc-wave { width: 100%; max-width: 240px; height: 80px; }
.qc-wave path { fill: none; stroke: #00d9ff; stroke-width: 2; }
.qc-wave path.alt { stroke: #ff5cff; opacity: .7; }
.qc-spin { position: relative; width: 80px; height: 80px; display: grid; place-items: center; }
.qc-spin span { position: absolute; inset: 0; display: grid; place-items: center; border: 2px solid #1e90ff; border-radius: 50%; font-size: 1.5rem; color: #ffffff; animation: qc-rotate 3s linear infinite; }
#quantum-countdown-section .qc-spin em { font-style: normal; color: #7cc4ff; -webkit-text-fill-color: #7cc4ff; font-size: .8rem; }
.qc-shor { display: grid; justify-items: center; gap: 2px; }
#quantum-countdown-section .qc-shor b { font-size: 1.8rem; color: #1e90ff; -webkit-text-fill-color: #1e90ff; }
#quantum-countdown-section .qc-shor strong { font-size: 1.5rem; color: #9fb8ff; -webkit-text-fill-color: #9fb8ff; }
.qc-fade { animation: qc-fade 3s ease-in-out infinite; }
@keyframes qc-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
@keyframes qc-rotate { to { transform: rotate(360deg); } }
@keyframes qc-dash { to { stroke-dashoffset: -10; } }
@keyframes qc-fade { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .qc-qubit.qs, .qc-spin span, .qc-link line, .qc-fade { animation: none; } }

/* Quantum Computing Explainer */
.qc-explainer { margin-top: 18px; border: 2px solid #1e90ff; border-radius: 10px; background: rgba(6, 18, 42, .8); padding: 4px 16px; }
#quantum-countdown-section .qc-explainer summary { cursor: pointer; padding: 12px 0; font-weight: 800; font-size: 1.05rem; color: #ffffff; -webkit-text-fill-color: #ffffff; }
#quantum-countdown-section .qc-explainer h3 { font-size: 1rem; margin: 14px 0 6px; }
#quantum-countdown-section .qc-explainer p, #quantum-countdown-section .qc-explainer li { color: #cfe6ff !important; -webkit-text-fill-color: #cfe6ff !important; line-height: 1.55; }
#quantum-countdown-section .qc-explainer strong { color: #ffffff; -webkit-text-fill-color: #ffffff; }
.qc-compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.qc-compare > div { border: 1px solid rgba(124, 196, 255, .4); border-radius: 8px; padding: 10px; }
.qc-compare ul { margin: 6px 0 0; padding-left: 18px; }

/* Analog clock face whose hands run backwards */
.qc-dial { width: min(220px, 58vw); height: auto; margin: 6px 0 2px; filter: drop-shadow(0 0 14px rgba(0, 255, 255, .35)); }
.qc-dial-face { fill: #06122a; stroke: #1e90ff; stroke-width: 4; }
.qc-tick { stroke: rgba(207, 230, 255, .5); stroke-width: 1.5; stroke-linecap: round; }
.qc-tick.major { stroke: #ffffff; stroke-width: 3; }
.qc-hand { stroke-linecap: round; }
.qc-hand-hour { stroke: #ffffff; stroke-width: 7; }
.qc-hand-minute { stroke: #7cc4ff; stroke-width: 5; }
.qc-hand-second { stroke: #00ffff; stroke-width: 2; }
.qc-dial-hub { fill: #00ffff; }
.qc-dial-arrow { fill: #88ccff; font: 700 11px system-ui, sans-serif; letter-spacing: .12em; }

/* Full-screen: the Countdown opens on its own like a separate app */
.qc-topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.qc-topbar .eyebrow { margin: 0; }
html body #main-content #quantum-countdown-section.qc-fullscreen {
  position: fixed !important; inset: 0; z-index: 9500; margin: 0 !important; max-width: none !important; width: auto !important;
  border-radius: 0 !important; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: max(16px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom)) !important;
}
html.qc-fullscreen-open, html.qc-fullscreen-open body { overflow: hidden !important; }
html body #main-content #quantum-countdown-section.qc-fullscreen { background: linear-gradient(160deg, #1c1557, #0b0826 70%) !important; box-shadow: none !important; }

/* Admin controls: direction + any speed up to 1,800,000x */
.qc-admin { margin: 4px 0 16px; padding: 14px; border: 2px solid #ffd54a; border-radius: 12px; background: rgba(40, 32, 6, .55); box-shadow: 0 0 18px rgba(255, 213, 74, .25); }
#quantum-countdown-section .qc-admin h3 { margin: 0 0 10px; color: #ffd54a !important; -webkit-text-fill-color: #ffd54a !important; text-shadow: none !important; }
.qc-admin-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
#quantum-countdown-section .qc-admin-label { min-width: 90px; font-weight: 800; color: #ffe9a3 !important; -webkit-text-fill-color: #ffe9a3 !important; }
.qc-dir { min-height: 44px; padding: 0 16px; border-radius: 8px; border: 2px solid #ffd54a; background: #06122a; color: #ffd54a; font-weight: 800; cursor: pointer; }
#quantum-countdown-section .qc-dir.is-active { background: #ffd54a !important; color: #1a1400 !important; -webkit-text-fill-color: #1a1400 !important; }
#qc-speed-input { width: 150px; min-height: 44px; padding: 6px 10px; border-radius: 8px; border: 2px solid #ffd54a; background: #06122a; color: #ffffff; font: inherit; }
#quantum-countdown-section .qc-admin-now { color: #ffe9a3 !important; -webkit-text-fill-color: #ffe9a3 !important; }
