/**
 * 域名停靠站点样式表
 * 
 * 专业、严肃的模块化卡片式布局
 * 响应式设计，适配各种设备
 * 
 * @author KleeSky
 * @version 1.0
 */

/* ==========================================
   全局样式与重置
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --accent-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #e67e22;
    --danger-color: #e74c3c;
    --info-color: #3498db;
    --light-bg: #ecf0f1;
    --white: #ffffff;
    --border-color: #bdc3c7;
    --text-color: #2c3e50;
    --text-secondary: #7f8c8d;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #2980b9;
    text-decoration: underline;
}

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

/* ==========================================
   页面头部
   ========================================== */
.site-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #34495e 100%);
    color: var(--white);
    padding: 40px 0;
    box-shadow: var(--shadow);
    text-align: center;
}

.site-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
}

.site-subtitle {
    font-size: 16px;
    opacity: 0.9;
}

/* ==========================================
   域名横幅
   ========================================== */
.domain-banner {
    background: var(--white);
    border-left: 4px solid var(--warning-color);
    padding: 25px 30px;
    margin: 30px 0;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.domain-banner h2 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--text-color);
}

.domain-highlight {
    color: var(--accent-color);
    font-weight: 700;
    font-size: 28px;
}

.domain-banner p {
    color: var(--text-secondary);
    font-size: 15px;
}

/* ==========================================
   主内容区域
   ========================================== */
.main-content {
    flex: 1;
    padding-bottom: 40px;
}

/* ==========================================
   模块网格布局
   ========================================== */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-top: 20px;
}

.modules-column {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* ==========================================
   模块卡片
   ========================================== */
.module-card {
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.module-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.card-header {
    background: var(--primary-color);
    color: var(--white);
    padding: 20px 25px;
    border-bottom: 3px solid var(--accent-color);
}

.card-header h2 {
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon {
    font-size: 24px;
}

.card-body {
    padding: 25px;
}

/* ==========================================
   信息行
   ========================================== */
.info-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid #ecf0f1;
    align-items: flex-start;
}

.info-row:last-child {
    border-bottom: none;
}

.info-row .label {
    font-weight: 600;
    color: var(--text-color);
    min-width: 140px;
    flex-shrink: 0;
}

.info-row .value {
    color: var(--text-secondary);
    flex: 1;
    word-break: break-word;
}

.value.highlight {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 16px;
}

.value.code {
    font-family: 'Courier New', monospace;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
}

/* ==========================================
   区块标题
   ========================================== */
.section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    margin: 20px 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent-color);
}

/* ==========================================
   徽章样式
   ========================================== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 5px;
}

.badge-success {
    background: var(--success-color);
    color: var(--white);
}

.badge-warning {
    background: var(--warning-color);
    color: var(--white);
}

.badge-info {
    background: var(--info-color);
    color: var(--white);
}

.badge-secondary {
    background: #95a5a6;
    color: var(--white);
}

.method-badge {
    background: var(--accent-color);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 600;
    display: inline-block;
}

/* ==========================================
   提示框
   ========================================== */
.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin: 15px 0;
    border-left: 4px solid;
}

.alert-info {
    background: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

.alert-warning {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.alert strong {
    display: block;
    margin-bottom: 5px;
}

.alert p {
    margin: 5px 0;
}

.status-message {
    background: #e8f5e9;
    border-left: 4px solid var(--success-color);
    padding: 15px 20px;
    border-radius: 6px;
    margin-top: 15px;
}

/* ==========================================
   进度条
   ========================================== */
.progress-bar {
    height: 20px;
    background: #ecf0f1;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success-color), #2ecc71);
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 12px;
    font-weight: 600;
}

.progress-fill.warning {
    background: linear-gradient(90deg, var(--warning-color), #f39c12);
}

.resource-item {
    margin-bottom: 20px;
}

/* ==========================================
   扩展内容（详情/摘要）
   ========================================== */
details {
    margin: 15px 0;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px;
}

summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--accent-color);
    padding: 8px;
    user-select: none;
}

summary:hover {
    background: #f8f9fa;
    border-radius: 4px;
}

details pre {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.5;
}

/* ==========================================
   扩展相关样式
   ========================================== */
.extensions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.nameservers .ns-item {
    padding: 6px 0;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
}

/* ==========================================
   DNS配置指南
   ========================================== */
.step-guide {
    margin: 20px 0;
}

.step {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--accent-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h4 {
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.step-content p {
    color: var(--text-secondary);
    margin: 5px 0;
}

.success-indicator {
    display: inline-block;
    background: var(--success-color);
    color: var(--white);
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 600;
    margin-top: 10px;
}

.contact-info {
    background: var(--white);
    padding: 15px;
    border-radius: 6px;
    margin-top: 10px;
    border-left: 3px solid var(--accent-color);
}

.contact-info p {
    margin: 5px 0;
}

/* ==========================================
   注册商列表
   ========================================== */
.registrars-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.registrar-item {
    background: #f8f9fa;
    padding: 18px;
    border-radius: 6px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.registrar-item.highlighted {
    border-color: var(--accent-color);
    background: #e3f2fd;
}

.registrar-item h4 {
    font-size: 15px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.btn-link, .btn-link-secondary {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    margin: 5px 5px 5px 0;
    transition: all 0.3s ease;
}

.btn-link {
    background: var(--accent-color);
    color: var(--white);
}

.btn-link:hover {
    background: #2980b9;
    text-decoration: none;
}

.btn-link-secondary {
    background: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
}

.btn-link-secondary:hover {
    background: var(--accent-color);
    color: var(--white);
    text-decoration: none;
}

/* ==========================================
   DNS记录表格
   ========================================== */
.dns-record table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 13px;
}

.dns-record th,
.dns-record td {
    padding: 12px;
    text-align: left;
    border: 1px solid var(--border-color);
}

.dns-record thead {
    background: var(--primary-color);
    color: var(--white);
}

.dns-record tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.dns-record code {
    background: #e8f5e9;
    padding: 3px 8px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    color: var(--primary-color);
}

.note {
    background: #fff3cd;
    border-left: 4px solid var(--warning-color);
    padding: 12px 15px;
    border-radius: 4px;
    margin-top: 15px;
}

/* ==========================================
   访问统计
   ========================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.stat-item {
    text-align: center;
    padding: 25px 15px;
    background: linear-gradient(135deg, var(--accent-color), #5dade2);
    color: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.95;
}

.top-domains-list {
    margin: 15px 0;
}

.domain-rank-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 10px;
    transition: background 0.3s ease;
}

.domain-rank-item:hover {
    background: #e9ecef;
}

.domain-rank-item .rank {
    width: 40px;
    font-weight: 700;
    color: var(--accent-color);
}

.domain-rank-item .domain {
    flex: 1;
    font-family: 'Courier New', monospace;
    color: var(--text-color);
}

.domain-rank-item .count {
    font-weight: 600;
    color: var(--text-secondary);
}

.help-text {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.8;
    margin-top: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 4px;
}

/* ==========================================
   页面底部
   ========================================== */
.site-footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 30px 0;
    margin-top: 40px;
    text-align: center;
}

.site-footer p {
    margin: 8px 0;
    opacity: 0.9;
}

.site-footer a {
    color: var(--white);
    text-decoration: underline;
}

.site-footer a:hover {
    color: #ecf0f1;
}

.copyright {
    font-size: 12px;
    margin-top: 15px;
    opacity: 0.7;
}

/* ==========================================
   响应式布局
   ========================================== */
@media (max-width: 1024px) {
    .modules-grid {
        grid-template-columns: 1fr;
    }
    
    .site-title {
        font-size: 28px;
    }
    
    .domain-highlight {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .site-header {
        padding: 30px 0;
    }
    
    .site-title {
        font-size: 24px;
    }
    
    .domain-banner h2 {
        font-size: 20px;
    }
    
    .domain-highlight {
        font-size: 20px;
    }
    
    .info-row {
        flex-direction: column;
    }
    
    .info-row .label {
        min-width: auto;
        margin-bottom: 5px;
    }
    
    .registrars-list {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .step {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .card-header h2 {
        font-size: 18px;
    }
    
    .card-body {
        padding: 20px;
    }
    
    .stat-value {
        font-size: 28px;
    }
}

/* ==========================================
   打印样式
   ========================================== */
@media print {
    .site-header,
    .site-footer,
    .btn-link,
    .btn-link-secondary {
        display: none;
    }
    
    .module-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
