/* Modern Light Theme - Apple Style */
:root {
    --bg-color: #f5f5f7;
    --card-bg: #ffffff;
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --accent-color: #0071e3;
    --success-color: #34c759;
    --danger-color: #ff3b30;
    --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    --header-blur: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
    padding-bottom: 40px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(var(--header-blur));
    -webkit-backdrop-filter: blur(var(--header-blur));
    border-radius: 20px;
    padding: 15px 25px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 20px;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-image {
    height: 40px;
    width: auto;
}

/* Navigation */
.view-switcher-container {
    position: relative;
}

.view-menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f5f5f7;
    border: none;
    border-radius: 99px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.2s ease;
}

.view-menu-btn:hover {
    background: #e5e5e7;
}

.view-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 6px;
    min-width: 180px;
    display: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

.view-menu.show {
    display: block;
    animation: popIn 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.view-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9em;
    transition: background 0.1s;
}

.view-link:hover {
    background: #f5f5f7;
}

.view-link.active {
    background: #f5f5f7;
    color: var(--accent-color);
    font-weight: 600;
}

.view-icon {
    font-size: 1.1em;
}

/* Status Section */
.status-section {
    display: flex;
    gap: 15px;
    font-size: 0.8em;
    color: var(--text-secondary);
}

.status-row {
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-open {
    color: var(--success-color);
    font-weight: 600;
}

.status-closed {
    color: var(--text-secondary);
}

.status-error {
    color: var(--danger-color);
}

/* Main Content */
.main-content {
    margin-top: 20px;
}

.table-title {
    font-size: 2em;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    text-align: center;
}

/* Scrolling Text */
.scrolling-text-container {
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 30px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.scrolling-text {
    display: flex;
    white-space: nowrap;
    animation: scroll 30s linear infinite;
}

.scrolling-text span {
    margin-right: 40px;
    color: var(--text-secondary);
    font-size: 0.9em;
}

@keyframes scroll {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* Cards Grid */
.table-data-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.data-row {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s;
    border: 1px solid rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.data-row:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

/* Card Content */
.data-cell {
    display: flex;
}

/* Product Name */
.data-cell:nth-child(1) {
    font-size: 1.4em;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

/* Buy Price (Big) */
.data-cell:nth-child(2) {
    font-size: 2.4em;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
    line-height: 1;
}

.data-cell:nth-child(2)::after {
    content: "回购价";
    font-size: 0.25em;
    color: var(--text-secondary);
    font-weight: 500;
    margin-left: 8px;
    vertical-align: middle;
}

/* Sell Price */
.data-cell:nth-child(3) {
    font-size: 1.1em;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-weight: 500;
}

.data-cell:nth-child(3)::before {
    content: "销售价 ";
    margin-right: 4px;
}

/* High/Low */
.data-cell:nth-child(4) {
    background: #f5f5f7;
    border-radius: 12px;
    padding: 12px;
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.high-low-content {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 0.9em;
}

.high-price {
    color: var(--danger-color);
    font-weight: 600;
}

.low-price {
    color: var(--success-color);
    font-weight: 600;
}

.separator {
    display: none;
}

/* Time */
.data-cell:nth-child(5) {
    position: absolute;
    top: 24px;
    right: 24px;
    font-size: 0.8em;
    color: var(--text-secondary);
    background: #f5f5f7;
    padding: 4px 8px;
    border-radius: 6px;
}

/* Animations */
@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.price-up {
    color: var(--danger-color) !important;
}

.price-down {
    color: var(--success-color) !important;
}

/* Update Flash Animation */
.price-update-up {
    animation: flashRed 1s;
}

.price-update-down {
    animation: flashGreen 1s;
}

@keyframes flashRed {
    0% {
        background-color: rgba(255, 59, 48, 0.1);
    }

    100% {
        background-color: transparent;
    }
}

@keyframes flashGreen {
    0% {
        background-color: rgba(52, 199, 89, 0.1);
    }

    100% {
        background-color: transparent;
    }
}

/* Merchant Info */
.merchant-info {
    margin-top: 40px;
    background: #fff;
    border-radius: 24px;
    padding: 30px;
    box-shadow: var(--card-shadow);
}

.merchant-header {
    text-align: center;
    margin-bottom: 30px;
}

.merchant-title {
    font-size: 1.5em;
    font-weight: 700;
}

.merchant-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.merchant-item {
    display: flex;
    gap: 10px;
    font-size: 0.95em;
}

.merchant-label {
    font-weight: 600;
    color: var(--text-primary);
    min-width: 80px;
}

.merchant-text {
    color: var(--text-secondary);
}

.qr-section {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f5f5f7;
}

.qr-container {
    display: flex;
    gap: 40px;
}

.qr-left,
.qr-right {
    text-align: center;
}

.qr-image {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    margin-bottom: 10px;
}

.qr-text {
    font-size: 0.8em;
    color: var(--text-secondary);
}

.qr-divider {
    width: 1px;
    background: #f5f5f7;
}

.copyright-section {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 0.8em;
}

/* Mobile */
@media (max-width: 768px) {
    .merchant-content {
        grid-template-columns: 1fr;
    }

    .header {
        padding: 15px;
    }

    .status-section {
        display: none;
    }

    /* Hide status on mobile to clean up */
    .table-data-content {
        grid-template-columns: 1fr;
    }
}