/* 大模型广场 - 样式表 */

/* 基础重置 */
* {
    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-color: #f8f9fa;
    /* 禁止页面整体滚动，只允许内容区域滚动 */
    overflow-x: hidden;
}

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

/* Header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav a:hover {
    color: #ffd700;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(102, 126, 234, 0.9), rgba(118, 75, 162, 0.9)), 
                url('https://images.unsplash.com/photo-1677442135722-5f11f06a1e7f?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 4rem 0;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #ff6b6b;
    color: white;
}

.btn-primary:hover {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #667eea;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Features */
.features {
    padding: 4rem 0;
    background-color: white;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: 15px;
    background: #f8f9fa;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.feature-card i {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: #333;
}

/* Models Section */
.models-section {
    padding: 4rem 0;
    background-color: #f8f9fa;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 3rem;
    color: #333;
    font-weight: bold;
}

.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.model-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.model-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.model-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.model-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #667eea;
    font-weight: bold;
}

.model-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
    color: #333;
}

.model-tag {
    background: #667eea;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
    font-size: 0.8rem;
}

.model-stats {
    margin: 1.5rem 0;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #eee;
}

.stat-label {
    color: #666;
    font-weight: 500;
}

.stat-value {
    font-weight: 600;
    color: #333;
}

.model-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Comparison Section */
.comparison-section {
    padding: 4rem 0;
    background-color: white;
}

.comparison-table {
    overflow-x: auto;
    margin: 0 -20px;
    padding: 0 20px;
    -webkit-overflow-scrolling: touch; /* iOS 滚动优化 */
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.comparison-table th {
    background: #667eea;
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
}

.comparison-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.comparison-table tr:hover {
    background-color: #e9ecef;
}

/* Pricing Section */
.pricing-section {
    padding: 4rem 0;
    background-color: #f8f9fa;
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.pricing-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.pricing-card.popular {
    border: 3px solid #667eea;
    position: relative;
}

.pricing-card.popular::before {
    content: "最受欢迎";
    position: absolute;
    top: -12px;
    right: 20px;
    background: #667eea;
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
}

.pricing-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.price {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 1.5rem;
}

.features {
    list-style: none;
    margin-bottom: 2rem;
}

.features li {
    padding: 0.5rem 0;
    color: #666;
}

/* Proxy Section */
.proxy-section {
    padding: 4rem 0;
    background-color: white;
}

.proxy-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.proxy-info h3,
.proxy-demo h3 {
    margin-bottom: 1rem;
    color: #333;
}

.proxy-info ul {
    list-style: none;
}

.proxy-info li {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
}

.proxy-info i {
    color: #667eea;
}

.proxy-demo pre {
    background: #2d3748;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 10px;
    overflow-x: auto;
    font-size: 0.9rem;
}

/* API Section */
.api-section {
    padding: 4rem 0;
    background-color: #f8f9fa;
}

.api-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.api-docs h3,
.api-features h3 {
    margin-bottom: 1rem;
    color: #333;
}

.api-docs pre {
    background: #2d3748;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 10px;
    overflow-x: auto;
    font-size: 0.9rem;
}

.api-features ul {
    list-style: none;
}

.api-features li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #666;
}

.api-features i {
    color: #667eea;
    font-size: 1.2rem;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    padding: 3rem 0 1rem 0;
}

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

.footer-logo h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-logo p {
    color: #ccc;
}

.footer-links h4 {
    margin-bottom: 1rem;
    color: #667eea;
}

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

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #555;
    color: #ccc;
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav ul {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
        padding: 0 15px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
    
    .proxy-content,
    .api-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
        padding: 0 15px;
    }
    
    .models-grid {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }
    
    .model-card {
        margin: 0 -15px;
        border-radius: 0;
    }
    
    .pricing-cards {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }
    
    .pricing-card {
        margin: 0 -15px;
        border-radius: 0;
    }
    
    .comparison-table {
        margin: 0 -15px;
        padding: 0 15px;
    }
    
    .comparison-table table {
        font-size: 0.85rem;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .footer-content {
        padding: 0 15px;
    }
    
    /* Touch-friendly spacing */
    .feature-card {
        padding: 1.5rem 1rem;
    }
    
    .model-stats {
        margin: 1rem 0;
    }
    
    .stat-item {
        margin-bottom: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    /* 修复移动端左右滑动问题 */
    html, body {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }
    
    .container {
        padding: 0 15px;
        max-width: 100%;
    }
    
    /* 确保表格可以水平滚动 */
    .comparison-table {
        -webkit-overflow-scrolling: touch;
        overflow-x: auto;
        -ms-overflow-style: -ms-autohiding-scrollbar;
    }
    
    /* 防止内容溢出 */
    * {
        max-width: 100%;
        overflow-wrap: break-word;
    }
}

/* Extra small devices (phones, 480px and down) */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .hero h2 {
        font-size: 1.5rem;
    }
    
    .hero p {
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .model-info h3 {
        font-size: 1rem;
    }
    
    .price {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .btn-sm {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    /* Improve touch targets */
    .nav a {
        padding: 0.5rem 0.75rem;
        min-width: 60px;
        text-align: center;
    }
    
    .model-actions {
        justify-content: center;
    }
    
    /* Optimize table for very small screens */
    .comparison-table table {
        font-size: 0.75rem;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 0.5rem 0.25rem;
    }
    
    /* 移除不必要的水平滚动 */
    body {
        overflow-x: hidden;
    }
    
    /* 确保所有元素都不会导致水平溢出 */
    .models-grid, .pricing-cards, .feature-grid {
        width: 100%;
        margin: 0 auto;
    }
}

/* Placeholder images */
.model-logo {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

/* Prevent zoom on input focus (iOS) */
input, textarea, select {
    font-size: 16px;
}

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

/* Ensure proper viewport scaling */
@viewport {
    width: device-width;
    zoom: 1;
}

/* 移动端触摸优化 */
@media (hover: none) and (pointer: coarse) {
    .btn, .model-card, .feature-card {
        transition: none;
    }
    
    .btn:active, .model-card:active {
        transform: scale(0.98);
    }
}