/* 备案域名销售系统 - 主样式文件 */
/* www.boweit.cn */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

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

/* 头部导航 */
.header {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.logo span {
    color: var(--secondary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.1);
}

/* Hero 区域 */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero p {
    font-size: 18px;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 30px;
}

.search-box {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
}

.search-box button {
    padding: 15px 30px;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-box button:hover {
    background: #059669;
}

/* 特性区域 */
.features {
    padding: 60px 0;
    background: var(--bg-white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    text-align: center;
    padding: 30px 20px;
    border-radius: 12px;
    background: var(--bg-light);
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.feature-card p {
    color: var(--text-gray);
    font-size: 14px;
    line-height: 1.6;
}

/* 域名列表 */
.domains-section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 36px;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.section-title p {
    color: var(--text-gray);
    font-size: 16px;
}

.domain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.domain-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    border: 2px solid transparent;
}

.domain-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.domain-card.premium {
    border-color: var(--accent-color);
    position: relative;
}

.domain-card.premium::before {
    content: '推荐';
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.domain-card.hot::after {
    content: '热门';
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ef4444;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.domain-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
    word-break: break-all;
}

.domain-info {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.domain-tag {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
}

.domain-tag.weight {
    background: rgba(16, 185, 129, 0.1);
    color: var(--secondary-color);
}

.domain-tag.age {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-color);
}

.domain-price {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 15px 0;
}

.price-current {
    font-size: 28px;
    font-weight: 700;
    color: #ef4444;
}

.price-original {
    font-size: 16px;
    color: var(--text-gray);
    text-decoration: line-through;
}

.domain-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    border: none;
    display: inline-block;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

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

/* 分类导航 */
.categories {
    padding: 40px 0;
    background: var(--bg-white);
}

.category-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.category-tab {
    padding: 12px 24px;
    background: var(--bg-light);
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s;
    cursor: pointer;
}

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

/* 页脚 */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: white;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #9ca3af;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #374151;
    color: #9ca3af;
}

/* 响应式设计 - 基础移动端优化 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .hero p {
        font-size: 15px;
    }

    .search-box {
        flex-direction: column;
        padding: 0 15px;
    }

    .search-box input {
        padding: 12px 15px;
        font-size: 14px;
    }

    .search-box button {
        padding: 12px 20px;
        font-size: 14px;
    }

    .nav-menu {
        display: none;
    }

    .section-title h2 {
        font-size: 24px;
    }

    .section-title p {
        font-size: 14px;
    }

    .domain-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .domain-card {
        padding: 18px;
    }

    .domain-name {
        font-size: 20px;
    }

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

    .features-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
        margin-top: 25px;
    }

    .feature-card {
        padding: 15px 8px;
    }

    .feature-icon {
        font-size: 28px;
        margin-bottom: 8px;
    }

    .feature-card h3 {
        font-size: 12px;
        margin-bottom: 5px;
        white-space: nowrap;
    }

    .feature-card p {
        font-size: 10px;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .footer {
        padding: 40px 0 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 24px;
    }

    .features-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .feature-card {
        padding: 12px 5px;
    }

    .feature-icon {
        font-size: 24px;
    }

    .feature-card h3 {
        font-size: 11px;
    }

    .feature-card p {
        font-size: 9px;
    }

    .domain-actions {
        flex-direction: column;
    }

    .domain-actions .btn {
        width: 100%;
    }

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

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* ============================================
   移动端导航菜单样式 (追加)
   ============================================ */

/* 汉堡菜单按钮 */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: all 0.3s;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* 移动端菜单 */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 280px;
        height: 100vh;
        background: white;
        flex-direction: column;
        padding: 80px 30px 30px;
        gap: 0;
        transition: right 0.3s ease;
        box-shadow: -5px 0 20px rgba(0,0,0,0.1);
        z-index: 999;
        display: flex !important;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu li {
        width: 100%;
    }
    
    .nav-menu a {
        display: block;
        padding: 15px 0;
        border-bottom: 1px solid #e5e7eb;
        font-size: 16px;
    }
    
    .nav-menu a:hover,
    .nav-menu a.active {
        background: transparent;
        color: var(--primary-color);
    }
    
    /* 遮罩层 */
    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 997;
    }
    
    .menu-overlay.active {
        display: block;
    }
    
    /* 联系弹窗打开时，导航菜单遮罩层要隐藏 */
    .contact-modal.active ~ .menu-overlay {
        display: none !important;
    }
}

/* ============================================
   右侧浮动联系方式 (追加)
   ============================================ */

.floating-contact {
    position: fixed;
    right: 20px;
    bottom: 100px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.floating-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: all 0.3s;
    position: relative;
}

.floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.floating-btn::after {
    content: attr(data-label);
    position: absolute;
    right: 65px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.floating-btn:hover::after {
    opacity: 1;
    visibility: visible;
}

.floating-btn.qq { background: linear-gradient(135deg, #12b7f5, #0099ff); }
.floating-btn.weixin { background: linear-gradient(135deg, #07c160, #05a350); }
.floating-btn.phone { background: linear-gradient(135deg, #ff6b6b, #ee5a5a); }
.floating-btn.top { background: linear-gradient(135deg, #667eea, #764ba2); opacity: 0; visibility: hidden; }

/* 联系弹窗 */
.contact-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1001;
    justify-content: center;
    align-items: center;
}

.contact-modal.active { display: flex; }

.contact-modal-content {
    background: white;
    border-radius: 16px;
    padding: 30px;
    max-width: 360px;
    width: 90%;
    text-align: center;
    animation: modalSlideIn 0.3s ease;
    position: relative;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

.contact-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f3f4f6;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #6b7280;
    transition: all 0.3s;
}

.contact-modal-close:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.contact-modal h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 10px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.contact-item:hover { background: #f3f4f6; }

.contact-item-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.contact-item-icon.qq { background: rgba(18, 183, 245, 0.1); color: #12b7f5; }
.contact-item-icon.weixin { background: rgba(7, 193, 96, 0.1); color: #07c160; }
.contact-item-icon.phone { background: rgba(255, 107, 107, 0.1); color: #ff6b6b; }

.contact-item-info { flex: 1; text-align: left; }
.contact-item-info .label { font-size: 12px; color: #6b7280; }
.contact-item-info .value { font-size: 16px; font-weight: 600; color: var(--text-dark); }

.contact-item .copy-btn {
    padding: 6px 12px;
    background: var(--primary-color);
    color: white;
    border-radius: 6px;
    font-size: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.contact-item .copy-btn:hover { background: var(--primary-dark); }
.contact-item .copy-btn.copied { background: var(--secondary-color); }

/* 提示消息 */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.toast.show { opacity: 1; visibility: visible; }

/* 移动端适配 */
@media (max-width: 768px) {
    .floating-contact {
        right: 15px;
        bottom: 80px;
        gap: 10px;
    }
    
    .floating-btn {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
    
    .floating-btn::after { display: none; }
}
/* 域名列表页移动端优化 */

/* 筛选面板移动端优化 */
@media (max-width: 768px) {
    /* 筛选面板 */
    .filter-panel {
        padding: 15px;
        margin: 15px 0;
    }

    .filter-row {
        gap: 15px;
        margin-bottom: 15px;
    }

    .filter-group {
        min-width: 100%;
    }

    .filter-group label {
        font-size: 13px;
        margin-bottom: 8px;
    }

    .filter-options {
        gap: 8px;
    }

    .filter-options a {
        padding: 6px 12px;
        font-size: 13px;
    }

    /* 当前筛选标签 */
    .active-filters {
        gap: 8px;
        margin-bottom: 15px;
    }

    .filter-tag {
        padding: 6px 12px;
        font-size: 12px;
    }

    /* 统计和排序 */
    .search-stats {
        flex-direction: column;
        gap: 15px;
        padding: 12px 15px;
        text-align: center;
    }

    .search-stats .count {
        font-size: 16px;
    }

    .sort-options {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .sort-options span {
        font-size: 13px;
    }

    .sort-options a {
        padding: 4px 10px;
        font-size: 13px;
    }

    /* 分类标签 */
    .category-tabs {
        gap: 8px;
        margin-bottom: 20px;
    }

    .category-tab {
        padding: 8px 16px;
        font-size: 13px;
    }

    /* Hero 区域 */
    .hero {
        padding: 30px 0 !important;
    }

    .hero h1 {
        font-size: 24px;
    }

    .hero p {
        font-size: 14px;
    }

    /* 域名卡片 */
    .domain-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .domain-card {
        padding: 15px;
    }

    .domain-name {
        font-size: 18px;
        margin-bottom: 8px;
    }

    .domain-info {
        gap: 6px;
        margin: 10px 0;
    }

    .domain-tag {
        padding: 3px 10px;
        font-size: 11px;
    }

    .domain-price {
        margin: 12px 0;
    }

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

    .price-original {
        font-size: 14px;
    }

    .domain-actions {
        margin-top: 12px;
    }

    .domain-actions .btn {
        padding: 8px 15px;
        font-size: 13px;
    }

    /* 分页 */
    .pagination-mobile {
        flex-wrap: wrap;
        gap: 8px;
    }

    .pagination-mobile .btn {
        padding: 8px 12px;
        font-size: 13px;
    }

    /* 快速筛选 */
    .quick-filter {
        gap: 8px;
        margin-bottom: 20px;
    }

    .quick-filter a {
        padding: 6px 14px;
        font-size: 13px;
    }
}

/* 小屏幕手机优化 */
@media (max-width: 480px) {
    .filter-options {
        gap: 6px;
    }

    .filter-options a {
        padding: 5px 10px;
        font-size: 12px;
    }

    .domain-card {
        padding: 12px;
    }

    .domain-name {
        font-size: 16px;
    }

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

    .domain-actions {
        flex-direction: column;
        gap: 8px;
    }

    .domain-actions .btn {
        width: 100%;
    }

    /* 分类标签 */
    .quick-filter a {
        padding: 5px 12px;
        font-size: 12px;
    }

    .category-tab {
        padding: 6px 14px;
        font-size: 12px;
    }
}
