2026-07-18 11:13:12 +08:00

985 lines
18 KiB
CSS

:root {
--gift-red-950: #380400;
--gift-red-900: #590600;
--gift-red-800: #790d03;
--gift-red-700: #a71b06;
--gift-gold-100: #fff8c9;
--gift-gold-300: #ffe16b;
--gift-gold-500: #f6ad19;
--gift-gold-700: #a95a00;
--gift-panel: rgba(86, 0, 0, 0.94);
--gift-text: #fff8df;
}
* {
box-sizing: border-box;
}
html {
min-height: 100%;
background: #280200;
color-scheme: dark;
}
body {
min-width: 320px;
min-height: 100%;
margin: 0;
overflow-x: hidden;
color: var(--gift-text);
background:
radial-gradient(circle at 50% 0, #a52d08 0, transparent 34rem), #280200;
font-family:
Inter,
-apple-system,
BlinkMacSystemFont,
'Segoe UI',
sans-serif;
-webkit-tap-highlight-color: transparent;
}
button,
input {
font: inherit;
}
button {
color: inherit;
}
button:focus-visible {
outline: 2px solid #fff4a4;
outline-offset: 2px;
}
[hidden] {
display: none !important;
}
.gift-challenge-app {
position: relative;
width: min(100%, 375px);
min-height: 100vh;
margin: 0 auto;
overflow: hidden;
background: var(--gift-red-900);
box-shadow: 0 0 38px rgba(0, 0, 0, 0.65);
}
.hero {
position: relative;
z-index: 2;
width: 100%;
aspect-ratio: 1;
overflow: hidden;
background: #6a1600;
}
.hero::after {
position: absolute;
right: 0;
bottom: -1px;
left: 0;
height: 34px;
background: linear-gradient(transparent, #7c1102);
content: '';
pointer-events: none;
}
.hero-art {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
object-fit: cover;
}
.hero-title {
position: absolute;
z-index: 2;
right: 34px;
bottom: 23px;
left: 34px;
margin: 0;
overflow: hidden;
color: #ffeaa1;
font-family: Georgia, 'Times New Roman', serif;
font-size: clamp(20px, 6.8vw, 31px);
font-weight: 800;
line-height: 1.1;
text-align: center;
text-overflow: ellipsis;
text-shadow:
0 2px 0 #6c0900,
0 0 5px #ffea91;
white-space: nowrap;
}
.side-actions {
position: absolute;
z-index: 3;
top: 126px;
right: 12px;
display: grid;
gap: 10px;
}
.side-action {
display: grid;
width: 36px;
height: 36px;
padding: 5px;
place-items: center;
border: 2px solid #ffe76d;
border-radius: 50%;
background: linear-gradient(#aa240e, #6c0800);
box-shadow:
inset 0 0 0 2px #9b3500,
0 2px 8px rgba(48, 0, 0, 0.55);
}
.side-action img {
width: 24px;
height: 24px;
}
.event-stage {
position: relative;
z-index: 1;
min-height: calc(100vh - 375px);
padding: 6px 0 90px;
background-image:
linear-gradient(rgba(123, 17, 1, 0.08), rgba(79, 5, 0, 0.32)),
url('./assets/layers/stage-background.jpg');
background-position: center top;
background-size: 100% auto;
}
.countdown {
--countdown-cell-size: clamp(60px, 19.2vw, 72px);
--countdown-cell-height: clamp(64px, 20.54vw, 77px);
--countdown-gap: clamp(3px, 1.4vw, 6px);
display: grid;
grid-template-columns:
var(--countdown-cell-size) var(--countdown-cell-size) 4px
var(--countdown-cell-size) 4px var(--countdown-cell-size);
align-items: center;
justify-content: center;
width: 100%;
height: var(--countdown-cell-height);
margin: 0 auto 10px;
column-gap: var(--countdown-gap);
}
.countdown-cell {
position: relative;
display: grid;
width: var(--countdown-cell-size);
height: var(--countdown-cell-height);
place-items: center;
background: url('./assets/layers/countdown-cell.png') center / 100% 100%
no-repeat;
}
.countdown-cell strong {
margin-top: 6px;
color: #fff8cf;
font-family: Georgia, serif;
font-size: clamp(23px, 7.2vw, 27px);
line-height: 1;
text-shadow:
0 2px 0 #600000,
0 0 6px #ff9d00;
}
.countdown-cell small {
position: absolute;
right: 9px;
bottom: 15px;
color: #fff2bd;
font-size: 9px;
font-weight: 800;
}
.countdown > i {
color: #ffe976;
font-family: Georgia, serif;
font-size: 23px;
font-style: normal;
text-align: center;
text-shadow: 0 1px 3px #6c0000;
}
.primary-tabs {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 6px;
width: calc(100% - 24px);
margin: 0 auto 12px;
}
.primary-tab {
position: relative;
min-width: 0;
height: 42px;
padding: 0 12px 4px;
overflow: hidden;
border: 0;
background: url('./assets/layers/section-tab-idle.png') center / 113px 42px
no-repeat;
color: #e5e5e5;
font-size: clamp(10px, 3vw, 12px);
font-weight: 800;
line-height: 1.05;
text-align: center;
text-shadow: 0 1px 2px #111;
}
.primary-tab.is-active {
background-image: url('./assets/layers/section-tab-active.png');
color: #fff3b0;
text-shadow:
0 1px 1px #780000,
0 0 4px #ffb800;
}
.primary-tab span {
display: -webkit-box;
overflow: hidden;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow-wrap: anywhere;
}
.view-panel {
position: relative;
min-height: 420px;
}
.section-state,
.ranking-state {
display: grid;
min-height: 260px;
padding: 30px;
place-items: center;
align-content: center;
gap: 14px;
color: #fff4cb;
text-align: center;
}
.loading-spinner {
display: inline-block;
width: 28px;
height: 28px;
border: 3px solid rgba(255, 224, 104, 0.28);
border-top-color: #ffe571;
border-radius: 50%;
animation: gift-spin 0.8s linear infinite;
}
@keyframes gift-spin {
to {
transform: rotate(360deg);
}
}
.retry-button,
.ranking-state button {
min-width: 112px;
min-height: 38px;
border: 1px solid #ffe571;
border-radius: 18px;
background: linear-gradient(#d94011, #8c0800);
box-shadow: inset 0 0 7px #ffb936;
}
.ornate-panel {
position: relative;
width: 100%;
min-height: 720px;
padding: 42px 21px 50px;
}
.panel-decoration {
position: absolute;
z-index: 0;
inset: 0;
width: 100%;
height: 100%;
object-fit: fill;
pointer-events: none;
}
.task-list {
position: relative;
z-index: 1;
display: grid;
gap: 20px;
}
.task-card {
min-height: 180px;
padding: 0 0 12px;
border-bottom: 1px solid rgba(255, 203, 45, 0.28);
}
.task-card:last-child {
border-bottom: 0;
}
.task-heading {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
align-items: start;
gap: 8px;
min-height: 48px;
margin-bottom: 7px;
}
.task-title-wrap {
min-width: 0;
}
.task-heading h3 {
display: -webkit-box;
margin: 0;
overflow: hidden;
color: #fff7e7;
font-size: 15px;
font-weight: 600;
line-height: 1.35;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow-wrap: anywhere;
}
.task-progress {
display: block;
margin-top: 2px;
color: #ffd66b;
font-size: 11px;
}
.task-action,
.confirm-button {
position: relative;
min-width: 72px;
min-height: 28px;
padding: 2px 12px 4px;
border: 0;
background: url('./assets/layers/action-button.png') center / 100% 100%
no-repeat;
color: #fffbe2;
font-size: 11px;
font-weight: 800;
text-shadow: 0 1px 2px #680000;
}
.task-action:disabled,
.task-action.is-claimed {
filter: grayscale(1);
opacity: 0.78;
}
.task-action.is-loading {
color: transparent;
pointer-events: none;
}
.task-action.is-loading::after {
position: absolute;
top: 50%;
left: 50%;
width: 13px;
height: 13px;
margin: -7px;
border: 2px solid rgba(255, 255, 255, 0.35);
border-top-color: #fff;
border-radius: 50%;
animation: gift-spin 0.7s linear infinite;
content: '';
}
.reward-strip {
display: grid;
grid-template-columns: repeat(3, minmax(0, 79px));
gap: 12px;
}
.reward-slot {
position: relative;
width: 79px;
height: 92px;
overflow: hidden;
background: url('./assets/layers/task-reward-frame.png') center top / 79px
80px no-repeat;
}
.reward-slot img {
position: absolute;
top: 10px;
left: 10px;
width: 59px;
height: 56px;
object-fit: contain;
}
.reward-placeholder {
position: absolute;
top: 13px;
left: 13px;
display: grid;
width: 53px;
height: 51px;
place-items: center;
color: #ffdc66;
font-family: Georgia, serif;
font-size: 26px;
}
.reward-count {
position: absolute;
right: 0;
bottom: 0;
left: 0;
display: grid;
height: 30px;
place-items: center;
background: url('./assets/layers/reward-count-frame.png') center / 79px 30px
no-repeat;
color: #fff4a7;
font-size: 12px;
font-weight: 900;
text-shadow: 0 1px 2px #5f0000;
}
.rank-period-tabs {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 12px;
width: calc(100% - 24px);
margin: 0 auto 12px;
}
.rank-period {
height: 60px;
padding: 2px 18px 5px;
border: 0;
background-color: transparent;
background-image: url('./assets/layers/rank-period-sprite.png');
background-position: right center;
background-size: 200% 100%;
color: #f0f0f0;
font-size: 13px;
font-weight: 800;
text-shadow: 0 1px 2px #222;
}
.rank-period.is-active {
background-position: left center;
color: #fff0a0;
text-shadow: 0 1px 3px #7b0000;
}
.ranking-shell {
position: relative;
width: 100%;
min-height: 980px;
padding: 85px 12px 34px;
overflow: hidden;
}
.ranking-palace {
position: absolute;
z-index: 0;
top: 54px;
right: 10px;
left: 10px;
width: calc(100% - 20px);
height: 620px;
object-fit: cover;
border-radius: 12px;
opacity: 0.82;
}
.ranking-frame {
position: absolute;
z-index: 1;
top: 0;
left: 0;
width: 100%;
height: 326px;
object-fit: fill;
pointer-events: none;
}
.ranking-shell > h2,
.view-title {
position: absolute;
z-index: 2;
top: 25px;
right: 56px;
left: 56px;
margin: 0;
color: #fff7d4;
font-family: Georgia, serif;
font-size: 28px;
text-align: center;
text-shadow:
0 2px #860000,
0 0 6px #ffe389;
}
.ranking-state,
.ranking-content {
position: relative;
z-index: 2;
}
.podium {
display: grid;
grid-template-columns: repeat(3, 1fr);
align-items: end;
min-height: 215px;
margin: 0;
padding: 0 3px;
list-style: none;
}
.podium-entry {
display: grid;
justify-items: center;
min-width: 0;
color: #fff8d7;
text-align: center;
}
.podium-entry:nth-child(1) {
grid-column: 2;
grid-row: 1;
align-self: start;
}
.podium-entry:nth-child(2) {
grid-column: 1;
grid-row: 1;
}
.podium-entry:nth-child(3) {
grid-column: 3;
grid-row: 1;
}
.podium-avatar-wrap {
position: relative;
display: grid;
width: 82px;
height: 82px;
place-items: center;
border: 5px solid #ffc83b;
border-radius: 50% 50% 45% 45%;
background: radial-gradient(#ffdd64, #7e1000 67%);
box-shadow:
0 0 0 3px #a93d00,
0 0 20px #ffbd1b;
}
.podium-entry:nth-child(1) .podium-avatar-wrap {
width: 105px;
height: 105px;
border-color: #fff29d;
}
.podium-avatar-wrap::before {
position: absolute;
top: -25px;
color: #ffdf5e;
font-family: Georgia, serif;
font-size: 18px;
font-weight: 900;
text-shadow: 0 2px #7b0000;
content: attr(data-rank-label);
}
.podium-avatar,
.rank-avatar {
width: 100%;
height: 100%;
border-radius: 50%;
object-fit: cover;
}
.avatar-fallback {
display: grid;
width: 100%;
height: 100%;
place-items: center;
border-radius: 50%;
background: linear-gradient(135deg, #ffce50, #9b1800);
color: #fff6d1;
font-size: 24px;
font-weight: 900;
}
.podium-name {
width: 105px;
margin-top: 8px;
overflow: hidden;
font-size: 13px;
font-weight: 800;
text-overflow: ellipsis;
white-space: nowrap;
}
.podium-score,
.rank-score {
display: inline-flex;
align-items: center;
gap: 3px;
color: #fff0a2;
font-size: 12px;
font-weight: 900;
}
.podium-score img,
.rank-score img {
width: 18px;
height: 18px;
}
.rank-list {
display: grid;
gap: 8px;
margin: 12px 0 0;
padding: 0;
list-style: none;
}
.rank-entry,
.self-rank {
position: relative;
display: grid;
grid-template-columns: 28px 52px minmax(0, 1fr) auto;
align-items: center;
min-height: 88px;
padding: 12px 26px 12px 20px;
background: url('./assets/layers/rank-row.png') center / 100% 100% no-repeat;
color: #fff;
}
.rank-number {
color: #ffe968;
font-family: Georgia, serif;
font-size: 18px;
font-weight: 900;
text-align: center;
}
.rank-avatar-wrap {
width: 48px;
height: 48px;
overflow: hidden;
border: 2px solid #ffe078;
border-radius: 50%;
background: #701000;
}
.rank-user {
min-width: 0;
padding: 0 8px;
}
.rank-user strong,
.rank-user small {
display: block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.rank-user strong {
font-size: 13px;
}
.rank-user small {
margin-top: 4px;
color: #fff0c5;
font-size: 10px;
}
.self-rank {
position: sticky;
z-index: 4;
right: 0;
bottom: calc(8px + env(safe-area-inset-bottom));
left: 0;
margin: 8px 10px 0;
filter: drop-shadow(0 5px 8px rgba(61, 0, 0, 0.55));
}
.rewards-view {
min-height: 940px;
padding: 58px 10px 20px;
}
.reward-back {
position: absolute;
z-index: 3;
top: 2px;
right: 12px;
display: grid;
width: 38px;
height: 38px;
padding: 7px;
place-items: center;
border: 2px solid #ffe46b;
border-radius: 50%;
background: #8f1605;
}
.reward-back img {
width: 24px;
height: 24px;
}
.rewards-view > .view-title {
top: 7px;
font-size: 25px;
}
.reward-tier-list {
display: grid;
gap: 14px;
}
.reward-tier {
position: relative;
min-height: 305px;
padding: 70px 24px 30px;
overflow: hidden;
border: 3px solid #e79a15;
border-radius: 16px;
background:
linear-gradient(rgba(87, 0, 0, 0.44), rgba(87, 0, 0, 0.82)),
url('./assets/layers/ranking-palace.jpg') center / cover;
box-shadow:
inset 0 0 0 2px #ffe36a,
0 8px 16px rgba(54, 0, 0, 0.38);
}
.reward-tier h3 {
position: absolute;
top: 12px;
right: 24px;
left: 24px;
margin: 0;
padding: 9px 20px;
border: 2px solid #ffc83e;
border-radius: 8px;
background: linear-gradient(#c91d10, #710000);
color: #fff7d1;
font-family: Georgia, serif;
font-size: 25px;
text-align: center;
text-shadow: 0 2px #730000;
}
.reward-tier .reward-strip {
grid-template-columns: repeat(3, 1fr);
justify-items: center;
gap: 16px 12px;
}
.reward-tier .reward-slot {
transform: scale(1.15);
transform-origin: center top;
margin-bottom: 14px;
}
.empty-copy {
position: relative;
z-index: 2;
margin: 36px auto;
padding: 20px;
color: #ffecc1;
text-align: center;
}
.modal {
position: fixed;
z-index: 100;
inset: 0;
display: grid;
padding: 18px;
place-items: center;
}
.modal-backdrop {
position: absolute;
inset: 0;
background: rgba(24, 0, 0, 0.76);
backdrop-filter: blur(3px);
}
.modal-card {
position: relative;
width: min(100%, 355px);
max-height: min(82vh, 620px);
padding: 58px 28px 34px;
overflow-y: auto;
border: 4px solid #d88c11;
border-radius: 18px;
background:
linear-gradient(rgba(112, 0, 0, 0.86), rgba(55, 0, 0, 0.95)),
url('./assets/layers/ranking-palace.jpg') center / cover;
box-shadow:
inset 0 0 0 2px #ffe06a,
0 18px 40px rgba(0, 0, 0, 0.52);
}
.modal-card::before {
position: absolute;
top: 12px;
right: 36px;
left: 36px;
height: 42px;
border: 2px solid #ffc341;
border-radius: 7px;
background: linear-gradient(#c42314, #6d0000);
content: '';
}
.modal-card h2 {
position: absolute;
z-index: 2;
top: 19px;
right: 55px;
left: 55px;
margin: 0;
overflow: hidden;
color: #fff5c4;
font-family: Georgia, serif;
font-size: 22px;
line-height: 28px;
text-align: center;
text-overflow: ellipsis;
text-shadow: 0 1px #790000;
white-space: nowrap;
}
.modal-close {
position: absolute;
z-index: 4;
top: 7px;
right: 7px;
width: 34px;
height: 34px;
border: 1px solid #ffe36b;
border-radius: 50%;
background: #8c0c02;
color: #fff0a5;
font-size: 24px;
line-height: 28px;
}
.rule-copy h3 {
margin: 18px 0 6px;
color: #ffe078;
font-size: 16px;
}
.rule-copy p {
margin: 0;
color: #fff3dd;
font-size: 13px;
line-height: 1.65;
}
.result-card {
text-align: center;
}
.result-rewards {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 10px;
min-height: 100px;
padding-top: 10px;
}
.result-card p {
margin: 14px 0 18px;
color: #fff4de;
font-size: 12px;
}
.confirm-button {
width: 216px;
height: 58px;
font-size: 20px;
}
.toast {
position: fixed;
z-index: 140;
bottom: calc(24px + env(safe-area-inset-bottom));
left: 50%;
width: max-content;
max-width: calc(100vw - 36px);
padding: 10px 16px;
border: 1px solid rgba(255, 223, 93, 0.58);
border-radius: 18px;
background: rgba(58, 0, 0, 0.92);
color: #fff4d0;
font-size: 13px;
text-align: center;
transform: translateX(-50%);
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
[dir='rtl'] .side-actions {
right: auto;
left: 12px;
}
[dir='rtl'] .reward-back {
right: auto;
left: 12px;
transform: scaleX(-1);
}
[dir='rtl'] .rank-entry,
[dir='rtl'] .self-rank {
padding-right: 20px;
padding-left: 26px;
}
@media (max-width: 340px) {
.task-heading {
min-height: 68px;
}
.task-heading h3 {
-webkit-line-clamp: 3;
}
}
@media (min-width: 600px) {
.gift-challenge-app {
min-height: 100vh;
}
}
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
scroll-behavior: auto !important;
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
}
}