/* ==================== 基础重置 ==================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

a {
    color: #1890ff;
    text-decoration: none;
}

a:hover {
    color: #40a9ff;
}

img {
    max-width: 100%;
    height: auto;
}

/* ==================== 布局 ==================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.wrapper {
    min-height: calc(100vh - 60px);
}

.main {
    padding: 20px 0;
}

/* ==================== 头部导航 ==================== */
.header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 40px;
    height: 60px;
}

.logo a {
    font-size: 22px;
    font-weight: bold;
    color: #1890ff;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-nav a {
    color: #333;
    font-size: 15px;
    font-weight: 500;
    padding: 5px 0;
    display: block;
}

.main-nav a:hover {
    color: #1890ff;
}

.dropdown {
    position: relative;
}

.dropdown > a {
    position: relative;
}

/* 桥接hover间隙，防止鼠标移动时菜单消失 */
.dropdown:hover::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 12px;
    z-index: 98;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 4px;
    padding: 15px;
    min-width: 500px;
    display: none;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 0;
}

.dropdown:hover .dropdown-menu {
    display: grid;
}

.dropdown-menu h4 {
    font-size: 13px;
    color: #999;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.dropdown-menu a {
    display: block;
    padding: 4px 0;
    font-size: 13px;
    color: #555;
}

.dropdown-menu a:hover {
    color: #1890ff;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: #333;
}

/* ==================== 按钮 ==================== */
.btn {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 4px;
    border: 1px solid #d9d9d9;
    background: #fff;
    color: #555;
    font-size: 14px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.btn:hover {
    border-color: #1890ff;
    color: #1890ff;
}

.btn-primary {
    background: #1890ff;
    border-color: #1890ff;
    color: #fff;
}

.btn-primary:hover {
    background: #40a9ff;
    border-color: #40a9ff;
    color: #fff;
}

.btn-danger {
    background: #ff4d4f;
    border-color: #ff4d4f;
    color: #fff;
}

.btn-danger:hover {
    background: #ff7875;
    border-color: #ff7875;
    color: #fff;
}

.btn-small {
    padding: 4px 12px;
    font-size: 12px;
}

.btn-block {
    display: block;
    width: 100%;
}

/* ==================== 搜索区域 ==================== */
.search-section {
    background: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.search-section h2 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
}

.search-form .search-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin-bottom: 6px;
}

.search-field {
    display: flex;
    flex-direction: column;
}

.search-field label {
    font-size: 11px;
    color: #666;
    margin-bottom: 3px;
}

.search-field input,
.search-field select {
    padding: 5px 8px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 13px;
    width: 100%;
}

.search-field input:focus,
.search-field select:focus {
    outline: none;
    border-color: #1890ff;
}

.range-inputs {
    display: flex;
    align-items: center;
    gap: 4px;
}

.range-inputs input {
    flex: 0 0 50px;
    max-width: 60px;
    padding: 4px 6px;
    font-size: 12px;
}

.range-inputs span {
    color: #999;
}

.search-submit {
    justify-content: flex-end;
}

.search-submit button {
    margin-top: auto;
    padding: 6px 16px;
    font-size: 13px;
}

/* ==================== 域名列表区域 ==================== */
.domain-section {
    margin-bottom: 25px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-header h2 {
    font-size: 18px;
    color: #333;
}

.section-header .more {
    font-size: 13px;
}

/* 卡片网格 */
.domain-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.domain-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s;
}

.domain-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.domain-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.domain-card-header h3 {
    font-size: 16px;
}

.domain-card-header h3 a {
    color: #1890ff;
}

.recommend-level {
    color: #faad14;
    font-size: 12px;
}

.domain-card-body {
    margin-bottom: 15px;
}

.domain-desc {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.5;
}

.domain-meta {
    display: flex;
    gap: 8px;
}

.domain-meta span {
    font-size: 11px;
    padding: 2px 8px;
    background: #f0f0f0;
    border-radius: 3px;
    color: #666;
}

.domain-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.domain-price {
    font-size: 18px;
    font-weight: bold;
    color: #f5222d;
}

/* 表格列表 */
.domain-list table {
    width: 100%;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border-collapse: collapse;
}

.domain-list th,
.domain-list td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.domain-list th {
    background: #fafafa;
    font-weight: 600;
    color: #555;
    font-size: 13px;
}

.domain-list tbody tr:hover {
    background: #fafafa;
}

.domain-list td.price {
    color: #f5222d;
    font-weight: 500;
}

/* ==================== 分页 ==================== */
.pagination-wrapper {
    margin-top: 20px;
    text-align: center;
}

.pagination {
    display: inline-flex;
    gap: 5px;
    align-items: center;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 13px;
}

.pagination a {
    background: #fff;
    border: 1px solid #d9d9d9;
    color: #555;
}

.pagination a:hover {
    border-color: #1890ff;
    color: #1890ff;
}

.pagination span.current {
    background: #1890ff;
    color: #fff;
    border: 1px solid #1890ff;
}

.pagination span.ellipsis {
    color: #999;
}

/* ==================== 友情链接 ==================== */
.links-section {
    background: #fff;
    padding: 20px 25px;
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.links-section h2 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
}

.links-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.links-list a {
    color: #555;
    font-size: 13px;
}

.links-list a:hover {
    color: #1890ff;
    text-decoration: underline;
}

/* ==================== 页面头部 ==================== */
.page-header {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.page-header h1 {
    font-size: 20px;
    margin-bottom: 5px;
}

.page-header p {
    color: #888;
    font-size: 13px;
}

/* ==================== 域名详情页 ==================== */
.detail-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.detail-main,
.detail-sidebar {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.domain-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.domain-detail-header h1 {
    font-size: 28px;
    color: #1890ff;
}

.detail-meta {
    display: flex;
    gap: 10px;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 12px;
}

.badge-recommend {
    background: #fff2f0;
    color: #f5222d;
    border: 1px solid #ffccc7;
}

.detail-price-line {
    margin-bottom: 15px;
    font-size: 14px;
    color: #555;
}

.price-red {
    color: #f5222d;
    font-size: 20px;
    font-weight: bold;
}

.domain-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px 20px;
}

.domain-info-grid > div {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    padding: 6px 0;
    border-bottom: 1px solid #f5f5f5;
}

.domain-info-grid .info-label {
    color: #888;
    white-space: nowrap;
}

.domain-info-grid .info-value {
    color: #333;
    font-weight: 500;
}

.detail-section {
    margin-bottom: 25px;
}

.detail-section h3 {
    font-size: 16px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.info-table {
    width: 100%;
}

.info-table th,
.info-table td {
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
    text-align: left;
}

.info-table th {
    width: 120px;
    color: #888;
    font-weight: normal;
    font-size: 13px;
}

.keywords-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.keyword-tag {
    background: #e6f7ff;
    color: #1890ff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
}

.build-plan {
    background: #f6ffed;
    padding: 15px;
    border-radius: 4px;
    border-left: 3px solid #52c41a;
    color: #555;
    line-height: 1.8;
}

.domain-description-text {
    color: #0958d9;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.8;
    padding: 12px 15px;
    background: #e6f7ff;
    border-radius: 4px;
    border-left: 3px solid #1890ff;
}

.buy-info-section {
    background: #fafafa;
    padding: 20px;
    border-radius: 4px;
}

.buy-info-content {
    line-height: 1.8;
    color: #555;
}

.buy-info-content h2,
.buy-info-content h3 {
    margin-bottom: 10px;
}

.buy-info-content p {
    margin-bottom: 8px;
}

/* 侧边栏 */
.sidebar-section {
    margin-bottom: 25px;
}

.sidebar-section h3 {
    font-size: 15px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.sidebar-list {
    list-style: none;
}

.sidebar-list li {
    border-bottom: 1px solid #f5f5f5;
}

.sidebar-list li a {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    color: #555;
    font-size: 13px;
}

.sidebar-list li a:hover {
    color: #1890ff;
}

.sidebar-list .price {
    color: #f5222d;
    font-weight: 500;
}

.more-link {
    display: block;
    margin-top: 10px;
    font-size: 13px;
    text-align: right;
}

/* ==================== 内容盒子 ==================== */
.content-box {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    line-height: 1.8;
}

.content-box h2,
.content-box h3 {
    margin-bottom: 15px;
}

.content-box p {
    margin-bottom: 10px;
}

/* ==================== 空结果 ==================== */
.empty-result {
    background: #fff;
    padding: 60px 25px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.empty-result h1 {
    font-size: 72px;
    color: #e8e8e8;
    margin-bottom: 10px;
}

.empty-result p {
    color: #999;
    margin-bottom: 20px;
}

/* ==================== 页脚 ==================== */
.footer {
    background: #fff;
    border-top: 1px solid #f0f0f0;
    padding: 20px 0;
    color: #999;
    font-size: 13px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.footer-copyright {
    text-align: center;
}

.footer-qrcodes {
    display: flex;
    gap: 20px;
    align-items: center;
}

.qrcode-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.qrcode-item img {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    object-fit: cover;
}

.qrcode-item span {
    font-size: 12px;
    color: #666;
}

/* ==================== 后台登录 ==================== */
.login-body {
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-box {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.login-box h1 {
    font-size: 24px;
    text-align: center;
    color: #1890ff;
    margin-bottom: 5px;
}

.login-box h2 {
    font-size: 14px;
    text-align: center;
    color: #999;
    margin-bottom: 25px;
    font-weight: normal;
}

/* ==================== 后台布局 ==================== */
.admin-body {
    background: #f0f2f5;
}

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 220px;
    background: #001529;
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
}

.admin-logo {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.admin-logo a {
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    display: block;
}

.admin-logo small {
    color: rgba(255,255,255,0.5);
    font-size: 12px;
}

.admin-nav ul {
    list-style: none;
    padding: 10px 0;
}

.admin-nav li a {
    display: block;
    padding: 12px 20px;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    transition: all 0.2s;
}

.admin-nav li a:hover,
.admin-nav li.active a {
    color: #fff;
    background: #1890ff;
}

.admin-main {
    flex: 1;
    margin-left: 220px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.admin-header {
    background: #fff;
    padding: 15px 25px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.admin-header h1 {
    font-size: 18px;
    font-weight: 500;
}

.admin-content {
    flex: 1;
    padding: 25px;
}

/* ==================== 后台统计卡片 ==================== */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.stat-card h3 {
    font-size: 14px;
    color: #888;
    font-weight: normal;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #1890ff;
}

.dashboard-section {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.dashboard-section h3 {
    font-size: 16px;
    margin-bottom: 15px;
}

/* ==================== 后台表格 ==================== */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.admin-table th,
.admin-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.admin-table th {
    background: #fafafa;
    font-weight: 600;
    color: #555;
}

.admin-table tbody tr:hover {
    background: #fafafa;
}

/* ==================== 后台表单 ==================== */
.admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-form input,
.filter-form select {
    padding: 6px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 13px;
}

.admin-form-section,
.admin-list-section {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.admin-form-section h3,
.admin-list-section h3 {
    font-size: 15px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.admin-form .form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 13px;
    color: #555;
    margin-bottom: 6px;
}

.form-group .required {
    color: #f5222d;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    width: 100%;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1890ff;
}

.form-checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin-top: 24px;
}

.form-checkbox input {
    width: auto;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

/* ==================== 提示消息 ==================== */
.alert {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 13px;
}

.alert-success {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #52c41a;
}

.alert-error {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    color: #f5222d;
}

/* ==================== 响应式 ==================== */
@media (max-width: 992px) {
    .domain-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .detail-layout {
        grid-template-columns: 1fr;
    }

    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-form .form-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .dropdown-menu {
        grid-template-columns: repeat(2, 1fr);
        min-width: 300px;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .search-form .search-row {
        grid-template-columns: 1fr;
    }

    .domain-grid {
        grid-template-columns: 1fr;
    }

    .domain-list table {
        display: block;
        overflow-x: auto;
    }

    .admin-sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }

    .admin-main {
        margin-left: 0;
    }

    .admin-wrapper {
        flex-direction: column;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .admin-form .form-row {
        grid-template-columns: 1fr;
    }

    .admin-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }
}
