* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 15% 0%, rgba(28, 127, 255, 0.2), transparent 26%),
        radial-gradient(circle at 85% 10%, rgba(0, 214, 201, 0.16), transparent 22%),
        linear-gradient(180deg, #08101e 0%, #050911 100%);
    color: #eef3ff;
    font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
input,
textarea,
select {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

.app-shell {
    min-height: 100vh;
    max-width: 480px;
    margin: 0 auto;
    background:
        linear-gradient(180deg, rgba(13, 20, 35, 0.94) 0%, rgba(7, 11, 18, 0.96) 100%),
        url('https://images.unsplash.com/photo-1511512578047-dfb367046420?auto=format&fit=crop&w=1200&q=80') center top/cover no-repeat;
    backdrop-filter: blur(2px);
    padding: 12px 12px 88px;
}

.topbar,
.section-head,
.modal-head,
.ticker-panel,
.checkbox-row,
.hero-actions,
.filter-grid,
.filter-row,
.product-meta,
.product-footer,
.stat-grid,
.data-grid,
.admin-shell {
    display: flex;
}

.topbar,
.section-head,
.modal-head,
.ticker-panel,
.product-footer {
    align-items: center;
    justify-content: space-between;
}

.topbar {
    margin-bottom: 16px;
    position: sticky;
    top: 0;
    z-index: 9;
    padding: 8px 0 10px;
    background: linear-gradient(180deg, rgba(8, 13, 23, 0.98), rgba(8, 13, 23, 0.82), transparent);
}

.brand {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
}

.sub-brand,
.hero-eyebrow,
.product-meta,
.muted,
.admin-user {
    color: #93a0bc;
    font-size: 12px;
}

.hero-card,
.ticker-panel,
.quick-entry-panel,
.chat-hall-panel,
.filter-panel,
.panel,
.product-card,
.modal-card,
.admin-sidebar,
.admin-main {
    border: 1px solid rgba(102, 144, 255, 0.18);
    background: rgba(10, 17, 30, 0.92);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
    border-radius: 8px;
}

.hero-card {
    padding: 16px;
    margin-bottom: 12px;
    background:
        linear-gradient(135deg, rgba(18, 33, 66, 0.76), rgba(8, 13, 24, 0.92)),
        url('https://images.unsplash.com/photo-1542751110-97427bbecf20?auto=format&fit=crop&w=900&q=80') center/cover;
}

.hero-card-home {
    min-height: 168px;
}

.hero-card-market,
.hero-card-search,
.hero-card-service,
.hero-card-mine {
    min-height: 132px;
}

.hero-card h1 {
    margin: 6px 0 8px;
    font-size: 24px;
    line-height: 1.15;
}

.hero-card p {
    margin: 0;
    color: #cbd5ee;
    font-size: 13px;
    line-height: 1.6;
}

.hero-actions,
.filter-grid,
.filter-row,
.stat-grid,
.data-grid {
    gap: 10px;
    flex-wrap: wrap;
}

.hero-actions {
    margin-top: 14px;
}

.primary-btn,
.ghost-btn,
.notice-trigger,
.icon-btn,
.nav-link-btn {
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}

.primary-btn,
.notice-trigger {
    background: linear-gradient(135deg, #3f76ff, #18c6ff);
    color: #fff;
    padding: 10px 14px;
    font-weight: 700;
}

.ghost-btn,
.nav-link-btn {
    background: rgba(28, 38, 62, 0.95);
    color: #d8e2ff;
    padding: 10px 14px;
    border: 1px solid rgba(115, 144, 216, 0.25);
}

.icon-btn {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.ticker-panel,
.quick-entry-panel,
.filter-panel,
.chat-hall-panel,
.panel,
.product-card,
.admin-main {
    padding: 14px;
    margin-bottom: 12px;
}

.chat-hall-panel {
    padding: 14px;
    margin-bottom: 12px;
}

.mini-section-head {
    margin-bottom: 10px;
}

.hot-chat-list {
    display: grid;
    gap: 8px;
}

.hot-chat-item {
    border-radius: 8px;
    background: rgba(13, 22, 39, 0.92);
    border: 1px solid rgba(90, 113, 170, 0.16);
    padding: 10px;
}

.hot-chat-item strong {
    display: inline-block;
    margin-right: 8px;
}

.hot-chat-item span {
    color: #86a7ff;
    font-size: 12px;
}

.hot-chat-item p {
    margin: 6px 0 0;
    color: #d6def3;
    font-size: 13px;
    line-height: 1.5;
}

.quick-entry-panel {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.hall-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.summary-card {
    border-radius: 8px;
    padding: 10px;
    background: linear-gradient(180deg, rgba(18, 29, 54, 0.96), rgba(11, 17, 31, 0.96));
    border: 1px solid rgba(80, 118, 205, 0.2);
}

.summary-card span {
    display: block;
    color: #8fa2c7;
    font-size: 11px;
    margin-bottom: 6px;
}

.summary-card strong {
    display: block;
    font-size: 18px;
}

.quick-entry {
    min-height: 58px;
    border-radius: 8px;
    padding: 10px 8px;
    background: linear-gradient(180deg, rgba(19, 31, 57, 0.96), rgba(10, 16, 28, 0.96));
    border: 1px solid rgba(83, 120, 205, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #dce6ff;
    font-size: 12px;
    font-weight: 700;
}

.quick-entry:hover,
.quick-entry:focus {
    border-color: rgba(112, 164, 255, 0.5);
}

.filter-grid input,
.publish-form input,
.publish-form textarea,
.publish-form select,
.form-grid input,
.search-box,
select,
textarea,
input {
    width: 100%;
    background: #0f1729;
    border: 1px solid rgba(130, 149, 196, 0.18);
    color: #eef3ff;
    padding: 11px 12px;
    border-radius: 8px;
    outline: none;
}

textarea {
    min-height: 92px;
    resize: vertical;
}

.chip {
    padding: 8px 12px;
    background: rgba(17, 28, 49, 0.9);
    border-radius: 999px;
    border: 1px solid rgba(105, 127, 179, 0.18);
    color: #c9d6f6;
    font-size: 12px;
    cursor: pointer;
}

.chip.active {
    background: linear-gradient(135deg, rgba(63, 118, 255, 0.24), rgba(24, 198, 255, 0.24));
    color: #fff;
    border-color: rgba(75, 157, 255, 0.55);
}

.product-list,
.compact-list {
    display: grid;
    gap: 12px;
}

.product-list {
    grid-template-columns: 1fr;
}

.page-home .product-list,
.page-market .product-list,
.page-search .product-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.product-card h3,
.panel-title,
.table-card h4 {
    margin: 0 0 10px;
}

.product-card p {
    margin: 0 0 10px;
    color: #c2cbe0;
    font-size: 12px;
    line-height: 1.55;
}

.product-card {
    padding: 12px;
    background: linear-gradient(180deg, rgba(12, 20, 35, 0.96), rgba(9, 13, 23, 0.98));
    display: block;
}

.product-thumb {
    height: 110px;
    border-radius: 8px;
    margin-bottom: 0;
    background:
        linear-gradient(135deg, rgba(30, 67, 140, 0.88), rgba(11, 22, 42, 0.96)),
        radial-gradient(circle at top right, rgba(21, 200, 255, 0.4), transparent 30%);
    border: 1px solid rgba(86, 124, 214, 0.24);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 10px;
}

.product-thumb-title {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    line-height: 1.4;
}

.product-title {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.45;
    min-height: auto;
}

.product-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 8px;
}

.product-main {
    min-width: 0;
}

.cashier-head {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.cashier-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.cashier-qr-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.cashier-qr-image {
    width: 240px;
    max-width: 100%;
    border-radius: 8px;
    border: 1px solid rgba(106, 130, 186, 0.18);
    background: #fff;
    padding: 8px;
}

.product-topline {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
    color: #8ea2ca;
    font-size: 12px;
}

.product-category-chip {
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(22, 107, 255, 0.16);
    border: 1px solid rgba(93, 154, 255, 0.22);
    color: #a6cbff;
}

.stat-pill {
    border-radius: 8px;
    background: rgba(18, 28, 48, 0.95);
    border: 1px solid rgba(98, 123, 182, 0.18);
    padding: 6px 8px;
}

.stat-pill span {
    display: block;
    color: #8fa2c7;
    font-size: 11px;
    margin-bottom: 2px;
}

.stat-pill strong {
    display: block;
    font-size: 12px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.tag {
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    background: rgba(24, 198, 255, 0.12);
    border: 1px solid rgba(24, 198, 255, 0.24);
    color: #7be4ff;
}

.price {
    color: #ffd56d;
    font-size: 20px;
    font-weight: 700;
}

.product-meta,
.checkbox-row,
.bottom-nav,
.stat-grid,
.data-grid {
    align-items: center;
}

.product-meta,
.checkbox-row {
    gap: 12px;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(480px, 100%);
    background: rgba(7, 11, 18, 0.98);
    border-top: 1px solid rgba(92, 117, 172, 0.18);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 8px;
    gap: 8px;
}

.nav-item {
    text-align: center;
    padding: 10px 4px;
    border-radius: 8px;
    color: #97a5c6;
    font-size: 12px;
}

.nav-item.active {
    background: rgba(63, 118, 255, 0.18);
    color: #fff;
}

.two-columns {
    display: grid;
    gap: 14px;
}

.mine-page {
    display: grid;
    gap: 12px;
}

.mine-dashboard {
    display: grid;
    gap: 12px;
}

.mine-shortcuts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.mine-shortcut {
    border-radius: 8px;
    padding: 10px 8px;
    text-align: center;
    background: rgba(17, 27, 47, 0.96);
    border: 1px solid rgba(96, 122, 180, 0.16);
    color: #dbe5fd;
    font-size: 12px;
}

.publish-form-visual {
    gap: 12px;
}

.publish-title-row {
    font-size: 26px;
    font-weight: 700;
    text-align: center;
    color: #8f7dff;
}

.publish-upload-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 12px;
}

.publish-upload-box {
    min-height: 120px;
    border-radius: 16px;
    border: 1px dashed rgba(113, 126, 175, 0.35);
    background: rgba(32, 34, 56, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px;
    cursor: pointer;
}

.publish-upload-placeholder {
    color: #aeb7d7;
    font-size: 14px;
    line-height: 1.6;
}

.publish-image-preview {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
}

.publish-image-preview.hidden,
.publish-upload-placeholder.hidden {
    display: none;
}

.publish-tips {
    border-radius: 16px;
    border: 1px solid rgba(154, 105, 34, 0.45);
    background: rgba(39, 26, 22, 0.88);
    color: #f0a93c;
    padding: 14px;
    line-height: 1.8;
    font-size: 13px;
}

.publish-field-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.publish-price-row {
    display: block;
}

.publish-income-box {
    border-radius: 16px;
    background: linear-gradient(135deg, #5f7dff, #6ba7ff);
    color: #fff;
    text-align: center;
    padding: 16px 14px;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    gap: 8px;
}

.publish-income-label {
    font-size: 14px;
    font-weight: 700;
    text-align: left;
}

.publish-income-box input {
    background: rgba(255, 255, 255, 0.96);
    color: #1b2b52;
    border: 0;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
}

.publish-income-meta {
    font-size: 13px;
    opacity: 0.92;
}

.publish-income-box strong {
    font-size: 28px;
    word-break: break-all;
}

.search-only-grid {
    grid-template-columns: 1fr auto;
    align-items: center;
}

.service-page {
    display: grid;
    gap: 12px;
}

.publish-fee-note {
    color: rgba(255, 255, 255, 0.92);
    font-size: 13px;
}

.publish-game-area-row,
.publish-order-type-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.radio-card {
    border-radius: 16px;
    background: rgba(31, 31, 49, 0.94);
    border: 1px solid rgba(101, 118, 166, 0.22);
    color: #dfe7ff;
    padding: 18px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
}

.radio-card.active {
    border-color: #6d84ff;
    box-shadow: 0 0 0 1px rgba(109, 132, 255, 0.24) inset;
}

.radio-card input {
    display: none;
}

.publish-submit-btn {
    min-height: 56px;
    font-size: 18px;
}

.withdraw-upload-box {
    min-height: 140px;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal.hidden {
    display: none;
}

.modal-card {
    width: 100%;
    max-width: 420px;
    padding: 16px;
}

.modal-large {
    max-width: 520px;
    max-height: calc(100vh - 20px);
    overflow: auto;
}

.detail-body {
    display: grid;
    gap: 12px;
}

.detail-image {
    width: 100%;
    border-radius: 12px;
    display: block;
}

.detail-hero {
    border-radius: 8px;
    padding: 14px;
    background: linear-gradient(135deg, rgba(35, 69, 137, 0.88), rgba(9, 16, 31, 0.98));
    border: 1px solid rgba(91, 131, 220, 0.22);
}

.detail-hero h3 {
    margin: 6px 0 8px;
    font-size: 18px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.detail-item {
    padding: 10px;
    border-radius: 8px;
    background: rgba(13, 21, 37, 0.9);
    border: 1px solid rgba(101, 123, 170, 0.16);
}

.detail-item span {
    display: block;
    color: #8fa2c7;
    font-size: 11px;
    margin-bottom: 4px;
}

.detail-actions {
    display: flex;
    gap: 10px;
}

.chat-modal-card {
    display: grid;
    gap: 12px;
}

.chat-room-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.chat-messages {
    min-height: 380px;
    max-height: 56vh;
    overflow: auto;
    display: grid;
    gap: 10px;
    padding: 4px;
}

.chat-bubble {
    max-width: 88%;
    border-radius: 10px;
    padding: 10px 12px;
    background: rgba(16, 24, 42, 0.95);
    border: 1px solid rgba(94, 118, 173, 0.16);
}

.chat-bubble-own {
    margin-left: auto;
    background: linear-gradient(135deg, rgba(35, 95, 255, 0.22), rgba(16, 198, 255, 0.16));
}

.chat-sender {
    color: #8fb2ff;
    font-size: 12px;
    margin-bottom: 4px;
}

.chat-text {
    color: #f0f4ff;
    line-height: 1.6;
    font-size: 14px;
}

.chat-time {
    margin-top: 6px;
    color: #8b99b8;
    font-size: 11px;
}

.chat-input-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.page-hidden {
    display: none;
}

.form-grid,
.publish-form {
    display: grid;
    gap: 10px;
}

.notice-content,
.empty-state {
    color: #cad3e7;
    line-height: 1.7;
    font-size: 13px;
}

.list-row,
.stat-box,
.table-card {
    border-radius: 8px;
    background: rgba(13, 21, 37, 0.88);
    border: 1px solid rgba(96, 114, 154, 0.16);
    padding: 12px;
}

.stat-grid {
    justify-content: space-between;
}

.stat-box {
    flex: 1;
    min-width: 120px;
}

.stat-box strong {
    display: block;
    margin-top: 6px;
    font-size: 22px;
    color: #fff;
}

.admin-body {
    background:
        radial-gradient(circle at left top, rgba(26, 122, 255, 0.18), transparent 26%),
        linear-gradient(180deg, #060a12 0%, #04070d 100%);
}

.admin-login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.admin-login-shell {
    width: 100%;
    max-width: 420px;
}

.admin-login-card {
    border-radius: 8px;
    border: 1px solid rgba(102, 144, 255, 0.18);
    background: rgba(10, 17, 30, 0.94);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
    padding: 22px;
    display: grid;
    gap: 12px;
}

.admin-shell {
    min-height: 100vh;
}

.admin-sidebar {
    width: 280px;
    padding: 20px;
    margin: 18px;
    flex-direction: column;
    gap: 10px;
    background:
        linear-gradient(180deg, rgba(12, 20, 36, 0.96), rgba(7, 12, 22, 0.98)),
        url('https://images.unsplash.com/photo-1560253023-3ec5d502959f?auto=format&fit=crop&w=900&q=80') center/cover;
}

.admin-main {
    flex: 1;
    margin: 18px 18px 18px 0;
    background: rgba(8, 12, 20, 0.86);
}

.admin-menu-btn.active {
    box-shadow: 0 0 0 1px rgba(106, 183, 255, 0.28) inset;
}

.admin-form-panel {
    margin-bottom: 12px;
}

.admin-inline-form {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-settings-grid {
    margin-top: 4px;
}

.full-width {
    width: 100%;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th,
td {
    border-bottom: 1px solid rgba(110, 128, 170, 0.16);
    padding: 10px 8px;
    text-align: left;
}

@media (min-width: 900px) {
    .two-columns {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 899px) {
    .admin-shell {
        flex-direction: column;
    }

    .admin-sidebar,
    .admin-main {
        width: auto;
        margin: 14px;
    }

    .admin-inline-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 390px) {
    .product-card {
        display: block;
    }

    .product-list {
        grid-template-columns: 1fr;
    }

    .quick-entry-panel {
        grid-template-columns: repeat(2, 1fr);
    }

    .hall-summary {
        grid-template-columns: 1fr;
    }

    .mine-shortcuts {
        grid-template-columns: repeat(2, 1fr);
    }

    .chat-room-meta,
    .chat-input-row {
        grid-template-columns: 1fr;
    }

    .cashier-head {
        grid-template-columns: 1fr;
    }

    .publish-upload-row,
    .publish-field-card,
    .publish-price-row,
    .publish-game-area-row,
    .publish-order-type-row {
        grid-template-columns: 1fr;
    }
}
