/* ChessPM web analysis - shared by the Razor and the ASPX site */
.an-wrap { max-width: 980px; margin: 0 auto; padding: 16px; font-family: Arial, sans-serif; color: #2c3e50; }
.an-hero { text-align: center; margin-bottom: 22px; }
.an-hero h1 { font-size: 28px; margin: 6px 0; }
.an-hero .an-sub { color: #666; font-size: 15px; }
.an-card { background: #f7f7f7; border: 1px solid #ddd; border-left: 4px solid #4a90d9; border-radius: 6px; padding: 14px 18px; margin: 16px 0; }
.an-card h3 { margin: 0 0 6px 0; font-size: 16px; }
.an-bullets { margin: 6px 0 0 0; padding-left: 20px; color: #444; font-size: 14px; line-height: 1.6; }
.an-note { font-size: 13px; color: #777; margin-top: 6px; }

.an-textarea { width: 100%; box-sizing: border-box; min-height: 240px; padding: 10px; border: 1px solid #bbb; border-radius: 6px;
               font-family: Consolas, "Courier New", monospace; font-size: 13px; resize: vertical; }
.an-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0; }
.an-count { margin-left: auto; font-size: 12px; color: #888; }
.an-btn { display: inline-block; background: #4a90d9; color: #fff; border: 0; border-radius: 5px; padding: 10px 22px; font-size: 15px;
          font-weight: 600; cursor: pointer; text-decoration: none; }
.an-btn:hover { background: #3a7dc4; color: #fff; text-decoration: none; }
.an-btn:disabled { background: #9db9d6; cursor: default; }
.an-btn-ghost { background: #fff; color: #2b6cb0; border: 1px solid #2b6cb0; }
.an-btn-ghost:hover { background: #eef5fc; color: #2b6cb0; }
.an-btn-sm { padding: 6px 12px; font-size: 14px; }
.an-hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }   /* honeypot */

.an-msg { min-height: 20px; font-size: 14px; color: #555; }
.an-msg-err { color: #b00020; font-weight: 600; }
.an-quota { display: none; background: #fff8e1; border-left: 4px solid #e0a800; padding: 12px 18px; margin: 14px 0; border-radius: 4px; }

/* status */
.an-status { text-align: center; padding: 40px 10px; }
.an-spinner { width: 38px; height: 38px; margin: 0 auto 14px auto; border: 4px solid #d6e4f3; border-top-color: #4a90d9; border-radius: 50%; animation: an-spin 0.9s linear infinite; }
@keyframes an-spin { to { transform: rotate(360deg); } }

/* result */
.an-title { text-align: center; margin: 4px 0 2px 0; font-size: 24px; }
.an-subtitle { text-align: center; color: #777; font-size: 13px; margin-bottom: 14px; }
.an-grid { display: grid; grid-template-columns: minmax(280px, 440px) 1fr; gap: 18px; align-items: start; }
.an-boardwrap { width: 100%; }
#anBoard { width: 100%; max-width: 440px; }
.an-evalbar { height: 10px; background: #333; border-radius: 5px; overflow: hidden; margin-top: 8px; }
.an-evalfill { height: 100%; width: 50%; background: #f2f2f2; transition: width 0.25s; }
.an-evaltext { text-align: center; font-size: 12px; color: #666; margin-top: 3px; min-height: 16px; }
.an-controls { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; justify-content: center; }
.an-info { margin: 0 0 10px 0; padding: 10px 12px; background: #f0f7ff; border: 1px solid #b8d4f0; border-radius: 6px; font-size: 14px; line-height: 1.5; min-height: 70px; }
.an-info-head { font-weight: 700; margin-bottom: 4px; }
.an-moves { max-height: 300px; overflow-y: auto; border: 1px solid #ddd; border-radius: 6px; padding: 8px 10px; line-height: 1.9; font-size: 14px; background: #fff; position: relative; }
.an-mnum { color: #888; margin-left: 6px; font-size: 13px; }
.an-mv { cursor: pointer; padding: 1px 4px; border-radius: 3px; }
.an-mv:hover { background: #e8f1fb; }
.an-mv.an-cur { background: #4a90d9; color: #fff; }
.an-c-inaccuracy { color: #b7791f; }
.an-c-mistake { color: #dd6b20; font-weight: 600; }
.an-c-blunder { color: #c53030; font-weight: 700; }
.an-c-best, .an-c-great, .an-c-brilliant { color: #2f855a; }
.an-mv.an-cur.an-c-inaccuracy, .an-mv.an-cur.an-c-mistake, .an-mv.an-cur.an-c-blunder { color: #fff; }
.an-summary { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 13px; }
.an-summary th, .an-summary td { border: 1px solid #ddd; padding: 5px 8px; text-align: center; }
.an-summary th:first-child { text-align: left; }
.an-summary thead th { background: #f2f2f2; }
.an-hint { min-height: 18px; font-size: 12px; color: #b7791f; text-align: center; }
.an-cta { margin: 26px 0 10px 0; text-align: center; background: #f0f7ff; border: 1px solid #b8d4f0; border-radius: 8px; padding: 18px; }
.an-cta p { margin: 0 0 10px 0; color: #444; }

@media (max-width: 760px) {
  .an-grid { grid-template-columns: 1fr; }
  .an-moves { max-height: 200px; }
}

/* ---- engine choice (submit page) ---- */
.an-engine { margin: 14px 0 4px 0; display: flex; flex-direction: column; gap: 8px; }
.an-engine label.an-opt { display: block; border: 1px solid #ccd6e2; border-radius: 6px; padding: 10px 12px; cursor: pointer; background: #fff; }
.an-engine label.an-opt:hover { background: #f4f8fc; }
.an-engine label.an-opt input { margin-right: 8px; }
.an-engine .an-opt-title { font-weight: 600; }
.an-engine .an-opt-desc { display: block; font-size: 13px; color: #666; margin: 2px 0 0 24px; }
.an-depth { margin: 6px 0 0 24px; font-size: 13px; color: #555; }
.an-depth select { padding: 3px 6px; }
.an-sample { font-size: 13px; margin-left: auto; }

/* ---- result page extras ---- */
.an-progress { width: 100%; max-width: 420px; height: 8px; background: #e3ebf4; border-radius: 4px; margin: 12px auto 0 auto; overflow: hidden; }
.an-progress > div { height: 100%; width: 0%; background: #4a90d9; transition: width 0.2s; }
.an-banner { background: #fff8e1; border-left: 4px solid #e0a800; padding: 8px 14px; margin: 0 0 14px 0; border-radius: 4px; font-size: 13px; color: #5c4a00; }
.an-graph { margin: 12px 0 0 0; cursor: pointer; border: 1px solid #ddd; border-radius: 6px; background: #333; overflow: hidden; }
.an-graph-svg { display: block; width: 100%; height: 70px; }
.an-graph-area { fill: #f2f2f2; }
.an-graph-line { fill: none; stroke: #4a90d9; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.an-graph-mid { stroke: #888; stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.an-graph-cur { stroke: #e53e3e; stroke-width: 2; vector-effect: non-scaling-stroke; }
.an-graph-cap { font-size: 11px; color: #888; margin-top: 3px; text-align: center; }
.an-info-pv { font-family: Consolas, "Courier New", monospace; font-size: 12px; color: #555; margin-top: 6px; }
.an-info-head.an-c-mistake, .an-info-head.an-c-blunder, .an-info-head.an-c-inaccuracy { font-weight: 700; }

.an-opt-off { opacity: 0.6; cursor: default !important; background: #f3f3f3 !important; }
.an-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; margin-left: 6px; border-radius: 10px; background: #e0a800; color: #fff; vertical-align: middle; }
.an-badge-ok { background: #2f855a; }
