:root {
    --color-primary: #ea580c;
    --color-primary-hover: #c2410c;
    --color-primary-soft: rgba(234, 88, 12, 0.1);
    --color-accent: #dc2626;
    --color-bg: #ffffff;
    --color-bg-soft: #fff7ed;
    --color-surface: #ffffff;
    --color-surface-hover: #fff7ed;
    --color-text: #1f2937;
    --color-text-secondary: #6b7280;
    --color-border: #e5e7eb;
    --radius: 4px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-lg: 0 6px 20px rgba(0,0,0,0.1);
    --max-width: 1100px;
}

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

body {
    font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans SC", sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--color-primary);
    text-decoration: none;
}
a:hover {
    color: var(--color-primary-hover);
}

.layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.header {
    background: #1c1917;
    border-bottom: 3px solid var(--color-primary);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    height: 64px;
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
}

.logo {
    height: 36px;
    width: auto;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

/* Main */
.main {
    flex: 1;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 32px 20px;
    width: 100%;
}

/* Footer */
.footer {
    background: #1c1917;
    border-top: 3px solid var(--color-primary);
    padding: 28px 0;
    margin-top: auto;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
    color: #a8a29e;
    font-size: 13px;
}

.friend-links {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
}

.footer-label {
    color: #a8a29e;
}

.friend-link {
    color: #fdba74;
    padding: 4px 10px;
    border-radius: 4px;
    transition: all 0.2s;
}
.friend-link:hover {
    background: rgba(253, 186, 116, 0.12);
    color: #fed7aa;
}

.footer-info {
    color: #a8a29e;
    font-size: 12px;
}
.footer-info p {
    margin: 0;
}

/* Page Title */
.table-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-primary);
    display: inline-block;
    color: #111827;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    padding: 14px 16px;
    background: var(--color-bg-soft);
    border: 1px solid #fed7aa;
    border-radius: var(--radius);
}

.filter-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-secondary);
    white-space: nowrap;
    margin-right: 4px;
}

.filter-tag {
    padding: 5px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
    background: #ffffff;
    transition: all 0.2s;
    white-space: nowrap;
}
.filter-tag:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
}
.filter-tag.active {
    background: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
    font-weight: 600;
}

/* Data Hint (列表页提示条) */
.data-hint {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: var(--color-bg-soft);
    border: 1px dashed var(--color-primary);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--color-text-secondary);
}

.data-hint-icon {
    font-size: 16px;
    flex-shrink: 0;
}

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

.data-hint-text strong {
    color: var(--color-text);
    font-weight: 600;
}

.data-hint-link {
    color: var(--color-primary);
    font-weight: 700;
    text-decoration: underline;
}
.data-hint-link:hover {
    color: var(--color-primary-hover);
}

/* Detail Banner Ad (详情页横幅广告) */
.ad-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
    border-radius: var(--radius);
    color: #ffffff;
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}
.ad-banner::after {
    content: "";
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(15deg);
    pointer-events: none;
}
.ad-banner:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: #ffffff;
}

.ad-banner-icon {
    font-size: 32px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.2);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-banner-content {
    flex: 1;
    min-width: 0;
}

.ad-banner-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 4px;
}

.ad-banner-desc {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 2px;
}

.ad-banner-url {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.ad-banner-arrow {
    font-size: 32px;
    font-weight: 300;
    flex-shrink: 0;
    opacity: 0.9;
}

/* Table */
.table-wrapper {
    overflow-x: auto;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table thead {
    background: var(--color-bg-soft);
}

.data-table th {
    padding: 13px 16px;
    text-align: left;
    font-weight: 700;
    color: var(--color-primary);
    font-size: 13px;
    border-bottom: 2px solid #fed7aa;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    color: var(--color-text);
}

.data-table tbody tr {
    transition: background 0.15s;
}
.data-table tbody tr:hover {
    background: #fffaf5;
}
.data-table tbody tr:last-child td {
    border-bottom: none;
}

.type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    font-weight: 500;
}
.type-site { background: #fff1f2; color: #e11d48; }
.type-app { background: #ffedd5; color: #c2410c; }
.type-mini { background: #eff6ff; color: #2563eb; }
.type-quick { background: #f5f3ff; color: #7c3aed; }

.subject-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    font-weight: 500;
}
.subject-personal { background: #fff1f2; color: #e11d48; }
.subject-enterprise { background: #fef2f2; color: #dc2626; }
.subject-other { background: #f3f4f6; color: #6b7280; }

.data-table.new-cols th:nth-child(1) { min-width: 90px; }
.data-table.new-cols th:nth-child(2) { min-width: 140px; }
.data-table.new-cols th:nth-child(3) { min-width: 60px; }
.data-table.new-cols th:nth-child(4) { min-width: 180px; }
.data-table.new-cols th:nth-child(5) { min-width: 130px; }
.data-table.new-cols th:nth-child(6) { min-width: 60px; }
.data-table.new-cols th:nth-child(7) { min-width: 90px; }

.licence-cell { font-size: 13px; word-break: break-all; max-width: 220px; color: var(--color-text-secondary); }
.time-cell { white-space: nowrap; }

.item-link {
    font-weight: 600;
    color: var(--color-primary);
    transition: color 0.2s;
}
.item-link:hover {
    color: var(--color-accent);
    text-decoration: underline;
}

/* Pagination */
.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    margin-top: 8px;
    flex-wrap: wrap;
    gap: 12px;
}

.pagination-info {
    font-size: 13px;
    color: var(--color-text-secondary);
}

.pagination-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--color-text);
    background: var(--color-surface);
    transition: all 0.2s;
}
.page-link:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}
.page-link.current {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    font-weight: 600;
}

/* Detail Page */
.detail-container {
    max-width: 680px;
    margin: 0 auto;
}

.info-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-top: 4px solid var(--color-primary);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
}

.info-card-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border);
    color: #111827;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
}

.info-table tr {
    border-bottom: 1px solid #f3f4f6;
}
.info-table tr:last-child {
    border-bottom: none;
}

.info-label {
    padding: 14px 16px 14px 0;
    color: var(--color-text-secondary);
    font-size: 14px;
    width: 120px;
    white-space: nowrap;
    font-weight: 600;
}

.info-value {
    padding: 14px 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text);
    word-break: break-all;
}

.licence-badge {
    display: inline-block;
    background: var(--color-bg-soft);
    color: var(--color-primary);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid #fed7aa;
}

/* 企业信息查询卡片（详情页外链入口） */
.enterprise-card {
    margin-top: 24px;
    padding: 20px 24px;
    background: var(--color-bg-soft);
    border: 1px solid #fed7aa;
    border-left: 4px solid var(--color-primary);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.enterprise-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 6px;
}

.enterprise-card-desc {
    font-size: 13px;
    color: var(--color-text-secondary);
    margin-bottom: 14px;
    line-height: 1.5;
}

.enterprise-card-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 16px;
    background: var(--color-primary);
    color: #ffffff;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}
.enterprise-card-link:hover {
    background: var(--color-primary-hover);
    color: #ffffff;
    transform: translateY(-1px);
}

.enterprise-card-arrow {
    font-size: 16px;
    flex-shrink: 0;
    transition: transform 0.2s;
}
.enterprise-card-link:hover .enterprise-card-arrow {
    transform: translateX(3px);
}

.back-link {
    margin-top: 20px;
    text-align: center;
}

.back-link a {
    display: inline-block;
    padding: 10px 24px;
    color: var(--color-text-secondary);
    font-size: 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    transition: all 0.2s;
}
.back-link a:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
}

/* Not Found */
.not-found-container {
    text-align: center;
    padding: 80px 20px;
}

.not-found-title {
    font-size: 24px;
    color: #111827;
    margin: 24px 0 12px;
}

.not-found-desc {
    color: var(--color-text-secondary);
    font-size: 15px;
    margin-bottom: 32px;
}

.back-btn {
    display: inline-block;
    padding: 12px 32px;
    background: var(--color-primary);
    color: white;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    transition: background 0.2s;
}
.back-btn:hover {
    background: var(--color-primary-hover);
    color: white;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-text {
    margin-top: 16px;
    color: var(--color-text-secondary);
    font-size: 15px;
}

/* Responsive */
@media (max-width: 640px) {
    .main {
        padding: 16px 12px;
    }

    .header-inner {
        padding: 0 12px;
    }

    .page-title {
        font-size: 18px;
    }

    .filter-bar {
        gap: 4px;
        padding: 8px 10px;
    }
    .filter-tag {
        font-size: 12px;
        padding: 3px 8px;
    }

    .data-hint {
        padding: 10px 12px;
        font-size: 13px;
    }

    .ad-banner {
        gap: 12px;
        padding: 16px;
    }
    .ad-banner-icon {
        font-size: 24px;
        width: 44px;
        height: 44px;
    }
    .ad-banner-title {
        font-size: 15px;
    }
    .ad-banner-url {
        font-size: 13px;
    }

    .data-table {
        font-size: 13px;
    }
    .data-table th,
    .data-table td {
        padding: 8px 10px;
    }
    .data-table.new-cols th:nth-child(4) {
        min-width: 140px;
    }
    .data-table.new-cols th:nth-child(5) {
        min-width: 100px;
    }

    .info-card {
        padding: 20px;
    }

    .enterprise-card {
        padding: 16px;
    }
    .enterprise-card-title {
        font-size: 15px;
    }
    .enterprise-card-link {
        padding: 10px 12px;
        font-size: 13px;
    }

    .info-card-title {
        font-size: 18px;
        margin-bottom: 16px;
        padding-bottom: 12px;
    }

    .info-label {
        width: 80px;
        font-size: 13px;
        padding: 10px 8px 10px 0;
    }
    .info-value {
        font-size: 14px;
        padding: 10px 0;
    }

    .pagination-bar {
        flex-direction: column;
        align-items: center;
    }

    .pagination-info {
        font-size: 12px;
    }

    .page-link {
        min-width: 32px;
        height: 32px;
        font-size: 12px;
        padding: 0 6px;
    }

    .not-found-container {
        padding: 40px 20px;
    }
    .not-found-title {
        font-size: 20px;
    }
    .not-found-desc {
        font-size: 14px;
    }

    .back-btn {
        padding: 10px 24px;
        font-size: 14px;
    }

    .empty-state {
        padding: 40px 16px;
    }
}

@media (max-width: 480px) {
    .filter-bar {
        justify-content: flex-start;
    }
    .filter-label {
        width: 100%;
        margin-bottom: 4px;
    }
    .filter-tag {
        font-size: 11px;
        padding: 2px 6px;
    }
    .data-table th,
    .data-table td {
        padding: 6px 8px;
        font-size: 12px;
    }
    .data-table.new-cols th:nth-child(4) {
        min-width: 120px;
    }
    .data-table.new-cols th:nth-child(5) {
        min-width: 80px;
    }
    .licence-cell {
        max-width: 120px;
        font-size: 12px;
    }
}
