chatapp-h5/h5/exchange-gold-coins/exchange-gold-coins.css
2026-04-24 21:13:53 +08:00

333 lines
5.2 KiB
CSS

* {
box-sizing: border-box;
margin: 0;
padding: 0;
font-family: "Baloo 2", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
line-height: 1.35;
}
html,
body {
width: 100%;
min-height: 100%;
-webkit-font-smoothing: antialiased;
-webkit-text-size-adjust: 100%;
-webkit-overflow-scrolling: touch;
-webkit-tap-highlight-color: transparent;
}
body {
color: rgba(0, 0, 0, 0.8);
background: #fff;
}
button {
border: 0;
background: transparent;
color: inherit;
font: inherit;
}
.exchange-gold-coins {
width: 100vw;
min-height: 100vh;
background-color: #fff;
background-image: url("/assets/secondBg-CSqvFWr0-1776148661447.png");
background-size: cover;
background-position: top center;
}
.page-header {
position: sticky;
top: 0;
z-index: 10;
display: grid;
grid-template-columns: 44px 1fr 58px;
align-items: center;
min-height: calc(48px + env(safe-area-inset-top));
padding: env(safe-area-inset-top) 10px 0;
background: rgba(255, 255, 255, 0.96);
}
.page-header h1 {
min-width: 0;
color: #111;
font-size: 1.25em;
font-weight: 700;
text-align: center;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.back-button,
.lang-button {
min-width: 36px;
height: 36px;
display: flex;
align-items: center;
justify-content: center;
}
.back-button {
padding: 6px;
}
.back-button img {
width: 100%;
height: 100%;
}
.lang-button {
justify-self: end;
padding: 0 10px;
border-radius: 999px;
background: #dff5e7;
color: #1f6f46;
font-size: 0.86em;
font-weight: 700;
}
.content {
position: relative;
z-index: 2;
display: flex;
flex-direction: column;
gap: 16px;
padding: 16px;
}
.section-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
}
.section-title {
color: rgba(0, 0, 0, 0.8);
font-weight: 700;
}
.details-button {
display: flex;
align-items: center;
color: rgba(0, 0, 0, 0.42);
font-weight: 600;
}
.details-button img {
width: 16px;
margin-left: 4px;
}
.surface-card {
margin-bottom: 12px;
border: 1px solid rgba(194, 217, 240, 0.82);
border-radius: 20px;
background: #fff;
box-shadow: 0 8px 20px rgba(69, 129, 89, 0.12);
}
.salary-card {
padding: 16px;
}
.salary-label {
font-size: 1em;
font-weight: 600;
}
.salary-value {
margin-left: 6px;
color: #333;
font-size: 1.1em;
font-weight: 800;
}
.loading-text {
margin-left: 6px;
color: #1f6f46;
font-weight: 700;
}
.coins-title {
margin-bottom: 10px;
}
.coins-card {
padding: 16px;
}
.coin-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 12px;
}
.coin-item {
aspect-ratio: 1 / 1;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 6px;
border: 2px solid #ffdb81;
border-radius: 12px;
background: #ffe5a1;
cursor: pointer;
transition: transform 0.2s, border-color 0.2s, background-color 0.2s;
}
.coin-item.selected {
border-color: #ffb700;
background: #fdca49;
}
.coin-item:active {
transform: scale(0.98);
}
.coin-item img {
width: 40%;
}
.coin-price {
color: #131111;
font-weight: 600;
}
.action-row {
display: flex;
justify-content: center;
margin-top: 10px;
}
.exchange-button {
width: 70%;
min-height: 44px;
border-radius: 32px;
background: #ff9500;
color: #fff;
font-weight: 700;
cursor: pointer;
}
.exchange-button:disabled {
background: #ccc;
cursor: not-allowed;
}
.modal-layer {
position: fixed;
inset: 0;
z-index: 20;
display: flex;
align-items: center;
justify-content: center;
background: rgba(0, 0, 0, 0.45);
}
.modal-card {
width: 80%;
max-width: 420px;
display: flex;
flex-direction: column;
align-items: center;
gap: 3vw;
padding: 12px;
border-radius: 12px;
background: #fff;
}
.modal-title {
color: rgba(0, 0, 0, 0.8);
font-size: 1.2em;
font-weight: 800;
}
.modal-message {
color: rgba(0, 0, 0, 0.42);
font-size: 1em;
font-weight: 700;
text-align: center;
}
.modal-actions {
width: 80%;
display: flex;
justify-content: space-between;
align-items: center;
}
.modal-primary,
.modal-secondary {
width: 45%;
min-height: 38px;
display: flex;
justify-content: center;
align-items: center;
border-radius: 70px;
padding: 8px 12px;
font-weight: 800;
}
.modal-secondary {
border: 1px solid #ffb805;
background: #fff;
color: #ff9500;
}
.modal-primary {
background: #ff9500;
color: #fff;
}
.toast {
position: fixed;
left: 50%;
bottom: calc(22px + env(safe-area-inset-bottom));
z-index: 30;
max-width: calc(100% - 40px);
transform: translateX(-50%);
padding: 9px 13px;
border-radius: 999px;
background: rgba(22, 56, 36, 0.92);
color: #fff;
font-size: 0.9em;
font-weight: 700;
text-align: center;
}
[hidden] {
display: none !important;
}
[dir="rtl"] .details-button {
flex-direction: row-reverse;
}
[dir="rtl"] .details-button img {
margin-left: 0;
margin-right: 4px;
transform: scaleX(-1);
}
@media screen and (max-width: 360px) {
* {
font-size: 10px;
}
}
@media screen and (min-width: 360px) {
* {
font-size: 12px;
}
}
@media screen and (min-width: 768px) {
* {
font-size: 24px;
}
}