/* 参考1.html的抖音商城风格 - 完整实现 */

/* 基础样式 */
.product-page {
    margin: 0;
    min-height: 100vh;
    background: #f5f3f0;
    color: #161823;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    padding-bottom: 100px;
}

/* 商品图片区域 */
.product-image-section {
    background: #d5cec6;
    padding: 16px;
}

.image-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.main-image-wrapper {
    flex: 1;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
    aspect-ratio: 1;
    min-height: 300px;
}

.main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.main-image-wrapper video,
.carousel-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 16px;
    background: #f8f8f8;
}

.play-button-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.play-button {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-icon {
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-left: 12px solid #1f2937;
    border-bottom: 8px solid transparent;
    margin-left: 4px;
}

/* 右侧边栏 */
.sidebar {
    display: flex;
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    overflow-y: visible;
}

.sidebar-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px;
    min-width: 200px;
    flex-shrink: 0;
}

.sidebar-title {
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 14px;
}

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

.sidebar-item {
    aspect-ratio: 1;
    background: #f3f4f6;
    border-radius: 4px;
}

.sidebar-more {
    margin-top: 12px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}

.sidebar-tabs {
    display: flex;
    gap: 8px;
    justify-content: center;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    padding: 12px 16px;
    min-width: 200px;
    flex-shrink: 0;
}

.tab-btn {
    padding: 6px 16px;
    background: transparent;
    border: none;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    border-radius: 999px;
}

.tab-btn.active {
    background: #ffffff;
    color: #161823;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 价格区域 */
.price-section {
    background: linear-gradient(135deg, #ec4899 0%, #ef4444 100%);
    margin: 16px;
    border-radius: 16px;
    padding: 16px 18px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.price-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.price-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.price-original {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.price-label {
    font-size: 13px;
    opacity: 0.9;
}

.price-old {
    font-size: 22px;
    font-weight: bold;
    opacity: 0.85;
}

.price-current-box {
    background: #ffffff;
    color: #ef4444;
    padding: 10px 14px;
    border-radius: 999px;
    display: flex;
    align-items: baseline;
    gap: 4px;
    min-width: auto;
    width: fit-content;
}

.price-label-small {
    font-size: 14px;
}

.price-current {
    font-size: 24px;
    font-weight: bold;
}

.price-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.dot-sep {
    opacity: 0.7;
}

.price-right {
    font-size: 18px;
    font-weight: 700;
    opacity: 0.92;
    white-space: nowrap;
    text-align: right;
    letter-spacing: 1px;
}

/* 商品详情 */
.product-details {
    background: #ffffff;
    margin: 0 16px 24px;
    border-radius: 16px;
    padding: 24px;
}

/* 商品变体选择 */
.variant-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.variant-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
}

.variant-item {
    width: 80px;
    height: 80px;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    cursor: pointer;
}

.variant-item.active {
    border-color: #ef4444;
}

.variant-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
}

.variant-item:hover .variant-thumb {
    transform: scale(1.05);
}

.variant-more {
    color: #6b7280;
    font-size: 14px;
    margin-left: 16px;
    white-space: nowrap;
}

/* 商品标题 */
.title-section {
    margin-bottom: 24px;
}

.title-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.tag {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    color: #ffffff;
}

.tag-red {
    background: #ef4444;
}

.tag-blue {
    background: #3b82f6;
}

.product-title {
    font-size: 18px;
    font-weight: 500;
    line-height: 1.6;
    margin: 0 0 12px 0;
    color: #161823;
}

/* 商品介绍 - 可展开/收起 */
.intro-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.intro-content {
    font-size: 15px;
    color: #374151;
    line-height: 1.8;
    word-break: break-word;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    overflow: hidden;
}

.intro-content p {
    margin: 0 0 12px 0;
}

.intro-content p:last-child {
    margin-bottom: 0;
}

.intro-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 8px 0;
}

.intro-content a {
    color: #ef4444;
    text-decoration: none;
}

.intro-content a:hover {
    text-decoration: underline;
}

.intro-content ul,
.intro-content ol {
    margin: 8px 0;
    padding-left: 24px;
}

.intro-content li {
    margin: 4px 0;
}

.intro-content h1,
.intro-content h2,
.intro-content h3,
.intro-content h4,
.intro-content h5,
.intro-content h6 {
    margin: 16px 0 8px 0;
    font-weight: 600;
    color: #161823;
}

.intro-content h1 { font-size: 20px; }
.intro-content h2 { font-size: 18px; }
.intro-content h3 { font-size: 16px; }
.intro-content h4 { font-size: 15px; }
.intro-content h5 { font-size: 14px; }
.intro-content h6 { font-size: 13px; }

/* 支持更多HTML元素 */
.intro-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
}

.intro-content table th,
.intro-content table td {
    border: 1px solid #e5e7eb;
    padding: 8px 12px;
    text-align: left;
}

.intro-content table th {
    background-color: #f9fafb;
    font-weight: 600;
}

.intro-content blockquote {
    border-left: 4px solid #ef4444;
    padding-left: 16px;
    margin: 12px 0;
    color: #6b7280;
    font-style: italic;
}

.intro-content code {
    background-color: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.intro-content pre {
    background-color: #f9fafb;
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 12px 0;
}

.intro-content pre code {
    background-color: transparent;
    padding: 0;
}

.intro-content hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 16px 0;
}

.intro-content video,
.intro-content audio {
    max-width: 100%;
    margin: 12px 0;
    border-radius: 8px;
}

.intro-content iframe {
    max-width: 100%;
    border-radius: 8px;
    margin: 12px 0;
}

.intro-content div {
    margin: 8px 0;
}

.intro-content span {
    display: inline;
}

.intro-content strong,
.intro-content b {
    font-weight: 600;
    color: #161823;
}

.intro-content em,
.intro-content i {
    font-style: italic;
}

.intro-content u {
    text-decoration: underline;
}

.intro-content s,
.intro-content strike,
.intro-content del {
    text-decoration: line-through;
}

.intro-content.collapsed {
    max-height: 90px;
    position: relative;
}

.intro-content.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to bottom, transparent, #ffffff);
    pointer-events: none;
}

.intro-content.expanded {
    max-height: 5000px;
}

.intro-toggle {
    width: 100%;
    margin-top: 12px;
    padding: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6b7280;
    font-size: 14px;
}

.intro-toggle:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #374151;
}

.toggle-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.intro-content.expanded ~ .intro-toggle .toggle-icon {
    transform: rotate(180deg);
}



/* 品牌验证 */
.brand-section {
    background: linear-gradient(135deg, #dbeafe 0%, #e9d5ff 100%);
    border-radius: 12px;
    padding: 6px 12px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-logo {
    width: 32px;
    height: 32px;
    background: #ffffff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    flex-shrink: 0;
}

.brand-info {
    font-size: 13px;
}

.brand-name {
    font-weight: 500;
}

.brand-desc {
    color: #6b7280;
    margin-left: 6px;
    font-size: 12px;
}

.arrow {
    color: #9ca3af;
    font-size: 20px;
}

/* 社交证明 */
.social-proof {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px;
    font-size: 14px;
    margin-bottom: 24px;
}

.proof-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.proof-item-insurance {
    background: #e0f2fe;
    color: #0369a1;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 13px;
}

.proof-item-insurance .proof-icon {
    color: #0284c7;
}

.proof-item-yellow {
    background: #fef3c7;
    color: #92400e;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 13px;
}

.proof-icon {
    width: 16px;
    height: 16px;
    color: #3b82f6;
}


/* 媒体轮播 */
.media-carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-item {
    display: none;
    width: 100%;
    height: 100%;
    position: relative;
    min-height: 300px;
}

.carousel-item img,
.carousel-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

.carousel-item.active {
    display: block;
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    color: #161823;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.carousel-prev {
    left: 12px;
}

.carousel-next {
    right: 12px;
}

.carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: #ffffff;
    width: 24px;
    border-radius: 4px;
}

/* 侧边栏媒体缩略图 */
.media-thumb {
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.media-thumb img,
.media-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 10px;
    pointer-events: none;
}

/* 徽章 */
.badge-section {
    background: #fef3c7;
    border: none;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.badge-content {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.badge-icon {
    font-size: 20px;
}

.badge-text {
    color: #92400e;
    font-weight: 500;
}

/* 退货政策 */
.return-policy {
    border-top: 1px solid #e5e7eb;
    padding-top: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
}

.policy-content {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #374151;
}

.policy-icon {
    width: 20px;
    height: 20px;
}

/* 发货和配送信息 */
.shipping-info {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.shipping-info .shipping-icon {
    margin-top: 2px;
}

.shipping-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #374151;
    margin-top: 0;
}

.shipping-content {
    flex: 1;
}

.shipping-time {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
    font-size: 14px;
}

.shipping-send {
    color: #161823;
    font-weight: 500;
}

.shipping-arrive {
    color: #10b981;
    font-weight: 500;
}

.shipping-location {
    color: #6b7280;
    font-size: 13px;
}

/* 左下角悬浮购买提示 */
.purchase-notification {
    position: fixed;
    bottom: 120px;
    left: 16px;
    z-index: 99;
    background: #ffffff;
    border-radius: 12px;
    padding: 10px 14px;
    min-width: 180px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.purchase-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.notification-content {
    display: flex;
    align-items: center;
}

.notification-text {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    line-height: 1.4;
}

.notification-name {
    font-weight: 500;
    color: #161823;
}

.notification-action {
    color: #ef4444;
    font-weight: 500;
}

/* 底部导航栏 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    padding: 12px 16px;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bottom-nav-left {
    display: flex;
    gap: 24px;
    flex-shrink: 0;
}

.nav-icon-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #161823;
    font-size: 12px;
}

.nav-icon-btn svg {
    width: 24px;
    height: 24px;
}

.buy-button {
    background: linear-gradient(135deg, #ef4444 0%, #ec4899 100%);
    color: #ffffff;
    border: none;
    border-radius: 999px;
    padding: 14px 48px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: relative;
    white-space: nowrap;
    width: 100%;
    max-width: 100%;
}

.buy-button-left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.buy-countdown {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    opacity: 0.9;
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
}

.countdown-label {
    font-size: 12px;
}

.countdown-time {
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    min-width: 60px;
    text-align: left;
}

.buy-button:hover {
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

.buy-button:active {
    transform: scale(0.98);
}

.buy-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.buy-price-text {
    font-size: 18px;
    font-weight: 700;
}

.buy-action-text {
    font-size: 16px;
    font-weight: 600;
}

.btn-loader {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    animation: spin 0.8s linear infinite;
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.buy-button.loading .btn-loader {
    display: block;
}

.buy-button.loading .buy-price-text,
.buy-button.loading .buy-action-text {
    opacity: 0.5;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}


/* 响应式设计 */
@media (min-width: 1024px) {
    .product-image-section {
        padding: 32px;
    }

    .image-container {
        flex-direction: row;
        gap: 16px;
    }

    .main-image-wrapper {
        aspect-ratio: 1;
        min-height: 400px;
    }

    .sidebar {
        flex-direction: column;
        width: 256px;
        overflow-x: visible;
    }

    .sidebar-card {
        min-width: 0;
    }

    .price-section {
        max-width: 1280px;
        margin: 24px auto;
    }

    .price-bg-text {
        font-size: 96px;
    }

    .price-old {
        font-size: 32px;
    }

    .price-current {
        font-size: 40px;
    }

    .product-details {
        max-width: 1280px;
        margin: 0 auto 24px;
        padding: 32px;
    }

    .product-title {
        font-size: 20px;
    }

    .bottom-nav {
        max-width: 1280px;
        margin: 0 auto;
        padding: 12px 32px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .buy-button {
        padding: 16px 56px;
    }

    .buy-price-text {
        font-size: 20px;
    }
    
    .buy-action-text {
        font-size: 18px;
    }
    
    .buy-countdown {
        font-size: 13px;
    }
    
    .countdown-time {
        font-size: 14px;
        min-width: 65px;
    }
}

/* 移动端响应式 - 只缩小字体，不改变布局 */
@media (max-width: 640px) {
    .price-label {
        font-size: 11px;
    }
    
    .price-old {
        font-size: 18px;
    }
    
    .price-current {
        font-size: 20px;
    }
    
    .price-label-small {
        font-size: 12px;
    }
    
    .price-info {
        font-size: 11px;
    }
    
    .price-right {
        font-size: 14px;
    }
    
    .product-title {
        font-size: 16px;
    }
    
    .tag {
        font-size: 11px;
        padding: 3px 10px;
    }
    
    .brand-section {
        padding: 5px 10px;
    }
    
    .brand-content {
        gap: 6px;
    }
    
    .brand-logo {
        width: 28px;
        height: 28px;
        font-size: 10px;
    }
    
    .brand-info {
        font-size: 12px;
    }
    
    .brand-desc {
        font-size: 11px;
        margin-left: 6px;
    }
    
    .proof-item {
        font-size: 12px;
    }
    
    .proof-item-insurance {
        padding: 3px 8px;
        font-size: 11px;
        border-radius: 10px;
    }
    
    .proof-item-insurance .proof-icon {
        width: 14px;
        height: 14px;
    }
    
    .proof-item-yellow {
        padding: 3px 8px;
        font-size: 11px;
        border-radius: 10px;
    }
    
    .badge-section {
        padding: 10px 12px;
        border-radius: 10px;
    }
    
    .badge-content {
        gap: 8px;
        font-size: 12px;
    }
    
    .badge-icon {
        font-size: 18px;
    }
    
    .badge-text {
        font-size: 12px;
    }
    
    .policy-content {
        font-size: 12px;
    }
    
    .shipping-info {
        margin-top: 6px;
        padding-top: 6px;
        gap: 16px;
    }
    
    .shipping-icon {
        width: 18px;
        height: 18px;
    }
    
    .shipping-time {
        font-size: 12px;
        gap: 10px;
        margin-bottom: 3px;
    }
    
    .shipping-location {
        font-size: 11px;
    }
    
    .purchase-notification {
        bottom: 100px;
        left: 12px;
        min-width: 160px;
        padding: 8px 12px;
    }
    
    .notification-text {
        font-size: 12px;
    }
    
    .notification-action {
        font-size: 12px;
    }
    
    .intro-content {
        font-size: 13px;
    }
    
    .toggle-text {
        font-size: 12px;
    }
    
    /* 按钮缩小 */
    .buy-button {
        padding: 12px 36px;
        border-radius: 999px;
    }
    
    .buy-price-text {
        font-size: 16px;
    }
    
    .buy-action-text {
        font-size: 14px;
    }
    
    .buy-countdown {
        font-size: 11px;
        padding-left: 8px;
    }
    
    .countdown-label {
        font-size: 11px;
    }
    
    .countdown-time {
        font-size: 12px;
        min-width: 50px;
    }
    
    .intro-toggle {
        padding: 10px;
        font-size: 12px;
    }
    
    .toggle-icon {
        width: 14px;
        height: 14px;
    }
    
    /* 轮播按钮缩小 */
    .carousel-prev,
    .carousel-next {
        width: 32px;
        height: 32px;
        font-size: 20px;
    }
    
    .carousel-prev {
        left: 8px;
    }
    
    .carousel-next {
        right: 8px;
    }
    
    .carousel-dots {
        bottom: 8px;
        gap: 6px;
    }
    
    .dot {
        width: 6px;
        height: 6px;
    }
    
    .dot.active {
        width: 20px;
    }
    
    /* 变体选择缩小 */
    .variant-item {
        width: 60px;
        height: 60px;
    }
    
    .variant-more {
        font-size: 12px;
    }
    
    /* 价格区域按钮缩小 */
    .price-current-box {
        padding: 1px 10px;
        min-width: auto;
        width: fit-content;
        gap: 3px;
    }
    
    .price-current {
        font-size: 18px !important;
    }
    
    .price-label-small {
        font-size: 11px !important;
    }
}

/* 后台管理页面样式 - 移动端优先 */
.admin-page {
    margin: 0;
    min-height: 100vh;
    background: #f5f5f5;
    color: #161823;
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
    padding-bottom: 20px;
}

.admin-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.admin-header-content {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-title {
    font-size: 20px;
    font-weight: 600;
    color: #161823;
    margin: 0;
}

.admin-actions {
    display: flex;
    gap: 16px;
}

.admin-link {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 6px;
    transition: background 0.2s;
}

.admin-link:hover {
    background: #f5f5f5;
}

/* 导航栏样式 */
.admin-nav {
    display: flex;
    gap: 8px;
    padding: 0 16px 16px;
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: #666;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;
}

.admin-nav-item:hover {
    background: #f5f5f5;
    color: #161823;
}

.admin-nav-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.admin-nav-item.active:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
}

.nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.admin-main {
    max-width: 100%;
    margin: 0 auto;
    padding: 16px;
}

/* 访问统计样式 */
.admin-stats-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.admin-stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.admin-stats-title {
    font-size: 18px;
    font-weight: 600;
    color: #161823;
    margin: 0;
}

.admin-pagination-info {
    font-size: 13px;
    color: #6b7280;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.admin-stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    padding: 16px;
    color: #ffffff;
    text-align: center;
}

.admin-stat-card:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.admin-stat-card:nth-child(3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.admin-stat-card:nth-child(4) {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.admin-stat-card:nth-child(5) {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.admin-stat-card:nth-child(6) {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

.stat-label {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}

.admin-alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.admin-alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.admin-alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.admin-section-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.admin-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.admin-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #161823;
    margin-bottom: 10px;
}

.admin-input,
.admin-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    color: #161823;
    background: #ffffff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.admin-input:focus,
.admin-textarea:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.admin-textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.admin-media-section {
    margin-top: 10px;
}

#mediaFileInput {
    display: none;
}

.admin-upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px;
    background: #f9fafb;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.admin-upload-btn:hover {
    background: #f3f4f6;
    border-color: #ef4444;
    color: #ef4444;
}

.upload-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.admin-hint {
    margin-top: 8px;
    font-size: 12px;
    color: #999;
}

.admin-media-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.admin-media-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    aspect-ratio: 1;
}

.admin-media-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.admin-media-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.admin-media-delete:hover {
    background: rgba(239, 68, 68, 0.9);
}

.admin-media-badge {
    position: absolute;
    bottom: 4px;
    left: 4px;
    padding: 2px 6px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 10px;
    border-radius: 4px;
}

.admin-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    padding: 0 16px;
}

.admin-btn {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.admin-btn-primary {
    background: linear-gradient(135deg, #ef4444 0%, #ec4899 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.admin-btn-primary:hover {
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    transform: translateY(-1px);
}

.admin-btn-primary:active {
    transform: translateY(0);
}

.admin-btn-secondary {
    background: #f3f4f6;
    color: #666;
    border: 1px solid #e5e7eb;
}

.admin-btn-secondary:hover {
    background: #e5e7eb;
}

/* 保留旧的深色主题样式（兼容性） */
.dark-bg {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at 10% 20%, #1a1a1f, #0c0c10 40%), #0a0a0c;
    color: #f8f8fb;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.glass-card {
    background: rgba(30, 30, 38, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(16px);
    border-radius: 20px;
    padding: 24px;
}

.card-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 12px;
}

.card-header h3 {
    margin: 0;
}

.card-header p {
    margin: 0;
    color: #a7a9b3;
    font-size: 13px;
}

.form-grid {
    display: grid;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

.form-grid label {
    color: #c9cbd3;
    font-weight: 600;
    margin-top: 6px;
}

.form-grid input,
.form-grid textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #f6f6fb;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.form-grid input:focus,
.form-grid textarea:focus {
    border-color: rgba(254, 44, 85, 0.7);
    box-shadow: 0 0 0 3px rgba(254, 44, 85, 0.15);
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.upload-field {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.img-preview img {
    width: 160px;
    height: 100px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* 媒体上传区域 */
.media-upload-section {
    margin-bottom: 20px;
}

.media-upload-area {
    margin-bottom: 16px;
}

#mediaFileInput {
    display: none;
}

.upload-btn {
    display: inline-block;
    padding: 10px 20px;
    background: rgba(254, 44, 85, 0.2);
    border: 1px dashed rgba(254, 44, 85, 0.5);
    border-radius: 8px;
    color: #fe2c55;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.upload-btn:hover {
    background: rgba(254, 44, 85, 0.3);
    border-color: rgba(254, 44, 85, 0.7);
}

.upload-hint {
    margin-top: 8px;
    font-size: 12px;
    color: #a7a9b3;
}

.media-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.media-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.media-preview {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.media-actions {
    position: absolute;
    top: 4px;
    right: 4px;
}

.media-delete {
    padding: 4px 8px;
    background: rgba(254, 44, 85, 0.8);
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.media-delete:hover {
    background: rgba(254, 44, 85, 1);
}

.media-type-badge {
    position: absolute;
    bottom: 4px;
    left: 4px;
    padding: 2px 6px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 10px;
    border-radius: 4px;
}

.alert {
    padding: 10px 12px;
    border-radius: 12px;
    margin-bottom: 10px;
    font-size: 14px;
}

.alert-success {
    background: rgba(46, 204, 113, 0.12);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.alert-error {
    background: rgba(254, 44, 85, 0.12);
    color: #fe2c55;
    border: 1px solid rgba(254, 44, 85, 0.3);
}

.link {
    color: #fff;
    text-decoration: none;
    margin-left: 10px;
    font-weight: 600;
}

.login-card {
    max-width: 360px;
    width: 100%;
    box-sizing: border-box;
}

.login-card .form-grid {
    width: 100%;
    box-sizing: border-box;
}

.btn {
    border: none;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn.primary {
    background: linear-gradient(135deg, #fe2c55, #ff6a88);
    color: #fff;
    padding: 12px 20px;
    box-shadow: 0 12px 25px rgba(254, 44, 85, 0.35);
}

.btn.primary.large {
    padding: 16px 26px;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn.ghost {
    background: rgba(255, 255, 255, 0.05);
    color: #f1f1f3;
    padding: 10px 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn.full {
    width: 100%;
}

.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 12px 18px;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(12px);
    z-index: 10;
}

/* 全屏抢购加载动画 */
.purchase-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.purchase-loading-overlay.show {
    display: flex;
    opacity: 1;
}

.purchase-loading-content {
    text-align: center;
    color: #fff;
}

.purchase-loading-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top-color: #fe2c55;
    border-radius: 50%;
    animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.spinner-ring:nth-child(1) {
    animation-delay: -0.45s;
}

.spinner-ring:nth-child(2) {
    animation-delay: -0.3s;
    border-top-color: #ff6b9d;
    width: 70%;
    height: 70%;
    top: 15%;
    left: 15%;
}

.spinner-ring:nth-child(3) {
    animation-delay: -0.15s;
    border-top-color: #ffa8c5;
    width: 50%;
    height: 50%;
    top: 25%;
    left: 25%;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.douyin-icon-wrapper {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.douyin-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.purchase-loading-text {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.loading-text-main {
    font-size: 24px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 1px;
}

.loading-text-sub {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.5px;
}

@media (max-width: 480px) {
    .purchase-loading-spinner {
        width: 60px;
        height: 60px;
        margin-bottom: 20px;
    }
    
    .douyin-icon {
        width: 40px;
        height: 40px;
    }
    
    .douyin-icon-wrapper {
        margin: 16px 0;
    }
    
    .loading-text-main {
        font-size: 20px;
    }
    
    .loading-text-sub {
        font-size: 13px;
    }
}

/* 收货地址模态框 */
.address-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: flex-end;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.address-modal-overlay.show {
    display: flex;
    opacity: 1;
}

.address-modal {
    width: 100%;
    max-width: 500px;
    background: #ffffff;
    border-radius: 20px 20px 0 0;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

.address-modal-overlay.show .address-modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 1;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #161823;
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 28px;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #161823;
}

.address-form {
    padding: 20px;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 10px;
}

.address-select-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
}

.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    color: #161823;
    background: #ffffff;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
    transition: all 0.2s;
}

.form-select:focus {
    outline: none;
    border-color: #fe2c55;
    box-shadow: 0 0 0 3px rgba(254, 44, 85, 0.1);
}

.form-select:disabled {
    background-color: #f9fafb;
    color: #9ca3af;
    cursor: not-allowed;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    color: #161823;
    background: #ffffff;
    box-sizing: border-box;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #fe2c55;
    box-shadow: 0 0 0 3px rgba(254, 44, 85, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

.form-input:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.btn-cancel,
.btn-submit {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel {
    background: #f3f4f6;
    color: #374151;
}

.btn-cancel:hover {
    background: #e5e7eb;
}

.btn-submit {
    background: linear-gradient(135deg, #fe2c55 0%, #ef4444 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(254, 44, 85, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(254, 44, 85, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 480px) {
    .address-modal {
        border-radius: 16px 16px 0 0;
    }
    
    .modal-header {
        padding: 18px 16px 14px;
    }
    
    .modal-title {
        font-size: 16px;
    }
    
    .address-form {
        padding: 16px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-actions {
        margin-top: 24px;
        padding-top: 16px;
    }
}

/* 用户列表样式 */
.admin-user-list {
    margin-top: 16px;
}

.admin-loading,
.admin-empty {
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
    font-size: 14px;
}

.admin-user-table {
    overflow-x: auto;
}

.admin-user-header {
    display: grid;
    grid-template-columns: 1.5fr 0.8fr 1.5fr 1.5fr 0.8fr;
    gap: 12px;
    padding: 12px 16px;
    background: #f9fafb;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    color: #6b7280;
}

.admin-user-row {
    display: grid;
    grid-template-columns: 1.5fr 0.8fr 1.5fr 1.5fr 0.8fr;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 13px;
    color: #374151;
    align-items: center;
}

/* 设备列表样式 */
.admin-device-table .admin-user-header {
    grid-template-columns: 1.2fr 1fr 0.8fr 1fr 1fr 1fr 1.5fr;
}

.admin-device-table .admin-user-row {
    grid-template-columns: 1.2fr 1fr 0.8fr 1fr 1fr 1fr 1.5fr;
}

.device-col-code {
    font-family: 'Courier New', monospace;
}

.device-col-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.device-col-actions .admin-link {
    font-size: 12px;
    padding: 4px 8px;
}

.admin-user-row:last-child {
    border-bottom: none;
}

.user-col-ip {
    font-family: 'Courier New', monospace;
    color: #1f2937;
}

.user-col-status {
    display: flex;
    align-items: center;
}

.user-status-online {
    display: inline-block;
    padding: 4px 8px;
    background: #d1fae5;
    color: #065f46;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.user-status-offline {
    display: inline-block;
    padding: 4px 8px;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.user-col-first,
.user-col-last {
    color: #6b7280;
}

.user-col-count {
    text-align: right;
    color: #1f2937;
    font-weight: 500;
}

/* 设备列表样式 */
.admin-device-table {
    overflow-x: auto;
}

.admin-device-header {
    display: grid;
    grid-template-columns: 1.1fr 1fr 0.6fr 0.7fr 2fr 1.2fr 1.6fr;
    gap: 12px;
    padding: 12px 16px;
    background: #f9fafb;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    color: #6b7280;
}

.admin-device-row {
    display: grid;
    grid-template-columns: 1.1fr 1fr 0.6fr 0.7fr 2fr 1.2fr 1.6fr;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 13px;
    color: #374151;
    align-items: center;
}

.admin-device-row:last-child {
    border-bottom: none;
}

.device-col-code {
    font-family: 'Courier New', monospace;
}

.device-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.device-status-active {
    background: #d1fae5;
    color: #065f46;
}

.device-status-inactive {
    background: #f3f4f6;
    color: #6b7280;
}

.device-status-wait {
    background: #fee2e2;
    color: #991b1b;
}

.device-status-ok {
    background: #e0f2fe;
    color: #0369a1;
}

.admin-inline-form {
    display: inline-block;
    margin-right: 6px;
}

.admin-btn-small {
    padding: 6px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #f9fafb;
    color: #374151;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.admin-btn-small:hover {
    background: #f3f4f6;
}

.admin-btn-danger {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #991b1b;
}

.admin-btn-danger:hover {
    background: #fecaca;
}

@media (max-width: 768px) {
    .admin-user-header,
    .admin-user-row {
        grid-template-columns: 1.2fr 0.8fr 1fr 1fr 0.6fr;
        gap: 8px;
        padding: 10px 12px;
        font-size: 12px;
    }

    .admin-device-header,
    .admin-device-row {
        grid-template-columns: 1.2fr 1fr 0.6fr 0.6fr 1.6fr 1fr 1.2fr;
        gap: 8px;
        padding: 10px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .admin-nav {
        padding: 0 12px 12px;
        gap: 6px;
    }
    
    .admin-nav-item {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .nav-icon {
        width: 18px;
        height: 18px;
    }
    
    .admin-user-header,
    .admin-user-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .admin-user-header {
        display: none;
    }
    
    .admin-user-row {
        padding: 12px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        margin-bottom: 8px;
    }
    
    .user-col-ip::before {
        content: 'IP地址: ';
        font-weight: 600;
        color: #6b7280;
    }
    
    .user-col-status::before {
        content: '状态: ';
        font-weight: 600;
        color: #6b7280;
    }
    
    .user-col-first::before {
        content: '首次访问: ';
        font-weight: 600;
        color: #6b7280;
    }
    
    .user-col-last::before {
        content: '最后访问: ';
        font-weight: 600;
        color: #6b7280;
    }
    
    .user-col-count::before {
        content: '访问次数: ';
        font-weight: 600;
        color: #6b7280;
    }

    .admin-device-header {
        display: none;
    }

    .admin-device-row {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 12px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        margin-bottom: 8px;
    }

    .device-col-code::before {
        content: '识别码: ';
        font-weight: 600;
        color: #6b7280;
    }

    .device-col-name::before {
        content: '备注: ';
        font-weight: 600;
        color: #6b7280;
    }

    .device-col-status::before {
        content: '状态: ';
        font-weight: 600;
        color: #6b7280;
    }

    .device-col-need::before {
        content: '需新链: ';
        font-weight: 600;
        color: #6b7280;
    }

    .device-col-link::before {
        content: '链接: ';
        font-weight: 600;
        color: #6b7280;
    }

    .device-col-expire::before {
        content: '到期: ';
        font-weight: 600;
        color: #6b7280;
    }

    .device-col-actions::before {
        content: '操作: ';
        font-weight: 600;
        color: #6b7280;
        display: block;
        margin-bottom: 6px;
    }
    
    .admin-stats-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* 分页样式 */
.admin-pagination {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #374151;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover:not(:disabled) {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #1f2937;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn-active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-color: transparent;
}

.pagination-btn-active:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
    color: #ffffff;
}

.pagination-ellipsis {
    padding: 0 8px;
    color: #9ca3af;
    font-size: 14px;
}

@media (max-width: 480px) {
    .pagination-btn {
        min-width: 32px;
        height: 32px;
        padding: 0 8px;
        font-size: 13px;
    }
    
    .pagination-controls {
        gap: 4px;
    }
    
    .admin-section-group {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .admin-section-group {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}
