
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    box-shadow: 0 0 30px rgba(0,0,0,0.1);
}

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

.logo h1 {
    font-size: 1.8rem;
    margin-bottom: 0.2rem;
}

.tagline {
    font-size: 0.85rem;
    opacity: 0.9;
}

.nav {
    display: flex;
    gap: 1.5rem;
}

.nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

.nav a:hover {
    background: rgba(255,255,255,0.1);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6rem 2rem;
    text-align: center;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.1);
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.feature-icon {
    font-size: 1.5rem;
}

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

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-block;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

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

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

/* Section Styles */
section {
    padding: 5rem 2rem;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #667eea;
    font-weight: 700;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 3rem;
}

/* Plugins Section */
.plugins-section {
    background: #f8f9fa;
}

.plugins-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.plugin-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

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

.plugin-card.featured {
    border: 2px solid #667eea;
}

.plugin-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.plugin-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

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

.plugin-desc {
    color: #666;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.plugin-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.feature-tag {
    background: #f0f0f0;
    color: #666;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
}

.plugin-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
}

.status-indicator.active {
    background: #4CAF50;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.status-text {
    color: #666;
    font-size: 0.9rem;
}

/* Services Section */
.services-section {
    background: white;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    transition: all 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.service-number {
    font-size: 3rem;
    font-weight: 700;
    opacity: 0.3;
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.service-card p {
    opacity: 0.9;
    line-height: 1.6;
}

/* About Section */
.about-section {
    background: #f8f9fa;
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    gap: 2rem;
}

.company-info, .company-description {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.company-info h3, .company-description h3 {
    color: #667eea;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-item {
    display: flex;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.info-label {
    font-weight: 600;
    min-width: 180px;
    color: #667eea;
}

.info-value {
    color: #333;
}

.company-description p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: #666;
}

.company-highlights {
    display: flex;
    justify-content: space-around;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #eee;
}

.highlight-item {
    text-align: center;
}

.highlight-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
    display: block;
}

.highlight-text {
    color: #666;
    font-size: 0.9rem;
}

/* Contact Section */
.contact-section {
    background: white;
}

.contact-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    gap: 2rem;
}

.contact-info, .contact-message {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
}

.contact-info h3, .contact-message h3 {
    color: #667eea;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.contact-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-label {
    font-weight: 600;
    color: #667eea;
    font-size: 0.9rem;
}

.contact-value {
    color: #333;
    line-height: 1.6;
}

.contact-message p {
    line-height: 1.8;
    color: #666;
    margin-bottom: 1rem;
}

.contact-note {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1rem;
    border-radius: 5px;
    margin-top: 1.5rem;
}

.contact-note p {
    margin: 0;
    color: #856404;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 2rem 1rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-info {
    text-align: center;
    margin-bottom: 2rem;
}

.footer-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.footer-info p {
    opacity: 0.9;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 0.8;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-bottom p {
    margin-bottom: 0.5rem;
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .nav {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    
    .nav a {
        display: block;
        text-align: center;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1.2rem;
    }
    
    .hero-features {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .plugins-grid,
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .info-item {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .info-label {
        min-width: auto;
    }
    
    .company-highlights {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}

/* AI助手打字动画 */
.typing-indicator .dot {
    animation: blink 1.4s infinite both;
    font-weight: bold;
}
.typing-indicator .dot:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator .dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink {
    0%, 20% { opacity: 0.2; }
    50% { opacity: 1; }
    100% { opacity: 0.2; }
}

/* ===== HTML预览组件 ===== */
.html-preview-card {
    background: linear-gradient(135deg, #f8f9ff, #f0f2ff);
    border: 1px solid #d0d5f0;
    border-radius: 10px;
    margin: 8px 0;
    overflow: hidden;
}
.html-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}
.html-preview-badge {
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}
.html-preview-actions {
    display: flex;
    gap: 6px;
}
.html-btn {
    padding: 3px 10px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,.4);
    background: rgba(255,255,255,.15);
    color: #fff;
    cursor: pointer;
    font-size: 11px;
    transition: all .2s;
}
.html-btn:hover {
    background: rgba(255,255,255,.3);
}
.html-btn.active {
    background: rgba(255,255,255,.35);
    border-color: rgba(255,255,255,.6);
}
.html-preview-frame {
    display: none;
    background: #fff;
    border-top: 1px solid #e0e0e0;
}
.html-iframe {
    width: 100%;
    height: 320px;
    border: none;
}
.html-code-block {
    background: #1e1e2e;
    color: #cdd6f4;
    padding: 12px;
    margin: 0;
    overflow-x: auto;
    font-size: 11px;
    line-height: 1.5;
    max-height: 300px;
    overflow-y: auto;
    border-top: 1px solid #313244;
}
.html-code-block code {
    font-family: 'Consolas', 'Monaco', monospace;
    white-space: pre-wrap;
    word-break: break-all;
}

/* 全屏预览弹窗 */
.preview-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.preview-overlay.active {
    display: flex;
}
.preview-box {
    background: #fff;
    border-radius: 12px;
    width: 92%;
    max-width: 1000px;
    height: 85%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.preview-header {
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.preview-header h3 {
    font-size: 14px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
}
.preview-close {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
}
.preview-close:hover {
    background: #ff4444;
    color: #fff;
}
.preview-body {
    flex: 1;
    overflow: hidden;
}
.preview-body iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ===== HTML预览组件 - 移动端适配 ===== */
@media (max-width: 768px) {
    .html-preview-card {
        margin: 6px 0;
        border-radius: 8px;
    }
    .html-preview-header {
        padding: 6px 10px;
        flex-wrap: wrap;
        gap: 6px;
    }
    .html-preview-badge {
        font-size: 11px;
    }
    .html-preview-actions {
        width: 100%;
        justify-content: flex-end;
    }
    .html-btn {
        padding: 4px 8px;
        font-size: 10px;
    }
    .html-iframe {
        height: 240px;
    }
    .html-code-block {
        font-size: 10px;
        padding: 8px;
        max-height: 200px;
    }
    .preview-box {
        width: 96%;
        height: 90%;
        border-radius: 8px;
    }
    .preview-header {
        padding: 8px 12px;
    }
    .preview-header h3 {
        font-size: 12px;
    }
    .preview-close {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
}

/* 小屏手机 */
@media (max-width: 375px) {
    .html-iframe {
        height: 200px;
    }
    .html-code-block {
        font-size: 9px;
        max-height: 150px;
    }
    .preview-box {
        width: 98%;
        height: 92%;
    }
}

/* 平板 */
@media (min-width: 769px) and (max-width: 1024px) {
    .html-iframe {
        height: 280px;
    }
    .preview-box {
        max-width: 800px;
    }
}

/* 横屏手机 */
@media (max-width: 768px) and (orientation: landscape) {
    .html-iframe {
        height: 180px;
    }
    .preview-box {
        height: 80%;
    }
}

/* ===== 主页面响应式增强 ===== */

/* 小屏手机 (<=480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    .hero {
        padding: 40px 16px;
    }
    .hero-content h2 {
        font-size: 1.5rem;
    }
    .hero-content p {
        font-size: 1rem;
    }
    .hero-features {
        gap: 0.8rem;
    }
    .hero-features .feature {
        padding: 12px;
    }
    .hero-features .feature h3 {
        font-size: 0.9rem;
    }
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    .plugins-grid,
    .services-grid {
        gap: 12px;
    }
    .plugin-card,
    .service-card {
        padding: 16px;
    }
    .plugin-card h3,
    .service-card h3 {
        font-size: 1rem;
    }
    .section-title {
        font-size: 1.3rem;
    }
    .contact-content {
        padding: 16px;
    }
    .footer-content {
        padding: 16px;
        font-size: 0.8rem;
    }
}

/* 平板 (769px-1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 960px;
    }
    .plugins-grid,
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .about-content {
        grid-template-columns: 1fr 1fr;
    }
}

/* 大屏桌面 (>=1400px) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    .plugins-grid,
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 横屏手机特殊处理 */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 30px 20px;
    }
    .hero-content h2 {
        font-size: 1.5rem;
    }
    .plugins-grid,
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 打印样式 */
@media print {
    .ai-assistant-container,
    .preview-overlay {
        display: none !important;
    }
}
