/* 全局变量定义 */
:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --accent-color: #4895ef;
    --text-color: #212529;
    --bg-color: #ffffff;
    --card-bg: #f8f9fa;
    --header-bg: rgba(255, 255, 255, 0.95);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
    --footer-bg: linear-gradient(135deg, #3a7bd5, #00d2ff);
}

.dark-mode {
    --primary-color: #4895ef;
    --secondary-color: #4361ee;
    --accent-color: #3f37c9;
    --text-color: #e9ecef;
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --header-bg: rgba(30, 30, 30, 0.95);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    --footer-bg: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
}

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: var(--transition);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    padding-top: 70px;
    transition: background-color 0.5s, color 0.5s;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 安全警告 */
.security-notice {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #ff6b6b;
    color: white;
    text-align: center;
    padding: 8px 0;
    font-size: 0.9rem;
    z-index: 2000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    display: none;
}

.security-notice i {
    margin-right: 8px;
}

/* 顶部导航栏 */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--header-bg);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    z-index: 1000;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 10px;
}

.logo {
    font-size: 1.8rem;
    color: var(--primary-color);
}

.logo-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-color);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle, .menu-toggle {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    z-index: 1002;
}

.theme-toggle:hover, .menu-toggle:hover {
    background-color: rgba(67, 97, 238, 0.1);
}

/* 侧边栏 */
.sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100%;
    background-color: var(--card-bg);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    padding: 20px;
    overflow-y: auto;
    transition: left 0.3s ease;
}

.sidebar.open {
    left: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(67, 97, 238, 0.2);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-logo i {
    font-size: 1.8rem;
    color: var(--primary-color);
}

.sidebar-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
}

.nav-menu {
    list-style: none;
}

.nav-menu li {
    margin-bottom: 6px;
}

.nav-menu a {
    display: block;
    padding: 10px 12px;
    text-decoration: none;
    color: var(--text-color);
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.nav-menu a:hover, .nav-menu a.active {
    background-color: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
}

.nav-menu i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
    font-size: 0.9rem;
}

/* 遮罩层 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 主要内容区 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 15px 10px;
    flex: 1;
    width: 100%;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--text-color);
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

/* 分类导航 */
.domain-categories-container {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 15px;
    margin-bottom: 20px;
    -ms-overflow-style: none;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
}

.domain-categories-container::-webkit-scrollbar {
    display: none;
}

.domain-categories {
    display: flex;
    flex-wrap: nowrap;
    gap: 15px;
    min-width: fit-content;
    padding: 0 15px;
    width: max-content;
}

.category-btn {
    padding: 8px 15px;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    min-width: 100px;
    text-align: center;
    flex-shrink: 0;
    white-space: nowrap;
}

.category-btn:hover, .category-btn.active {
    background-color: var(--primary-color);
    color: white;
}

/* 域名卡片 */
.domains-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.domain-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 200px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.domain-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.price-tag {
    position: absolute;
    bottom: 5px;
    right: 10px;
    font-weight: bold;
    color: var(--primary-color);
    padding-bottom: 2px;
    border-bottom: 2px solid rgba(67, 97, 238, 0.3);
    text-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

/* 域名卡片类型标识 */
.domain-card.com {
    border-top: 4px solid #4361ee;
}
.domain-card.cn {
    border-top: 4px solid #06d6a0;
}
.domain-card.net {
    border-top: 4px solid #9d4edd;
}
.domain-card.cc {
    border-top: 4px solid #f8961e;
}
.domain-card.country {
    border-top: 4px solid #ff6b6b;
}
.domain-card.reserved {
    border-top: 4px solid #4ecdc4;
}
.domain-card.sold {
    border-top: 4px solid #ffd166;
}

.domain-card.sold {
    opacity: 0.7;
    position: relative;
}
.domain-card.sold::after {
    content: '已售';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.2rem;
    z-index: 5;
}

.domain-header {
    background: var(--card-bg);
    color: var(--text-color);
    padding: 15px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.domain-name {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin: 0;
    font-family: 'Courier New', monospace;
    word-break: break-all;
}

.domain-footer {
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.02);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.meaning-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 15px;
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.95rem;
    border: none;
    cursor: default;
    height: 40px;
    width: 100%;
    margin-bottom: 8px;
    text-align: center;
}

.btn-group {
    display: flex;
    gap: 8px;
    height: 40px;
    width: 100%;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 15px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
}

.btn-detail {
    background: var(--primary-color);
    color: white;
}

.btn-visit {
    background: #06d6a0;
    color: white;
}

.btn-sold {
    background: #ff6b6b;
    color: white;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 状态指示器 */
.status-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #06d6a0;
}

.status-indicator.sold {
    background-color: #ff6b6b;
}

.status-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    z-index: 2;
    display: none;
}

.status-available {
    background-color: #06d6a0;
}

.status-sold {
    background-color: #ff6b6b;
}

/* 弹窗 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--card-bg);
    border-radius: 15px;
    max-width: 420px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    padding: 15px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 15px 15px 0 0;
}

.modal-title {
    font-size: 1.4rem;
    margin: 0;
    text-align: center;
    font-weight: 700;
}

.modal-body {
    padding: 15px;
}

.domain-details {
    margin-bottom: 15px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(67, 97, 238, 0.1);
    font-size: 0.9rem;
}

.detail-label {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
    min-width: 100px;
}

.detail-value {
    text-align: right;
    color: var(--text-color);
    font-size: 0.9rem;
    flex: 1;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
}

.signature {
    margin-top: 15px;
    padding: 12px;
    background-color: rgba(67, 97, 238, 0.05);
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
    font-size: 0.85rem;
}

.signature-label {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.signature-content {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: var(--text-color);
    word-break: break-all;
}

/* 统计面板 */
.stats-panel {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    margin-top: 30px;
    box-shadow: var(--shadow);
}

.stats-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.stat-card {
    background: rgba(67, 97, 238, 0.1);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-color);
    margin-top: 5px;
}

/* 页脚 */
footer {
    background: var(--footer-bg);
    color: white;
    padding: 10px 0;
    margin-top: 40px;
    text-align: center;
}

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

.footer-bottom p {
    margin: 4px 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.4;
}

.footer-bottom p:first-child {
    font-size: 1rem;
    margin-bottom: 5px;
}

/* 悬浮按钮 */
.fab-container {
    position: fixed;
    bottom: 60px;
    right: 40px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 100;
}

.fab {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    z-index: 100;
    transition: all 0.3s ease;
    cursor: pointer;
}

.fab:hover {
    transform: scale(1.15);
    background: var(--secondary-color);
}

.fab.scroll-top {
    background: #ff6b6b;
    display: none;
}

.fab.scroll-top:hover {
    background: #ff5252;
}

.fab.consult {
    background: var(--primary-color);
}

/* 响应式设计 */
@media (min-width: 768px) {
    .domain-card {
        height: 220px;
    }
    
    .domain-header {
        padding: 15px 15px 5px;
    }
    
    .status-indicator {
        display: none;
    }
    
    .status-btn {
        display: block;
    }
    .status-reserved{
     background-color:#4d5df1;
      }
    
    .domain-footer {
        padding: 12px 12px 15px;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    
    .meaning-btn {
        margin-bottom: 0;
    }
    
    .btn-group {
        display: flex;
        gap: 10px;
        min-width: 100%;
        height: 42px;
    }
    
    .btn {
        padding: 10px 16px;
    }
    
    .modal .btn-visit {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
        display: block;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .container {
        padding: 20px 20px 10px;
    }
    
    .domains-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .domain-categories-container {
        padding: 0 10px 15px;
    }
    
    .category-btn {
        min-width: 90px;
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .fab-container {
        bottom: 50px;
        right: 30px;
    }
    
    .fab {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
}

@media (max-width: 767px) {
    header {
        padding: 10px 15px;
        height: 60px;
    }
    
    .logo-title {
        font-size: 1.1rem;
    }
    
    .domains-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 1.6rem;
        margin-bottom: 15px;
    }
    
    .domain-footer {
        flex-direction: column;
        gap: 10px;
    }
    
    .meaning-btn, .btn {
        width: 100%;
        text-align: center;
    }
    
    .btn-group {
        width: 100%;
        min-width: 0;
    }
    
    .modal-content {
        max-width: 350px;
    }
    
    .modal-header {
        padding: 12px;
    }
    
    .modal-title {
        font-size: 1.3rem;
    }
    
    .domain-categories-container {
        padding: 0 5px 15px;
        margin: 0 -10px 20px;
        width: calc(100% + 20px);
    }
    
    .domain-categories {
        gap: 10px;
        padding: 0 15px;
    }
    
    .category-btn {
        min-width: 85px;
        padding: 6px 10px;
        font-size: 0.85rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .fab-container {
        bottom: 40px;
        right: 20px;
    }
    
    .fab {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
        border-radius: 10px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .domain-name {
        font-size: 1.3rem;
    }
    
    .domain-categories {
        padding: 0 10px;
    }
    
    .category-btn {
        min-width: 80px;
        font-size: 0.8rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        max-width: 300px;
    }
    
    .header-right {
        gap: 8px;
    }
    
    .fab-container {
        bottom: 30px;
        right: 15px;
    }
    
    .fab {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        border-radius: 8px;
    }
}

@media (min-width: 1600px) {
    .container {
        max-width: 1400px;
    }
    
    .domains-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}