/* Oops!Pile Daily Challenge live page: small additions to site.css */

body[data-page="daily"] { --accent: #FFB21E; --accent-2: #FF7A1A; }

/* ---------- header with the countdown */
.daily-hero { padding: clamp(40px, 7vw, 80px) 0 0; background: radial-gradient(80% 120% at 50% 0%, rgba(27, 58, 143, .55), transparent 70%); }
.daily-back { display: table; margin-bottom: 18px; font-weight: 800; text-decoration: none; }
.daily-hero h1 { margin-bottom: .3em; }
.daily-number { color: var(--accent); white-space: nowrap; }

.daily-clock {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px;
	margin-top: 28px; padding: 20px 24px;
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.daily-next { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.daily-next-label { font-weight: 800; color: var(--muted); }
.daily-countdown { font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 6vw, 2.6rem); line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.daily-next-at { color: var(--muted); font-size: .95rem; }

.daily-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: .9rem; color: var(--muted); }
.daily-live { display: inline-flex; align-items: center; gap: 8px; font-weight: 900; letter-spacing: .12em; font-size: .78rem; color: #FF6B6B; }
.daily-dot { width: 10px; height: 10px; border-radius: 50%; background: #FF4D4D; box-shadow: 0 0 0 0 rgba(255, 77, 77, .6); animation: daily-pulse 1.8s ease-out infinite; }
.daily-live.is-off { color: var(--muted); }
.daily-live.is-off .daily-dot { background: var(--muted); animation: none; }
@keyframes daily-pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 77, 77, .55); } 70%, 100% { box-shadow: 0 0 0 10px rgba(255, 77, 77, 0); } }
.daily-reconnect { color: #FFB08A; font-weight: 700; }

/* ---------- leaderboard table */
.daily-board-section { padding-top: clamp(36px, 6vw, 64px); }
.daily-board-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 16px; }
.daily-board-head h2 { margin: 0; }
.daily-players { margin: 0; font-weight: 700; }

.daily-table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0 6px; }
.daily-table[hidden] { display: none; }
.daily-table th { text-align: left; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 800; padding: 0 14px 4px; }
.daily-table th:first-child { width: 4.6rem; }
.daily-table th:last-child { width: 34%; text-align: right; }
.daily-table td { padding: 12px 14px; background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.daily-table td:first-child { border-left: 1px solid var(--line); border-radius: 14px 0 0 14px; }
.daily-table td:last-child { border-right: 1px solid var(--line); border-radius: 0 14px 14px 0; text-align: right; }
.daily-rank { font-family: var(--display); font-size: 1.15rem; color: var(--muted); }
.daily-medal { font-size: 1.5rem; line-height: 1; }
/* Player names are free text: one line, cut with an ellipsis */
.daily-name { font-weight: 800; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.daily-score { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.daily-move { display: inline-block; min-width: 1em; margin-right: 6px; font-weight: 900; }
.is-up .daily-move { color: var(--green); }
.is-down .daily-move { color: #FF7B73; }

.daily-table tr.is-top td { background: linear-gradient(rgba(255, 178, 30, .1), rgba(255, 178, 30, .1)), var(--surface); }
.daily-table tr.is-top-1 td { border-color: rgba(255, 197, 49, .45); }
.daily-table tr.is-top-1 .daily-name { color: var(--gold); }

/* A row whose rank or score just changed flashes once (site.css turns animations off for reduced motion) */
.daily-table tr.is-changed td { animation: daily-flash 1.6s ease-out; }
@keyframes daily-flash { 0%, 25% { background: rgba(255, 178, 30, .32); } 100% { background: var(--surface); } }

/* Placeholder rows until the first answer */
.daily-table tr.is-skeleton td span { display: block; height: 14px; border-radius: 7px; background: linear-gradient(90deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .13), rgba(255, 255, 255, .06)); background-size: 200% 100%; animation: daily-shimmer 1.4s linear infinite; }
.daily-table tr.is-skeleton td:first-child span { width: 1.6em; }
.daily-table tr.is-skeleton td:nth-child(2) span { width: 60%; }
.daily-table tr.is-skeleton td:last-child span { width: 70%; margin-left: auto; }
@keyframes daily-shimmer { from { background-position: 200% 0; } to { background-position: 0 0; } }

.daily-empty, .daily-down, .daily-note {
	text-align: center; padding: 36px 24px;
	background: var(--surface); border: 1px dashed rgba(255, 255, 255, .18); border-radius: var(--radius);
}
.daily-empty[hidden], .daily-down[hidden] { display: none; }
.daily-empty h3 { margin: 10px 0 .3em; }
.daily-empty p, .daily-down p { color: var(--muted); margin: 0 auto; max-width: 46ch; }
.daily-down p { margin-top: 10px; }

/* ---------- yesterday's podium: 2nd, 1st, 3rd side by side */
.daily-yesterday[hidden] { display: none; }
.podium { list-style: none; padding: 0; margin: 28px auto 8px; max-width: 560px; display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 10px; }
.podium-step { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.podium-step.is-1 { order: 2; }
.podium-step.is-2 { order: 1; }
.podium-step.is-3 { order: 3; }
.podium-medal { font-size: 2.2rem; line-height: 1.1; }
.podium-name { max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 800; }
.podium-score { color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; margin-bottom: 8px; }
.podium-block {
	width: 100%; display: grid; place-items: center;
	font-family: var(--display); font-size: 1.8rem; color: var(--accent-ink);
	background: linear-gradient(180deg, var(--accent), var(--accent-2));
	border-radius: 14px 14px 4px 4px;
}
.podium-step.is-1 .podium-block { height: 120px; }
.podium-step.is-2 .podium-block { height: 86px; background: linear-gradient(180deg, #DCE3F0, #9FAAC2); }
.podium-step.is-3 .podium-block { height: 64px; background: linear-gradient(180deg, #E9A56B, #B96A33); }

.daily-more { margin-top: 24px; text-align: left; }
.daily-more summary { display: inline-block; cursor: pointer; font-weight: 800; color: var(--accent); padding: 8px 4px; }
.daily-more[open] summary { margin-bottom: 8px; }

@media (max-width: 520px) {
	.daily-clock { padding: 16px; }
	.daily-table th, .daily-table td { padding-left: 10px; padding-right: 10px; }
	.daily-table th:first-child { width: 3.4rem; }
	.podium-medal { font-size: 1.8rem; }
	.podium-step.is-1 .podium-block { height: 96px; }
	.podium-step.is-2 .podium-block { height: 70px; }
	.podium-step.is-3 .podium-block { height: 52px; }
}
