/* assets/css/style.css */
:root {
    --primary-color: #4CAF50;
    --primary-dark: #388E3C;
    --secondary-color: #607D8B;
    --accent-color: #FF9800;
    --text-color: #333;
    --light-gray: #f5f5f5;
    --medium-gray: #e0e0e0;
    --dark-gray: #757575;
    --error-color: #f44336;
    --success-color: #4CAF50;
    --warning-color: #FFC107;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f9f9f9;
}

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

/* 头部样式 */
header {
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.logo a {
    text-decoration: none;
    color: inherit;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 1.5rem;
}

.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 {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
    text-align: center;
}

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

.btn-secondary {
    background-color: var(--secondary-color);
}

.btn-secondary:hover {
    background-color: var(--dark-gray);
}

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

.btn-danger:hover {
    background-color: #d32f2f;
}

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

.btn-warning:hover {
    background-color: #FFA000;
}

.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* 首页样式 */
.hero-section {
    text-align: center;
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 8px;
    margin-bottom: 3rem;
}

.hero-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-section .lead {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cta-buttons .btn {
    margin: 0 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.features-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

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

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

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

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

/* 表单样式 */
.project-form, .entity-form, .item-form, .block-form, .armor-form, .import-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto;
}

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

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

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

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

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

.form-help {
    font-size: 0.8rem;
    color: var(--dark-gray);
    margin-top: 0.25rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* 项目编辑页面样式 */
.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.edit-project-tabs {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.tabs {
    display: flex;
    background: var(--light-gray);
    border-bottom: 1px solid var(--medium-gray);
    overflow-x: auto;
}

.tab-button {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
    white-space: nowrap;
    flex-shrink: 0;
}

.tab-button:hover {
    background: var(--medium-gray);
}

.tab-button.active {
    background: white;
    border-bottom: 2px solid var(--primary-color);
    font-weight: 500;
}

.tab-content {
    padding: 2rem;
    display: none;
}

.tab-content.active {
    display: block;
}

.content-actions {
    margin-bottom: 1.5rem;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.content-card {
    background: var(--light-gray);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.content-card:hover {
    transform: translateY(-3px);
}

.content-image {
    height: 150px;
    background: var(--medium-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.placeholder-image {
    color: var(--dark-gray);
    font-size: 0.9rem;
}

.content-details {
    padding: 1rem;
}

.content-details h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.content-details p {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--dark-gray);
    line-height: 1.4;
}

.content-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
}

.content-stats span {
    background: var(--medium-gray);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    color: var(--dark-gray);
}

.content-card .content-actions {
    margin-bottom: 0;
    display: flex;
    gap: 0.5rem;
}

.no-content {
    text-align: center;
    padding: 2rem;
    color: var(--dark-gray);
}

.no-content a {
    color: var(--primary-color);
    text-decoration: none;
}

.no-content a:hover {
    text-decoration: underline;
}

/* 项目列表样式 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.project-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s;
}

.project-card:hover {
    transform: translateY(-3px);
}

.project-info h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.project-description {
    color: var(--dark-gray);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.project-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--dark-gray);
}

.project-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--light-gray);
    border-radius: 4px;
    font-size: 0.9rem;
}

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

/* 统计信息样式 */
.project-meta-info {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--medium-gray);
}

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

.stat-item {
    background: var(--light-gray);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--dark-gray);
}

/* 警告框样式 */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    transition: opacity 0.3s;
}

.alert-success {
    background-color: #E8F5E9;
    color: var(--success-color);
    border: 1px solid #C8E6C9;
}

.alert-error {
    background-color: #FFEBEE;
    color: var(--error-color);
    border: 1px solid #FFCDD2;
}

.alert-warning {
    background-color: #FFF8E1;
    color: #FF8F00;
    border: 1px solid #FFECB3;
}

/* 导入信息样式 */
.import-info {
    background: #E3F2FD;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #2196F3;
}

/* 页脚样式 */
footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    color: var(--dark-gray);
    border-top: 1px solid var(--medium-gray);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .nav-links {
        margin-top: 1rem;
    }
    
    .nav-links li {
        margin: 0 0.75rem;
    }
    
    .project-header, .page-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .project-stats {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .project-stats span {
        flex: 1;
        min-width: calc(50% - 0.5rem);
        text-align: center;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .projects-grid, .content-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .cta-buttons {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    
    .cta-buttons .btn {
        margin: 0;
    }
    
    .project-form, .entity-form, .item-form, .block-form, .armor-form, .import-form {
        padding: 1rem;
    }
    
    .tab-content {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
/* assets/css/style.css */
/* ... 之前的样式保持不变 ... */

/* 外部链接样式 */
.external-link {
    color: var(--primary-color) !important;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.external-link:hover {
    color: var(--primary-dark) !important;
    text-decoration: underline;
}

/* 下载信息样式 */
.download-info {
    max-width: 400px;
    margin: 2rem auto 0;
}

.download-info a {
    color: white;
    text-decoration: underline;
    font-weight: bold;
}

.download-info a:hover {
    color: var(--light-gray);
}

/* 项目图标预览 */
.icon-preview {
    margin-top: 0.5rem;
    text-align: center;
}

.icon-preview img {
    max-width: 64px;
    max-height: 64px;
    border-radius: 4px;
    border: 1px solid var(--medium-gray);
}

/* 项目卡片中的图标 */
.project-icon {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    margin-right: 0.5rem;
    vertical-align: middle;
}

/* 响应式设计改进 */
@media (max-width: 768px) {
    .external-link {
        font-size: 0.9rem;
    }
    
    .download-info {
        margin: 1rem auto 0;
        padding: 0.75rem;
    }
}

/* assets/css/style.css - 添加新样式 */

/* 动态字段显示/隐藏 */
.form-group {
    transition: all 0.3s ease;
}

/* 文件上传预览 */
.file-preview {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: var(--light-gray);
    border-radius: 4px;
    font-size: 0.9rem;
}

.file-preview .file-name {
    font-weight: bold;
    color: var(--primary-color);
}

/* 模型文件指示器 */
.model-indicator {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

/* 行为类型标签 */
.behavior-hostile {
    background: var(--error-color);
    color: white;
}

.behavior-neutral {
    background: var(--warning-color);
    color: var(--text-color);
}

.behavior-passive {
    background: var(--success-color);
    color: white;
}

/* 响应式表单改进 */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }
    
    .form-row .form-group {
        margin-bottom: 1rem;
    }
}

/* 合成配方样式 */
.crafting-preview {
    display: inline-block;
    border: 1px solid var(--medium-gray);
    border-radius: 4px;
    padding: 5px;
    background: white;
    margin-top: 0.5rem;
}

.pattern-slot {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 1px solid var(--medium-gray);
    text-align: center;
    line-height: 40px;
    margin: 1px;
    background: var(--light-gray);
    font-size: 0.8rem;
}

.recipe-pattern {
    margin: 1rem 0;
}

/* 掉落物样式 */
.drop-item {
    border: 1px solid var(--medium-gray);
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--light-gray);
}

.drop-item .form-row {
    margin-bottom: 0;
}

/* 工具类型指示器 */
.tool-type {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

/* 行为类型标签 */
.behavior-hostile {
    background: var(--error-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.behavior-neutral {
    background: var(--warning-color);
    color: var(--text-color);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.behavior-passive {
    background: var(--success-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* 经验值指示器 */
.experience-indicator {
    display: inline-block;
    background: #9C27B0;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

/* 掉落物指示器 */
.drops-indicator {
    display: inline-block;
    background: #FF9800;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

/* 生物蛋指示器 */
.spawn-egg-indicator {
    display: inline-block;
    background: #2196F3;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}