* { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 14px; }
@media (min-width: 640px) { html { font-size: 14px; } }
@media (min-width: 1024px) { html { font-size: 15px; } }
@media (min-width: 1280px) { html { font-size: 16px; } }

body {
    background: #05100c !important;
    color: #f5f5f0;
    font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    line-height: 1.6;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(197, 160, 89, 0.4); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #c5a059; }
::-webkit-scrollbar-corner { background: transparent; }

* { scrollbar-width: thin; scrollbar-color: rgba(197, 160, 89, 0.4) transparent; }

a { color: #c5a059; text-decoration: none; transition: color 0.2s; }
a:hover { color: #ffca28; }

.text-gold { color: #c5a059 !important; }
.text-gold-light { color: #ffca28 !important; }
.text-muted-gold { color: rgba(197, 160, 89, 0.7) !important; }

.bg-gold { background-color: #c5a059 !important; }
.bg-gold-dark { background-color: #0a1f18 !important; }
.bg-gold-light { background-color: rgba(197, 160, 89, 0.08) !important; }

.border-gold { border-color: rgba(197, 160, 89, 0.3) !important; }
.border-gold-strong { border-color: #c5a059 !important; }

.btn-outline-gold {
    color: #c5a059;
    border-color: rgba(197, 160, 89, 0.5);
    background: transparent;
    transition: all 0.2s ease;
}
.btn-outline-gold:hover,
.btn-outline-gold:focus,
.btn-outline-gold:active {
    color: #000 !important;
    background: #c5a059 !important;
    border-color: #c5a059 !important;
    box-shadow: 0 0 15px rgba(197, 160, 89, 0.3);
}

.btn-gold {
    color: #000;
    background: #c5a059;
    border-color: #c5a059;
    font-weight: 600;
    transition: all 0.2s ease;
}
.btn-gold:hover,
.btn-gold:focus,
.btn-gold:active {
    color: #000 !important;
    background: #ffca28 !important;
    border-color: #ffca28 !important;
    filter: brightness(1.05);
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.4);
}

.sy-user-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(197, 160, 89, 0.3);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.85rem;
    color: #f5f5f0;
    transition: all 0.2s;
}
.sy-user-badge:hover {
    border-color: #c5a059;
    background: rgba(197, 160, 89, 0.08);
}
.sy-user-badge i { color: #c5a059; font-size: 0.8rem; }

.random-box-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 15px;
    max-width: 1200px;
    margin: 0 auto;
}
@media (min-width: 640px) { .random-box-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .random-box-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; } }
@media (min-width: 1280px) { .random-box-grid { grid-template-columns: repeat(5, 1fr); gap: 20px; } }

.random-box-card {
    background: linear-gradient(180deg, rgba(10, 31, 24, 0.6) 0%, rgba(5, 16, 12, 0.9) 100%);
    border: 1px solid rgba(197, 160, 89, 0.3);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}
.random-box-card:hover {
    border-color: #c5a059;
    transform: translateY(-6px);
    box-shadow: 0 8px 25px rgba(197, 160, 89, 0.15), 0 0 0 1px rgba(197, 160, 89, 0.3);
}

.random-box-img-wrap {
    position: relative;
    aspect-ratio: 1;
    background: #05100c;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.random-box-overlay {
    position: absolute;
    inset: 0;
    background: rgba(5, 16, 12, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
    pointer-events: none;
    transition: opacity 0.3s;
}
.random-box-card:hover .random-box-overlay {
    background: rgba(5, 16, 12, 0.5);
    backdrop-filter: blur(3px);
}

.random-box-q {
    font-size: 3.5rem;
    font-weight: 700;
    font-family: Georgia, 'Times New Roman', serif;
    color: #c5a059;
    opacity: 0.92;
    line-height: 1;
    margin-bottom: 4px;
    text-shadow: 0 0 20px rgba(197, 160, 89, 0.5);
    animation: pulse-gold 2.5s ease-in-out infinite;
}
.random-box-label {
    font-weight: 600;
    letter-spacing: 4px;
    font-size: 0.85rem;
    color: #c5a059;
    opacity: 0.8;
}

@keyframes pulse-gold {
    0%, 100% { transform: scale(1); opacity: 0.92; }
    50% { transform: scale(1.08); opacity: 1; }
}

.random-box-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
    filter: blur(5px) saturate(0.7);
    transition: all 0.4s ease;
}
.random-box-card:hover .random-box-img {
    opacity: 0.6;
    filter: blur(2px) saturate(0.9);
    transform: scale(1.05);
}

.random-box-card.revealed .random-box-overlay { display: none; }
.random-box-card.revealed .random-box-img {
    opacity: 1;
    filter: blur(0) saturate(1);
}
.random-box-card.revealed:hover .random-box-img {
    transform: scale(1.08);
    opacity: 1;
}

.random-box-noimg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c5a059;
    font-size: 2.5rem;
    opacity: 0.35;
}

.random-badge-code {
    position: absolute;
    bottom: 6px;
    left: 6px;
    background: rgba(0, 0, 0, 0.75);
    color: #c5a059;
    font-size: 0.7rem;
    padding: 2px 7px;
    border-radius: 4px;
    border: 1px solid rgba(197, 160, 89, 0.35);
    z-index: 3;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}
.random-badge-see {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(197, 160, 89, 0.15);
    border: 1px solid #c5a059;
    color: #c5a059;
    font-size: 0.7rem;
    padding: 2px 9px;
    border-radius: 12px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 3px;
    backdrop-filter: blur(4px);
}
.random-badge-revealed {
    position: absolute;
    top: 6px;
    right: 6px;
    background: #c5a059;
    color: #000;
    font-size: 0.7rem;
    padding: 2px 9px;
    border-radius: 12px;
    z-index: 3;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 3px;
}

.random-box-info {
    padding: 10px 12px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.random-box-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #f5f5f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.random-box-code {
    font-size: 0.75rem;
    color: #666;
    font-family: 'Courier New', monospace;
}
.random-box-tag {
    display: inline-block;
    border: 1px solid rgba(197, 160, 89, 0.4);
    color: #c5a059;
    font-size: 0.7rem;
    padding: 1px 7px;
    border-radius: 3px;
    margin-right: 3px;
    margin-bottom: 2px;
    background: rgba(197, 160, 89, 0.05);
}
.random-price {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffca28;
    margin-top: auto;
    text-shadow: 0 0 8px rgba(255, 202, 40, 0.2);
}
.random-price.inquiry {
    color: #888;
    font-weight: 400;
    font-size: 0.85rem;
    text-shadow: none;
}

@keyframes firework-burst {
    0% { transform: scale(0); opacity: 1; }
    50% { opacity: 1; }
    100% { transform: scale(1); opacity: 0; }
}
@keyframes firework-rise {
    0% { transform: translateY(100vh) scale(0.3); opacity: 0; }
    10% { opacity: 1; }
    80% { opacity: 1; }
    100% { transform: translateY(-20vh) scale(1); opacity: 0; }
}
.firework-particle {
    position: fixed;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
}

.sy-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}
.sy-modal-overlay.show { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp {
    from { transform: translateY(30px) scale(0.96); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.sy-modal-box {
    background: #0a1f18;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 8px;
    padding: 28px;
    position: relative;
    border: 2px solid rgba(197, 160, 89, 0.5);
    box-shadow: 0 0 60px rgba(197, 160, 89, 0.2), inset 0 1px 0 rgba(197, 160, 89, 0.1);
    animation: slideUp 0.25s ease;
}
.sy-modal-close {
    position: absolute;
    top: 10px;
    right: 16px;
    color: #888;
    font-size: 1.8rem;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
    padding: 0 6px;
    transition: color 0.2s;
}
.sy-modal-close:hover { color: #ffca28; }
.sy-modal-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #c5a059;
    margin-bottom: 20px;
    text-align: center;
    letter-spacing: 1px;
}

.form-control,
.form-select {
    background: #05100c;
    border: 1px solid rgba(197, 160, 89, 0.3);
    color: #f5f5f0;
    border-radius: 6px;
    transition: all 0.2s;
}
.form-control:focus,
.form-select:focus {
    background: #05100c;
    color: #f5f5f0;
    border-color: #c5a059;
    box-shadow: 0 0 0 0.2rem rgba(197, 160, 89, 0.15);
    outline: none;
}
.form-control::placeholder { color: rgba(255, 255, 255, 0.3); }
.form-label { color: rgba(197, 160, 89, 0.9); font-weight: 500; font-size: 0.9rem; }
.input-group-text {
    background: rgba(197, 160, 89, 0.08);
    border: 1px solid rgba(197, 160, 89, 0.3);
    color: #c5a059;
}

.card {
    background: #0a1f18;
    border: 1px solid rgba(197, 160, 89, 0.2);
    border-radius: 10px;
}
.card-header {
    background: rgba(197, 160, 89, 0.06);
    border-bottom: 1px solid rgba(197, 160, 89, 0.2);
    color: #c5a059;
    font-weight: 600;
}
.card-footer {
    background: rgba(197, 160, 89, 0.03);
    border-top: 1px solid rgba(197, 160, 89, 0.15);
}

.table {
    color: #e0e0dc;
    --bs-table-bg: transparent;
}
.table thead th {
    background: rgba(197, 160, 89, 0.08);
    border-bottom: 2px solid rgba(197, 160, 89, 0.3);
    color: #c5a059;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.table tbody td {
    border-bottom: 1px solid rgba(197, 160, 89, 0.1);
    vertical-align: middle;
    font-size: 0.9rem;
}
.table tbody tr:hover { background: rgba(197, 160, 89, 0.04); }
.table-striped > tbody > tr:nth-of-type(odd) > * {
    --bs-table-accent-bg: rgba(255, 255, 255, 0.015);
}

.badge-gold {
    background: rgba(197, 160, 89, 0.15);
    color: #c5a059;
    border: 1px solid rgba(197, 160, 89, 0.4);
}
.badge-gold-light {
    background: rgba(255, 202, 40, 0.15);
    color: #ffca28;
    border: 1px solid rgba(255, 202, 40, 0.4);
}
.badge-success { background: rgba(46, 204, 113, 0.15); color: #2ecc71; border: 1px solid rgba(46, 204, 113, 0.4); }
.badge-danger { background: rgba(231, 76, 60, 0.15); color: #e74c3c; border: 1px solid rgba(231, 76, 60, 0.4); }
.badge-warning { background: rgba(243, 156, 18, 0.15); color: #f39c12; border: 1px solid rgba(243, 156, 18, 0.4); }
.badge-secondary { background: rgba(255, 255, 255, 0.08); color: #aaa; border: 1px solid rgba(255, 255, 255, 0.2); }

.nav-tabs {
    border-bottom: 2px solid rgba(197, 160, 89, 0.2);
}
.nav-tabs .nav-link {
    color: rgba(197, 160, 89, 0.6);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    padding: 12px 20px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s;
    border-radius: 0;
}
.nav-tabs .nav-link:hover {
    color: #c5a059;
    border-bottom-color: rgba(197, 160, 89, 0.4);
    background: rgba(197, 160, 89, 0.03);
}
.nav-tabs .nav-link.active {
    color: #000;
    background: #c5a059;
    border-bottom-color: #c5a059;
    font-weight: 600;
    border-radius: 6px 6px 0 0;
}

.pagination .page-link {
    background: #0a1f18;
    border: 1px solid rgba(197, 160, 89, 0.3);
    color: #c5a059;
}
.pagination .page-link:hover {
    background: rgba(197, 160, 89, 0.1);
    border-color: #c5a059;
    color: #ffca28;
}
.pagination .page-item.active .page-link {
    background: #c5a059;
    border-color: #c5a059;
    color: #000;
}
.pagination .page-item.disabled .page-link {
    background: #05100c;
    color: #555;
    border-color: rgba(197, 160, 89, 0.1);
}

.upload-area {
    border: 2px dashed rgba(197, 160, 89, 0.4);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    background: rgba(197, 160, 89, 0.03);
    cursor: pointer;
    transition: all 0.25s;
}
.upload-area:hover,
.upload-area.dragover {
    border-color: #c5a059;
    background: rgba(197, 160, 89, 0.08);
    transform: scale(1.01);
}
.upload-area i {
    font-size: 2.5rem;
    color: rgba(197, 160, 89, 0.5);
    margin-bottom: 10px;
    transition: color 0.2s;
}
.upload-area:hover i { color: #c5a059; }
.upload-area p { color: #888; margin: 0; font-size: 0.9rem; }
.upload-area p strong { color: #c5a059; }

.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 15px;
}
.thumbnail-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(197, 160, 89, 0.3);
}
.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.thumbnail-item .thumb-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(231, 76, 60, 0.9);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all 0.15s;
}
.thumbnail-item .thumb-remove:hover {
    background: #e74c3c;
    transform: scale(1.1);
}

.stat-card {
    background: linear-gradient(135deg, rgba(197, 160, 89, 0.08) 0%, rgba(10, 31, 24, 0.6) 100%);
    border: 1px solid rgba(197, 160, 89, 0.25);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.25s;
}
.stat-card:hover {
    border-color: rgba(197, 160, 89, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}
.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(197, 160, 89, 0.15);
    color: #c5a059;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 12px;
}
.stat-card .stat-label {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 4px;
}
.stat-card .stat-value {
    color: #ffca28;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
}
.stat-card .stat-sub {
    color: rgba(197, 160, 89, 0.7);
    font-size: 0.8rem;
    margin-top: 4px;
}

.spinner-border.text-gold { color: #c5a059 !important; border-color: #c5a059; border-right-color: transparent; }

.alert {
    border-radius: 8px;
    border: none;
}
.alert-info {
    background: rgba(52, 152, 219, 0.1);
    color: #5dade2;
    border: 1px solid rgba(52, 152, 219, 0.3);
}
.alert-success {
    background: rgba(46, 204, 113, 0.1);
    color: #58d68d;
    border: 1px solid rgba(46, 204, 113, 0.3);
}
.alert-warning {
    background: rgba(243, 156, 18, 0.1);
    color: #f5b041;
    border: 1px solid rgba(243, 156, 18, 0.3);
}
.alert-danger {
    background: rgba(231, 76, 60, 0.1);
    color: #ec7063;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.dropdown-menu {
    background: #0a1f18;
    border: 1px solid rgba(197, 160, 89, 0.3);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.dropdown-item {
    color: #e0e0dc;
    padding: 8px 16px;
    font-size: 0.9rem;
}
.dropdown-item:hover,
.dropdown-item:focus {
    background: rgba(197, 160, 89, 0.1);
    color: #c5a059;
}
.dropdown-divider { border-color: rgba(197, 160, 89, 0.15); }

.tooltip-inner {
    background: #0a1f18;
    color: #c5a059;
    border: 1px solid rgba(197, 160, 89, 0.4);
    border-radius: 6px;
}

.countdown-timer {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #e74c3c;
    font-weight: 600;
}
.countdown-timer.urgent {
    animation: urgent-pulse 1s ease-in-out infinite;
}
@keyframes urgent-pulse {
    0%, 100% { color: #e74c3c; }
    50% { color: #ffca28; }
}
