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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: #1a1a2e;
    background: #f8f9fa;
}

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

/* 导航栏 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

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

.logo h1 {
    font-size: 1.5rem;
    color: #fff;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.tagline {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.8);
    display: block;
    margin-top: 2px;
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

.nav a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s;
    padding: 8px 12px;
    border-radius: 8px;
}

.nav a:hover, .nav a.active {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.hamburger {
    display: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

/* 英雄区 */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 100px 0 80px;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 35px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #fff;
    color: #667eea;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

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

.btn-secondary {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 2px solid rgba(255,255,255,0.3);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.5);
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.85rem;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-danger {
    background: #e74c3c;
    color: #fff;
}

.btn-success {
    background: #2ecc71;
    color: #fff;
}

/* 功能区块 */
.features {
    padding: 80px 0;
    background: #fff;
}

.features h2, .section-desc {
    text-align: center;
    margin-bottom: 15px;
}

.features h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #1a1a2e;
}

.section-desc {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 50px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

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

.feature-card {
    background: #fff;
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    text-align: center;
    transition: all 0.3s;
    border: 1px solid #f0f0f5;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.15);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 1.8rem;
    color: #fff;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #1a1a2e;
}

.feature-card p {
    color: #666;
    font-size: 0.95rem;
}

/* 模板区域 */
.templates {
    padding: 80px 0;
    background: #f8f9fa;
}

.template-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 24px;
    border-radius: 50px;
    border: 2px solid #e0e0e0;
    background: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn.active, .filter-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: transparent;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.template-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.template-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}

.template-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.template-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.template-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(102, 126, 234, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s;
}

.template-card:hover .template-overlay {
    opacity: 1;
}

.template-info {
    padding: 25px;
}

.template-info h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #1a1a2e;
}

.template-info p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.template-category {
    display: inline-block;
    padding: 4px 14px;
    background: #f0f0ff;
    color: #667eea;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* 编辑器介绍 */
.editor-intro {
    padding: 80px 0;
    background: #fff;
}

.editor-demo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.editor-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}

.editor-features ul {
    list-style: none;
    margin-bottom: 30px;
}

.editor-features li {
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.editor-features li i {
    color: #2ecc71;
    font-size: 1.3rem;
}

/* 预览区 */
.preview-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-align: center;
}

.preview-section .section-desc {
    color: rgba(255,255,255,0.85);
}

.preview-demo {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 40px 0;
}

.preview-card {
    background: rgba(255,255,255,0.1);
    padding: 40px 30px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.preview-card i {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.preview-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.preview-card p {
    opacity: 0.85;
}

/* 组件库 */
.components {
    padding: 80px 0;
    background: #fff;
    text-align: center;
}

.component-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.component-item {
    background: #f8f9fa;
    padding: 25px 15px;
    border-radius: 15px;
    font-weight: 600;
    color: #1a1a2e;
    transition: all 0.3s;
    cursor: grab;
    border: 2px solid transparent;
}

.component-item:hover {
    border-color: #667eea;
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.15);
}

.component-item i {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: #667eea;
}

/* 数据与响应式 */
.data-responsive {
    padding: 80px 0;
    background: #f8f9fa;
}

.dr-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.dr-card {
    background: #fff;
    padding: 50px 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.dr-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}

.dr-card i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 20px;
}

.dr-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.dr-card p {
    color: #666;
}

/* 发布区 */
.publish {
    padding: 80px 0;
    background: #fff;
    text-align: center;
}

.publish-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 40px 0;
}

.publish-card {
    background: #f8f9fa;
    padding: 40px 30px;
    border-radius: 20px;
    transition: all 0.3s;
}

.publish-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}

.publish-card i {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 20px;
}

.publish-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.publish-card p {
    color: #666;
}

/* 页脚 */
.footer {
    background: #1a1a2e;
    color: #fff;
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.footer-col h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #a0a0c0;
}

.footer-col p {
    color: #b0b0c0;
    margin-bottom: 10px;
}

.footer-col a {
    color: #a0a0c0;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: #667eea;
}

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

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-bottom {
    border-top: 1px solid #2a2a4e;
    padding-top: 30px;
    text-align: center;
    color: #a0a0c0;
}

/* 页面通用 */
.page-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 80px 0 60px;
    text-align: center;
}

.page-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* 编辑器页面 */
.editor-demo-full {
    padding: 60px 0;
    background: #fff;
}

.editor-layout {
    display: grid;
    grid-template-columns: 250px 1fr 250px;
    gap: 20px;
    height: 500px;
    margin-bottom: 30px;
}

.editor-sidebar {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    border: 2px dashed #e0e0e0;
}

.editor-sidebar h3 {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: #1a1a2e;
}

.editor-sidebar .component-item {
    background: #fff;
    margin-bottom: 10px;
    padding: 12px 15px;
    border-radius: 10px;
    cursor: grab;
    border: 1px solid #e0e0e0;
    text-align: center;
}

.editor-canvas {
    background: #fff;
    border: 2px dashed #667eea;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.canvas-placeholder {
    text-align: center;
    color: #999;
}

.canvas-placeholder i {
    font-size: 4rem;
    margin-bottom: 15px;
    color: #667eea;
}

.editor-properties {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    border: 2px dashed #e0e0e0;
}

.editor-properties h3 {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: #1a1a2e;
}

.editor-actions {
    text-align: center;
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* 预览页面 */
.preview-container {
    padding: 60px 0;
    background: #fff;
}

.preview-devices {
    text-align: center;
}

.device-selector {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
}

.device-btn {
    padding: 10px 24px;
    border-radius: 50px;
    border: 2px solid #e0e0e0;
    background: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.device-btn.active, .device-btn:hover {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

.preview-frame {
    width: 375px;
    height: 667px;
    background: #f8f9fa;
    border: 3px solid #333;
    border-radius: 30px;
    margin: 0 auto 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.frame-placeholder {
    text-align: center;
    color: #999;
}

.frame-placeholder i {
    color: #667eea;
    margin-bottom: 20px;
}

.preview-tools {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* 组件库页面 */
.component-library {
    padding: 60px 0;
    background: #f8f9fa;
}

.component-grid-full {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
}

.component-card {
    background: #fff;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.component-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}

.component-card i {
    color: #667eea;
    margin-bottom: 15px;
}

.component-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.component-card p {
    color: #666;
    font-size: 0.9rem;
}

/* 发布页面 */
.publish-options-full {
    padding: 60px 0;
    background: #fff;
}

.publish-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.publish-card-large {
    background: #f8f9fa;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s;
}

.publish-card-large:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}

.publish-card-large i {
    color: #667eea;
    margin-bottom: 20px;
}

.publish-card-large h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.publish-card-large p {
    color: #666;
    margin-bottom: 25px;
}

.publish-input {
    display: flex;
    gap: 10px;
}

.publish-input input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.9rem;
    background: #fff;
}

.qr-code {
    margin: 20px 0;
}

.qr-code img {
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* 管理后台 */
.admin-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px 20px;
}

.login-form {
    background: #fff;
    padding: 50px 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    max-width: 420px;
    width: 100%;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 1.8rem;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.login-header p {
    color: #666;
}

.form-group {
    margin-bottom: 20px;
}

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

.form-group input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.alert {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 600;
}

.alert-error {
    background: #ffeaea;
    color: #e74c3c;
    border: 1px solid #ffd0d0;
}

.alert-success {
    background: #eafff0;
    color: #2ecc71;
    border: 1px solid #c0f0d0;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
}

.login-footer a {
    color: #667eea;
    text-decoration: none;
}

.admin-dashboard {
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.admin-header h1 {
    font-size: 1.8rem;
    color: #1a1a2e;
}

.admin-nav {
    display: flex;
    gap: 12px;
}

.admin-form h2 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: #1a1a2e;
}

.data-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
}

.data-section h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: #1a1a2e;
}

.data-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.data-row input {
    flex: 1;
    min-width: 150px;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
}

/* 响应式 */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        padding: 20px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    }

    .nav.show {
        display: block;
    }

    .nav ul {
        flex-direction: column;
        gap: 10px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .editor-demo {
        grid-template-columns: 1fr;
    }

    .preview-demo {
        grid-template-columns: 1fr;
    }

    .publish-options {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .dr-grid {
        grid-template-columns: 1fr;
    }

    .editor-layout {
        grid-template-columns: 1fr;
        height: auto;
    }

    .editor-sidebar, .editor-properties {
        display: none;
    }

    .preview-frame {
        width: 100%;
        height: 500px;
        border-radius: 15px;
    }

    .admin-dashboard {
        padding: 20px;
    }

    .data-row {
        flex-direction: column;
    }

    .data-row input {
        min-width: 100%;
    }

    .page-hero h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.6rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .template-grid {
        grid-template-columns: 1fr;
    }

    .component-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}