/* ============ CSS Variables ============ */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #ec4899;
    --accent: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1e293b;
    --gray-900: #0f172a;
    --gray-800: #1e293b;
    --gray-700: #334155;
    --gray-600: #475569;
    --gray-500: #64748b;
    --gray-400: #94a3b8;
    --gray-300: #cbd5e1;
    --gray-200: #e2e8f0;
    --gray-100: #f1f5f9;
    --gray-50: #f8fafc;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);
    --radius-sm: 6px;
    --radius: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --transition: all 0.3s ease;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ============ Reset & Base ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-main);
    background: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;  /* 防止水平溢出 */
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
img { max-width: 100%; height: auto; }

/* ============ Navigation ============ */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}
.nav-wrapper {
    display: flex;
    align-items: center;
    height: 70px;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f4c8b;
    letter-spacing: -0.5px;
    flex-shrink: 0;
}
.nav-logo i {
    font-size: 1.8rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.site-name {
    font-weight: initial;
    display: inline-block;
    transform: scaleY(1.2);
    letter-spacing: -2px;
    word-spacing: 1px;
    font-family: 'Faster One', display;
}
.nav-menu {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
}
.nav-menu > li > a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--gray-700);
    border-radius: var(--radius);
    transition: var(--transition);
}
.nav-menu > li > a:hover {
    background: var(--gray-100);
    color: var(--primary);
}
.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #234d91;
    color: var(--white) !important;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    transition: var(--transition);
}
.lang-switch:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-700);
    cursor: pointer;
}

/* ============ Hero Section ============ */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    padding: 50px 0;
    overflow: hidden;
    min-height: 500px;
    display: flex;
    align-items: center;
}
.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content {
    position: relative; z-index: 1; color: var(--white);
    text-align: center; max-width: 800px; margin: 0 auto;
}
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,0.15); backdrop-filter: blur(10px);
    padding: 8px 20px; border-radius: 50px; font-size: 0.85rem;
    font-weight: 600; margin-bottom: 24px;
    animation: fadeInUp 0.6s ease;
}
.hero-title {
    font-size: 3rem; font-weight: 800; margin-bottom: 16px;
    line-height: 1.2; animation: fadeInUp 0.6s ease 0.2s both;
}
.hero-subtitle {
    font-size: 1.2rem; opacity: 0.9; margin-bottom: 32px;
    animation: fadeInUp 0.6s ease 0.4s both;
}
.hero-cta {
    display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
    margin-bottom: 48px; animation: fadeInUp 0.6s ease 0.6s both;
}
.hero-stats {
    display: flex; gap: 40px; justify-content: center;
    animation: fadeInUp 0.6s ease 0.8s both;
}
.stat-item { text-align: center; }
.stat-number { display: block; font-size: 2rem; font-weight: 800; }
.stat-label { font-size: 0.9rem; opacity: 0.8; }
.hero-bg-shapes { position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; }
.shape { position: absolute; border-radius: 50%; opacity: 0.1; }
.shape-1 { width: 300px; height: 300px; background: var(--white); top: -50px; right: -50px; }
.shape-2 { width: 200px; height: 200px; background: var(--white); bottom: -30px; left: -30px; }
.shape-3 { width: 150px; height: 150px; background: var(--white); top: 50%; left: 50%; transform: translate(-50%, -50%); }

/* ============ Buttons ============ */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 24px; font-size: 0.95rem; font-weight: 600;
    border-radius: var(--radius); border: 2px solid transparent;
    cursor: pointer; transition: var(--transition); text-decoration: none;
    white-space: nowrap;
}
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-lg { padding: 16px 32px; font-size: 1.1rem; }
.btn-primary { background: var(--white); color: var(--primary); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-outline { background: transparent;color: white; border-color: rgba(255,255,255,0.5); }
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: var(--white); }
.btn-outline-light { background: transparent; border-color: rgba(255,255,255,0.3); color: var(--white); }
.btn-whois { background: var(--gray-100); color: var(--gray-700); border: 1px solid var(--gray-200); }
.btn-whois:hover { background: var(--gray-200); transform: translateY(-1px); }
.btn-offer {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white); border: none;
}
.btn-offer:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-block { width: 100%; justify-content: center; }

/* ============ Domains Section ============ */
.domains-section { padding: 60px 0; }
.row { display: flex; gap: 24px; flex-wrap: wrap; }
.col-6 { flex: 1; min-width: 300px; }

.category-card {
    background: var(--white); border-radius: var(--radius-lg);
    box-shadow: var(--shadow); overflow: hidden; transition: var(--transition);
    border: 1px solid var(--gray-200);
}
.category-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.category-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 30px 24px; background: linear-gradient(135deg, var(--gray-50), #6a6ef3);
    border-bottom: 1px solid var(--gray-200);
}
.category-info { display: flex; align-items: center; gap: 10px; }
.category-icon {
    width: 50px; height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius); display: flex; align-items: center;
    justify-content: center; color: var(--white); font-size: 1.3rem;
}
.category-info h2 { font-size: 1.2rem; font-weight: 700; color: var(--gray-900); }
.category-count { font-size: 0.85rem; color: var(--gray-500); }
.domain-list { padding: 8px; }
.domain-item {
    display: flex; align-items: center; gap: 12px; padding: 12px 16px;
    border-radius: var(--radius); transition: var(--transition);justify-content: space-between;
}
.domain-item:hover { background: var(--gray-50); }
.domain-initial {
    width: 44px; height: 44px; min-width: 44px; border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    color: var(--white); font-weight: 700; font-size: 1.2rem;
    letter-spacing: 0.5px; box-shadow: var(--shadow-sm);
}
.domain-info { flex: 1; min-width: 0; }
.domain-name { font-weight: 600; color: var(--gray-900); font-size: 1.1rem; word-break: break-all; }
.domain-des {
    font-size: 0.8rem; color: var(--gray-500); margin-top: 2px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.domain-actions { display: flex; gap: 8px; }
.no-domains { padding: 40px; text-align: center; color: var(--gray-500); }

/* ============ Section Title ============ */
.section-title { text-align: center; margin-bottom: 48px; }
.section-title h2 { font-size: 2rem; font-weight: 800; color: var(--gray-900); margin-bottom: 12px; }
.section-title p { color: var(--gray-500); font-size: 1.1rem; }

/* ============ Why Us ============ */
.why-us { padding: 33px 0; background: var(--white); border-top: 1px solid var(--gray-200); }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card {
    text-align: center; padding: 40px 24px; background: var(--gray-50);
    border-radius: var(--radius-lg); transition: var(--transition);
    border: 1px solid var(--gray-200);
}
.feature-card:hover {
    transform: translateY(-4px); box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}
.feature-icon {
    width: 70px; height: 70px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px; font-size: 1.5rem; color: var(--white);
}
.feature-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; color: var(--gray-900); }
.feature-card p { color: var(--gray-500); font-size: 0.9rem; }

/* ============ Page Header (Category) ============ */
.page-header {
    background: linear-gradient(135deg, var(--gray-800), var(--gray-900));
    padding: 33px 0; text-align: center; color: var(--white);
}
.page-header h1 {
    font-size: 2.2rem; font-weight: 800; margin-bottom: 12px;
    display: flex; align-items: center; justify-content: center; gap: 12px;
}
.page-header p { opacity: 0.8; font-size: 1.1rem; margin-bottom: 20px; }

/* ============ Domain List Section (Category) ============ */
.domain-list-section { padding: 40px 0; }

/* 卡片网格：自适应瀑布布局 */
.domain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* 单张域名卡片 */
.domain-card-full {
    display: flex;
    gap: 26px;
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--gray-200);
    break-inside: avoid;
    flex-wrap: wrap;
}
.domain-card-full:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--primary-light);
}

/* 图标区域 */
.domain-card-initial {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 1.4rem;
}

/* 内容区域 */
.domain-logo-name{
    display: flex;
    gap: 10px;
    align-items: center;
}
.domain-card-content { flex: 1; min-width: 0; }
.domain-card-name a {
    display: block;
    text-align: left;
    word-break: break-all;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-900);
    align-items: center;
    gap: 8px;
}
.domain-card-name a:hover { color: var(--primary); }
.fa-external-link-alt,.domain-card-name i { font-size: 0.75rem; opacity: 0.5; }
.domain-card-des { color: var(--gray-500); font-size: 0.85rem; margin-top: 4px; }
.domain-card-meta {
    display: none;
    gap: 16px;
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* 按钮区域：在卡片内部保持一行，但使用 flex-wrap 允许换行 */
.domain-card-actions {
    width: 100%;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
    justify-content: space-between;
}

/* 空状态 */
.no-domains-full { text-align: center; padding: 80px 0; color: var(--gray-400); }
.no-domains-full i { font-size: 4rem; margin-bottom: 16px; }
.no-domains-full p { font-size: 1.2rem; }

/* ============ Footer ============ */
.footer { background: var(--gray-900); color: var(--gray-300); padding: 60px 0 0; }
.footer-content { display: grid; grid-template-columns: 3fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-section h3 { color: var(--white); font-size: 1.3rem; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.footer-section h4 { color: var(--white); font-size: 1rem; margin-bottom: 14px; }
.footer-section p { font-size: 0.9rem; margin-bottom: 16px; line-height: 1.6; }
.footer-section ul { display: flex; flex-direction: column; gap: 8px; }
.footer-section ul li { font-size: 0.9rem; display: flex; align-items: center; gap: 8px; }
.footer-section ul li a { color: var(--gray-400); }
.footer-section ul li a:hover { color: var(--white); }
.social-links { display: flex; gap: 12px; }
.social-links a {
    width: 38px; height: 38px; background: rgba(255,255,255,0.1);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: var(--white); transition: var(--transition);
}
.social-links a:hover { background: var(--primary); transform: translateY(-3px); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1); padding: 20px 0;
    text-align: center; font-size: 0.85rem; color: var(--gray-500);
}

/* ============ Animations ============ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============ Responsive ============ */
@media (max-width: 768px) {
    /* 移动端导航菜单：从右侧滑入，宽度自适应，且隐藏时完全不可见不占空间 */
    .nav-menu {
        position: fixed;
        top: 73px;
        right: 0;
        left: auto;
        width: auto;
        min-width: 200px;
        max-width: 80vw;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-xl);
        border-radius: 0 0 0 var(--radius-md);
        transform: translateX(100%);
        transition: transform 0.3s ease, visibility 0.3s;
        display: none;
        gap: 4px;
        margin-left: 0;
        z-index: 999;
        visibility: hidden;
        pointer-events: none;
    }
    .nav-menu.active {
        display: flex!important;
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
    }
    .nav-menu > li > a {
        padding: 12px 16px;
        justify-content: flex-start;
        white-space: nowrap;
    }

    .mobile-menu-btn {
        display: block;
    }
    .nav-right {
        margin-left: auto;
    }

    .hero { padding: 60px 0; }
    .hero-title { font-size: 2rem; }
    .hero-stats { gap: 24px; }
    .stat-number { font-size: 1.5rem; }
    .row { flex-direction: column; }
    .features-grid { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr; }

    /* 分类页面网格：改为单列，卡片纵向排列 */
    .container {
        padding: 0 10px;
    }
    .domain-list {
        padding: 0 10px;
    }
    .domain-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .domain-card-full {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    .domain-card-actions {
        width: 100%;
        flex-wrap: wrap;
        justify-content: space-between;
    }
    .domains-section {padding: 10px 0;}
}

@media (max-width: 480px) {
    .hero-title { font-size: 1.6rem; }
    .hero-subtitle { font-size: 1rem; }
    .category-header { flex-direction: column; gap: 16px; text-align: center; }
    .category-info {}
    .domain-item {margin: 10px 0; border: 1px solid var(--gray-200); flex-wrap: wrap; gap: 16px; }
    .domain-actions { margin-top: 10px;justify-content: space-between; width: 100%; }
    
    /* 保证小屏域名卡片按钮间距适当 */
    .domain-card-actions {
        justify-content: space-between;
    }
}