/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4f46e5;
    --primary-hover: #3730a3;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-card: #ffffff;
    --border-color: #e5e7eb;
    --border-radius: 6px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 
                 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.5;
    color: var(--text-primary);
    background: #f8fafc;
    min-height: 100vh;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 15px;
}

/* 精简的头部样式 */
.header {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}

.header-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-text {
    text-align: center;
}

.site-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}

.site-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 4px 0 0 0;
    font-weight: 400;
}

/* 内联状态指示器 */
.status-indicator-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-secondary);
    border-radius: 20px;
    font-size: 0.875rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--secondary-color);
    animation: pulse 2s infinite;
}

.status-dot.active {
    background: var(--secondary-color);
}

.status-dot.maintenance {
    background: var(--warning-color);
}

.status-dot.offline {
    background: var(--danger-color);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-text {
    color: var(--text-primary);
    font-weight: 500;
}

.update-time {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* 章节标题样式 */
.section-title {
    text-align: center;
    margin-bottom: 24px;
}

.section-title h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.section-title h2 i {
    color: var(--primary-color);
}

.section-title p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* 域名卡片样式 */
.domains-section,
.backup-domains-section {
    margin-bottom: 32px;
}

.domain-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.domain-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.domain-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.domain-card.primary {
    border-left: 4px solid var(--primary-color);
}

.domain-card.backup {
    border-left: 4px solid var(--secondary-color);
}

.domain-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.domain-label {
    font-weight: 600;
    color: var(--text-primary);
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.active {
    background: #dcfce7;
    color: #166534;
}

.status-badge.maintenance {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.offline {
    background: #fee2e2;
    color: #991b1b;
}

.domain-url {
    margin-bottom: 16px;
}

.domain-url a {
    color: var(--primary-color);
    text-decoration: none;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    word-break: break-all;
}

.domain-url a:hover {
    text-decoration: underline;
}

.domain-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-copy,
.btn-visit {
    flex: 1;
    min-width: 120px;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-copy {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-copy:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}

.btn-visit {
    background: var(--primary-color);
    color: white;
}

.btn-visit:hover:not(.disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-visit.disabled {
    background: var(--text-light);
    cursor: not-allowed;
    opacity: 0.6;
}

/* VPN推荐区域 */
.vpn-section {
    margin-bottom: 32px;
}

.vpn-recommendation-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.vpn-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.vpn-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.vpn-icon i {
    color: white;
    font-size: 1.5rem;
}

.vpn-info h3 {
    margin: 0 0 4px 0;
    color: var(--text-primary);
    font-size: 1.125rem;
}

.vpn-info p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.vpn-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.vpn-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.vpn-feature i {
    color: var(--secondary-color);
    flex-shrink: 0;
}

.vpn-actions {
    text-align: center;
}

.btn-vpn-download {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.btn-vpn-download:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.vpn-note {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-light);
}

/* 收藏指南区域 */
.bookmark-section {
    margin-bottom: 32px;
}

.bookmark-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.bookmark-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.bookmark-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.bookmark-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    border-radius: 12px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bookmark-icon i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.bookmark-card h3 {
    margin: 0 0 12px 0;
    color: var(--text-primary);
    font-size: 1.125rem;
}

.bookmark-steps {
    list-style: none;
    padding: 0;
    text-align: left;
}

.bookmark-steps li {
    padding: 6px 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
    position: relative;
    padding-left: 20px;
}

.bookmark-steps li::before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

kbd {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    padding: 2px 6px;
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--text-primary);
}

/* 快速收藏按钮 */
.quick-bookmark {
    text-align: center;
    margin-bottom: 32px;
}

.btn-bookmark {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-bookmark:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* 通知区域 */
.notification-section {
    margin-bottom: 32px;
}

.notification-card {
    background: linear-gradient(135deg, #fef3c7, #fed7aa);
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--warning-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon i {
    color: white;
    font-size: 1.25rem;
}

.notification-content h3 {
    margin: 0 0 8px 0;
    color: #92400e;
    font-size: 1.125rem;
}

.notification-content p {
    margin: 0;
    color: #92400e;
    line-height: 1.6;
}

/* 页脚样式 */
.footer {
    text-align: center;
    padding: 24px 0;
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
}

.footer-content {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.footer-links {
    margin-top: 8px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    margin: 0 8px;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* 消息提示 */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text-primary);
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 0.875rem;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-card);
    border-radius: 8px;
    padding: 0;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-light);
    z-index: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

#modalBody {
    padding: 24px;
}

#modalBody h2,
#modalBody h3 {
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

#modalBody h4 {
    color: var(--text-primary);
    margin: 20px 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

#modalBody ul {
    padding-left: 20px;
    margin-bottom: 16px;
}

#modalBody li {
    margin-bottom: 6px;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

#modalBody li i {
    margin-top: 2px;
    flex-shrink: 0;
    color: var(--primary-color);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideIn {
    from { transform: translate(-50%, -60%); opacity: 0; }
    to { transform: translate(-50%, -50%); opacity: 1; }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 8px;
    }
    
    .header {
        padding: 12px;
        margin-bottom: 16px;
    }
    
    .header-content {
        gap: 8px;
        margin-bottom: 8px;
    }
    
    .header-icon {
        font-size: 1.5rem;
    }
    
    .site-title {
        font-size: 1.25rem;
        line-height: 1.1;
    }
    
    .site-subtitle {
        font-size: 0.875rem;
        margin: 2px 0 0 0;
    }
    
    .status-indicator-inline {
        padding: 6px 12px;
        font-size: 0.8rem;
        gap: 6px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .status-dot {
        width: 6px;
        height: 6px;
    }
    
    .update-time {
        font-size: 0.7rem;
    }
    
    .domain-grid {
        grid-template-columns: 1fr;
    }
    
    .domain-actions {
        flex-direction: column;
    }
    
    .bookmark-grid {
        grid-template-columns: 1fr;
    }
    
    .vpn-features {
        grid-template-columns: 1fr;
    }
    
    .notification-card {
        flex-direction: column;
        text-align: center;
    }
    
    .modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    #modalBody {
        padding: 20px 16px;
    }
    
    .footer-links a {
        display: block;
        margin: 4px 0;
    }
}

/* 小屏幕进一步优化 */
@media (max-width: 480px) {
    .container {
        padding: 6px;
    }
    
    .header {
        padding: 10px;
        margin-bottom: 12px;
    }
    
    .header-content {
        gap: 6px;
        margin-bottom: 6px;
    }
    
    .header-icon {
        font-size: 1.25rem;
    }
    
    .site-title {
        font-size: 1.125rem;
    }
    
    .site-subtitle {
        display: none; /* 在小屏幕上隐藏副标题 */
    }
    
    .status-indicator-inline {
        padding: 4px 8px;
        font-size: 0.75rem;
        gap: 4px;
        border-radius: 16px;
        flex-wrap: nowrap;
    }
    
    .status-text {
        font-size: 0.75rem;
    }
    
    .update-time {
        display: none; /* 在小屏幕上隐藏更新时间 */
    }
    
    .section-title {
        margin-bottom: 16px;
    }
    
    .section-title h2 {
        font-size: 1.25rem;
    }
    
    .section-title p {
        font-size: 0.85rem;
    }
}

/* 移动端横向模式优化 */
@media (max-width: 768px) and (max-height: 500px) {
    .header {
        padding: 8px 12px;
        margin-bottom: 10px;
    }
    
    .header-content {
        margin-bottom: 4px;
    }
    
    .header-icon {
        font-size: 1rem;
    }
    
    .site-title {
        font-size: 1rem;
        line-height: 1;
    }
    
    .site-subtitle {
        display: none;
    }
    
    .status-indicator-inline {
        padding: 3px 6px;
        font-size: 0.7rem;
    }
    
    .domains-section,
    .backup-domains-section {
        margin-bottom: 20px;
    }
}

/* 深色模式支持（可选） */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
        --text-light: #9ca3af;
        --bg-primary: #111827;
        --bg-secondary: #1f2937;
        --bg-card: #1f2937;
        --border-color: #374151;
    }
    
    body {
        background: var(--bg-primary);
    }
    
    .notification-card {
        background: linear-gradient(135deg, #451a03, #78350f);
        border-color: #92400e;
    }
} 