/* 全局样式 */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #10b981;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #f9fafb;
    --white: #ffffff;
    --border-color: #e5e7eb;
    --error-color: #ef4444;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
}

/* 导航栏 */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.logo i {
    font-size: 1.75rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* 按钮样式 */
.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    border: 2px solid var(--primary-color);
    transition: all 0.3s;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #059669;
}

.btn-danger {
    background: var(--error-color);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Hero区域 */
.hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    min-height: calc(100vh - 200px);
}

.hero-content h1 {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

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

/* Mockup样式 */
.mockup {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.mockup-header {
    background: #f3f4f6;
    padding: 0.75rem;
    display: flex;
    gap: 0.5rem;
}

.mockup-header span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #d1d5db;
}

.mockup-header span:first-child { background: #ef4444; }
.mockup-header span:nth-child(2) { background: #f59e0b; }
.mockup-header span:nth-child(3) { background: #10b981; }

.mockup-content {
    padding: 2rem;
}

.mockup-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mockup-title {
    height: 24px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    width: 60%;
}

.mockup-field {
    height: 48px;
    background: #f3f4f6;
    border-radius: 8px;
}

.mockup-field.short {
    width: 40%;
}

/* 功能特性 */
.features {
    background: var(--white);
    padding: 5rem 2rem;
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

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

.feature-card {
    padding: 2rem;
    border-radius: 12px;
    background: var(--bg-color);
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.feature-icon i {
    font-size: 1.5rem;
    color: var(--white);
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-light);
}

/* 使用流程 */
.process {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.process h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.process-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.step {
    text-align: center;
    padding: 2rem;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.step h3 {
    margin-bottom: 0.5rem;
}

.step p {
    color: var(--text-light);
}

.step-arrow {
    color: var(--text-light);
    font-size: 1.5rem;
}

/* 页脚 */
.footer {
    background: var(--text-color);
    color: var(--white);
    padding: 3rem 2rem;
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* 表单样式 */
.form-container {
    max-width: 480px;
    margin: 4rem auto;
    padding: 2rem;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.form-container h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group .hint {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.form-error {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-success {
    color: var(--success-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Dashboard样式 */
.dashboard {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: var(--white);
    border-right: 1px solid var(--border-color);
    padding: 2rem 0;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    background: var(--bg-color);
    color: var(--primary-color);
    border-left: 3px solid var(--primary-color);
}

.main-content {
    padding: 2rem;
    background: var(--bg-color);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 1.75rem;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.stat-card h3 {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* 表单列表 */
.forms-list {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.forms-list-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-item {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
}

.form-item:hover {
    background: var(--bg-color);
}

.form-item:last-child {
    border-bottom: none;
}

.form-info h4 {
    margin-bottom: 0.25rem;
}

.form-info p {
    color: var(--text-light);
    font-size: 0.875rem;
}

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

.form-actions button,
.form-actions a {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-edit {
    background: #dbeafe;
    color: #2563eb;
    border: none;
}

.btn-edit:hover {
    background: #bfdbfe;
}

.btn-view {
    background: #d1fae5;
    color: #059669;
    border: none;
}

.btn-view:hover {
    background: #a7f3d0;
}

/* 表单编辑器 */
.form-editor {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    min-height: calc(100vh - 200px);
}

.editor-sidebar {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.question-types h3 {
    margin-bottom: 1rem;
}

.question-type {
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: var(--bg-color);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s;
}

.question-type:hover {
    background: var(--primary-color);
    color: var(--white);
}

.editor-main {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.editor-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.editor-header input {
    width: 100%;
    border: none;
    font-size: 1.5rem;
    font-weight: 600;
    padding: 0.5rem 0;
}

.editor-header input:focus {
    outline: none;
}

.question-item {
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1rem;
    position: relative;
}

.question-item:hover {
    border-color: var(--primary-color);
}

.question-item .question-title {
    font-weight: 500;
    margin-bottom: 1rem;
}

.question-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.question-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.question-option input[type="text"] {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.delete-question {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 1.25rem;
}

.delete-question:hover {
    color: var(--error-color);
}

/* VIP徽章 */
.vip-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.vip-badge i {
    font-size: 0.625rem;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

/* 数据表格 */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: var(--bg-color);
    font-weight: 600;
}

.data-table tr:hover {
    background: var(--bg-color);
}

/* Toast通知 */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: var(--white);
    font-weight: 500;
    z-index: 1001;
    animation: slideIn 0.3s ease;
}

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

.toast.error {
    background: var(--error-color);
}

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

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 响应式 */
@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

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

    .hero-buttons {
        justify-content: center;
    }

    .process-steps {
        flex-direction: column;
    }

    .step-arrow {
        transform: rotate(90deg);
    }

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

    .sidebar {
        display: none;
    }

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