/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #1a365d 0%, #2d3748 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* 容器和布局 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
    width: 100%;
}

/* 头部样式 */
.header {
    text-align: center;
    padding: 50px 20px;
    color: white;
    width: 100%;
}

.header h1 {
    font-size: clamp(2.5em, 8vw, 4em);
    margin-bottom: 15px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header .subtitle {
    font-size: clamp(1.2em, 4vw, 1.6em);
    opacity: 0.9;
    margin-bottom: 30px;
}

/* 统计卡片 */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 40px 0;
    color: white;
}

.stat-card {
    background: rgba(255,255,255,0.1);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 8px;
    color: #63b3ed;
}

.stat-label {
    font-size: 0.95em;
    opacity: 0.9;
}

/* 域名区域 */
.domains-section {
    background: white;
    border-radius: 16px;
    padding: 40px 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.section-title {
    text-align: center;
    color: #1a365d;
    margin-bottom: 40px;
    font-size: clamp(1.8em, 6vw, 2.5em);
}

.category-title {
    color: #2d3748;
    margin: 40px 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 3px solid #63b3ed;
    font-size: 1.4em;
}

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

/* 域名卡片 */
.domain-card {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.domain-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #63b3ed, #4299e1);
}

.domain-card:hover {
    transform: translateY(-5px);
    border-color: #63b3ed;
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.domain-name {
    font-size: 1.4em;
    font-weight: normal;
    color: #1a365d;
    margin-bottom: 12px;
    font-family: "Arial Black", sans-serif;
    text-align: center;
    word-break: break-word;
}

.domain-name .capitalize {
    text-transform: uppercase;
    font-weight: 400;
}

.domain-desc {
    color: #4a5568;
    margin-bottom: 20px;
    line-height: 1.5;
    flex-grow: 1;
}

.domain-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.domain-tag {
    background: #ebf8ff;
    color: #3182ce;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
}

/* 卡片按钮 */
.card-buttons {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.inquiry-btn, .details-btn {
    min-height: 44px;
    font-size: 16px; /* 防止 iOS 缩放 */
    transition: all 0.3s ease;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.inquiry-btn {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: white;
    border: none;
    padding: 12px 25px;
    flex: 2;
}

.details-btn {
    background: transparent;
    color: #4299e1;
    border: 2px solid #4299e1;
    padding: 12px 20px;
    flex: 1;
    text-decoration: none;
}

.inquiry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(66, 153, 225, 0.4);
}

.details-btn:hover {
    background: #4299e1;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(66, 153, 225, 0.3);
}

/* 页脚样式 */
.site-footer {
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 40px 0 20px 0;
    margin-top: auto;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.footer-brand h3 {
    color: #63b3ed;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.footer-contact {
    text-align: center;
}

.contact-email {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px 25px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    text-decoration: none;
    color: white;
    font-weight: 600;
    font-size: 1.1em;
}

.contact-email:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    margin-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.7;
    font-size: 0.9em;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    overflow-y: auto;
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 30px;
    border-radius: 16px;
    width: 95%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    min-height: auto;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #a0aec0;
    z-index: 1001;
}

.close:hover {
    color: #4a5568;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2d3748;
}

.required-label::after {
    content: " *";
    color: #e53e3e;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4299e1;
}

.submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(66, 153, 225, 0.4);
}

/* 成功弹窗 */
.success-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
    z-index: 2000;
    text-align: center;
    max-width: 450px;
    width: 90%;
}

.success-popup .success-icon {
    font-size: 4em;
    color: #48bb78;
    margin-bottom: 20px;
}

.success-popup h3 {
    color: #1a365d;
    margin-bottom: 15px;
    font-size: 1.6em;
}

.success-popup p {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 25px;
}

.close-popup {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-popup:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(66, 153, 225, 0.4);
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1999;
}

.error-message {
    background: #fed7d7;
    color: #c53030;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #feb2b2;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header {
        padding: 30px 15px;
    }
    
    .domains-section {
        padding: 30px 20px;
    }
    
    .domains-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .domain-card {
        padding: 20px 15px;
    }
    
    .card-buttons {
        flex-direction: column;
    }
    
    .modal-content {
        margin: 5% auto;
        padding: 25px 20px;
        width: 90%;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }
    
    .stats {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        margin: 2% auto;
        padding: 20px 15px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 12px;
    }
    
    .success-popup {
        padding: 30px 20px;
    }
    
    .header h1 {
        font-size: clamp(2em, 10vw, 3em);
    }
    
    .section-title {
        font-size: clamp(1.5em, 8vw, 2em);
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .domain-card:hover {
        transform: none;
    }
    
    .inquiry-btn:hover, 
    .details-btn:hover,
    .submit-btn:hover {
        transform: none;
        box-shadow: none;
    }
}