/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 解决锚点定位时标题被导航栏遮挡的问题 */
section[id] {
    scroll-margin-top: 100px;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f5f0;
}

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

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 14px;
}

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

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: transparent;
    color: #666;
    border: 1px solid #666;
}

.btn-secondary:hover {
    background-color: #f0f0f0;
}

/* 头部样式 */
.header {
    background-color: #fff;
    padding: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo h1 {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

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

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

.nav-list a:hover {
    color: #007bff;
}

.header-actions {
    display: flex;
    gap: 15px;
}

.header-actions a {
    font-size: 20px;
    text-decoration: none;
    color: #333;
}

/* 英雄区域样式 */
.hero {
    background-color: #fff;
    padding: 40px 0;
    margin-bottom: 40px;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.hero-text h2 {
    font-size: 32px;
    margin-bottom: 10px;
    color: #333;
}

.hero-text p {
    font-size: 18px;
    margin-bottom: 20px;
    color: #666;
}

.hero-level {
    display: flex;
    justify-content: center;
    align-items: center;
}

.level-card {
    background-color: #f0f0f0;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    width: 200px;
}

.level-card h3 {
    margin-bottom: 15px;
    color: #333;
}

.level-card img {
    width: 100%;
    height: auto;
    margin-bottom: 15px;
}

/* 产品展示区域 */
.products {
    padding: 40px 0;
    background-color: #fff;
    margin-bottom: 40px;
}

.products h2 {
    text-align: center;
    margin-bottom: 40px;
    color: #333;
    font-size: 32px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.product-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.product-item img:hover {
    transform: scale(1.05);
}

/* 目录区域 */
.catalog {
    padding: 40px 0;
    background-color: #fff;
    margin-bottom: 40px;
}

.catalog-content {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 40px;
}

/* 过滤侧边栏 */
.filters {
    background-color: #f8f5f0;
    padding: 20px;
    border-radius: 8px;
}

.filters h3 {
    margin-bottom: 10px;
    color: #333;
}

.filters p {
    color: #666;
    margin-bottom: 20px;
}

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

.filter-group h4 {
    margin-bottom: 10px;
    color: #333;
    font-size: 16px;
}

.filter-list {
    list-style: none;
}

.filter-list li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
}

.price-range {
    margin-bottom: 10px;
}

.price-range input[type="range"] {
    width: 100%;
    margin-bottom: 10px;
}

.price-values {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 14px;
}

.filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

/* 产品列表 */
.product-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.product-count {
    color: #666;
}

.sort-options select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.product-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.product-image {
    position: relative;
    overflow: hidden;
    background-color: #f8f8f8;
}

.product-image img {
    width: 100%;
    height: 250px;
    object-fit: contain;
    padding: 20px;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.heart-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(255,255,255,0.8);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.heart-icon:hover {
    background-color: white;
    color: #dc3545;
    transform: scale(1.1);
}

.product-card h4 {
    padding: 15px;
    margin: 0;
    font-size: 16px;
    color: #333;
}

.color-options {
    padding: 0 15px 15px;
    display: flex;
    gap: 10px;
}

.color-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.color-dot:hover {
    transform: scale(1.2);
}

.color-dot.blue {
    background-color: #007bff;
}

.color-dot.black {
    background-color: #333;
}

.color-dot.white {
    background-color: #fff;
    border: 1px solid #ddd;
}

.color-dot.gray {
    background-color: #6c757d;
}

.color-dot.yellow {
    background-color: #ffc107;
}

.color-dot.red {
    background-color: #dc3545;
}

.color-dot.transparent {
    background-color: transparent;
    border: 1px solid #ddd;
}

/* 分享页面样式 */
.share-section {
    padding: 40px 0;
    background-color: #fff;
    margin-bottom: 40px;
}

.share-section h2 {
    text-align: center;
    margin-bottom: 40px;
    color: #333;
    font-size: 32px;
}

.share-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.share-item {
    background-color: #f8f5f0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.share-image {
    width: 100%;
    height: 250px;
    background-color: #e9e5dc;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.share-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.share-item:hover .share-image img {
    transform: scale(1.05);
}

.share-text {
    padding: 30px;
}

.share-text h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 24px;
}

.share-text p {
    margin-bottom: 20px;
    color: #666;
    line-height: 1.6;
}

.upload-info {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.upload-info p {
    margin-bottom: 10px;
    font-weight: bold;
    color: #333;
}

.upload-info ul {
    margin-left: 20px;
    color: #666;
}

.upload-info li {
    margin-bottom: 8px;
}

.upload-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

/* 页脚样式 */
.footer {
    background-color: #333;
    color: white;
    padding: 40px 0;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 关卡页面样式 */
.level-section {
    padding: 40px 0;
    background-color: #fff;
    margin-bottom: 40px;
}

.level-section h2 {
    text-align: center;
    margin-bottom: 40px;
    color: #333;
    font-size: 32px;
}

/* 关卡控制区域 */
.level-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f8f5f0;
    border-radius: 8px;
}

.level-filter, .level-sort {
    display: flex;
    align-items: center;
    gap: 10px;
}

.level-filter label, .level-sort label {
    font-weight: bold;
    color: #333;
}

.level-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    font-size: 14px;
}

.level-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.level-item {
    background-color: #f8f5f0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
    opacity: 1;
    transform: translateY(0);
}

.level-item.hidden {
    display: none;
}

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

.level-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.level-header h3 {
    color: #333;
    font-size: 24px;
    margin: 0;
}

.level-difficulty {
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
}

.level-difficulty.beginner {
    background-color: #007bff;
}

.level-difficulty.intermediate {
    background-color: #ffc107;
    color: #333;
}

.level-difficulty.advanced {
    background-color: #dc3545;
}

/* 根据难度级别设置Play Level按钮颜色 */
.level-item[data-difficulty="beginner"] .btn-primary {
    background-color: #007bff;
}

.level-item[data-difficulty="beginner"] .btn-primary:hover {
    background-color: #0056b3;
}

.level-item[data-difficulty="intermediate"] .btn-primary {
    background-color: #ffc107;
    color: #333;
}

.level-item[data-difficulty="intermediate"] .btn-primary:hover {
    background-color: #e0a800;
}

.level-item[data-difficulty="advanced"] .btn-primary {
    background-color: #dc3545;
}

.level-item[data-difficulty="advanced"] .btn-primary:hover {
    background-color: #c82333;
}

.level-image {
    margin-bottom: 20px;
    text-align: center;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.7s ease-in-out, opacity 0.7s ease-in-out;
}

.level-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transform: translateY(-10px);
    transition: transform 0.5s ease-in-out;
}

.level-image.expanded {
    max-height: 800px;
    opacity: 1;
    transition: max-height 0.7s ease-in-out, opacity 0.7s ease-in-out;
}

.level-image.expanded img {
    transform: translateY(0);
}

.level-description {
    margin-bottom: 20px;
}

.level-description p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.level-elements {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.element {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background-color: white;
    border-radius: 20px;
    font-size: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.element-icon {
    font-size: 16px;
}

.element-name {
    color: #333;
    font-weight: 500;
}

.level-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* 模型展示区域 */
.model-section {
    padding: 40px 0;
    background-color: #fff;
    margin-bottom: 40px;
}

.model-section h2 {
    text-align: center;
    margin-bottom: 40px;
    color: #333;
    font-size: 32px;
}

.model-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.model-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

.model-image {
    position: relative;
    overflow: hidden;
    background-color: #f8f8f8;
    width: 100%;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px 8px 0 0;
}

.model-image img {
    max-width: 100%;
    max-height: 280px;
    object-fit: contain;
    padding: 20px;
    transition: transform 0.3s ease;
}

.model-card:hover .model-image img {
    transform: scale(1.05);
}

.heart-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
    transition: all 0.3s ease;
    width: auto;
    height: auto;
    border-radius: 0;
}

.heart-icon:hover {
    color: #dc3545;
    transform: scale(1.1);
    background: transparent;
}

.download-button {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255,255,255,0.9);
    color: #333;
    padding: 8px 20px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 5px;
}

.download-button:hover {
    background-color: #007bff;
    color: white;
    transform: translateX(-50%) scale(1.05);
}

.model-card h4 {
    padding: 15px 0;
    margin: 0;
    font-size: 16px;
    color: #333;
    text-align: center;
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .model-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .catalog-content {
        grid-template-columns: 1fr;
    }
    
    .filters {
        order: 2;
    }
    
    .product-list {
        order: 1;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-text h2 {
        font-size: 24px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .level-grid {
        grid-template-columns: 1fr;
    }
    
    .level-item {
        padding: 15px;
    }
    
    .level-header h3 {
        font-size: 20px;
    }
    
    .level-actions {
        flex-direction: column;
    }
    
    .level-actions .btn {
        width: 100%;
    }
    
    .level-elements {
        justify-content: center;
    }
    
    .model-grid {
        grid-template-columns: 1fr;
    }
    
    .model-image {
        height: 250px;
    }
    
    .model-section h2 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .level-section h2 {
        font-size: 24px;
    }
    
    .level-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .model-card {
        padding: 10px;
    }
    
    .model-image {
        height: 200px;
    }
    
    .model-image img {
        padding: 10px;
    }
    
    .download-button {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    /* 响应式分享页面 */
    .share-grid {
        grid-template-columns: 1fr;
    }
    
    .upload-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .share-text {
        padding: 20px;
    }
}

/* 故事页面样式 */
.story-section {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.story-content {
    display: flex;
    flex-direction: column;
    gap: 80px;
}

.story-section h2 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 50px;
    color: #333;
    font-weight: 700;
}

.story-intro, .story-challenge, .story-solution, .story-vision {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.story-image {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.story-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.story-image img:hover {
    transform: scale(1.05);
}

.story-text {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
}

.story-text p {
    margin-bottom: 20px;
}

.story-text p:last-child {
    margin-bottom: 0;
}

/* 响应式故事页面 */
@media (max-width: 1024px) {
    .story-intro, .story-challenge, .story-solution, .story-vision {
        gap: 30px;
    }
    
    .story-text {
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    .story-section {
        padding: 60px 0;
    }
    
    .story-content {
        gap: 60px;
    }
    
    .story-intro, .story-challenge, .story-solution, .story-vision {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .story-challenge, .story-vision {
        flex-direction: column-reverse;
    }
    
    .story-text {
        font-size: 14px;
    }
    
    .story-section h2 {
        font-size: 24px;
        margin-bottom: 30px;
    }
}

/* 联系页面样式 */
.contact-section {
    padding: 80px 0;
    background-color: #fff;
}

.contact-section h2 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 50px;
    color: #333;
    font-weight: 700;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
    font-weight: 600;
}

.contact-item p {
    font-size: 16px;
    color: #555;
    margin-bottom: 5px;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-link {
    color: #007bff;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

.social-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.contact-form h3 {
    font-size: 20px;
    margin-bottom: 25px;
    color: #333;
    font-weight: 600;
}

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

.form-group label {
    display: block;
    font-size: 14px;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* 响应式联系页面 */
@media (max-width: 1024px) {
    .contact-content {
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .contact-section {
        padding: 60px 0;
    }
    
    .contact-section h2 {
        font-size: 24px;
        margin-bottom: 30px;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .contact-form h3 {
        font-size: 18px;
        margin-bottom: 20px;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 10px;
        font-size: 13px;
    }
}

/* 创作者部分样式 */
.creators-section {
    padding: 40px 0;
    background-color: #f8f5f0;
}

.creators-content {
    display: flex;
    justify-content: center;
    gap: 120px;
    margin-bottom: 20px;
}

.creator {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.creator-photo {
    width: 150px;
    height: 150px;
    background-color: #e9e5dc;
    border-radius: 50%;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border: 2px solid #007bff;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
    font-size: 32px;
    color: #007bff;
}

.creator-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.creator-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.presentation-text {
    text-align: center;
    font-size: 14px;
    color: #666;
    font-style: italic;
}

/* 响应式创作者部分 */
@media (max-width: 768px) {
    .creators-content {
        gap: 40px;
    }
    
    .creator-photo {
        width: 120px;
        height: 120px;
    }
    
    .creator-name {
        font-size: 16px;
    }
    
    .presentation-text {
        font-size: 13px;
    }
}

/* 管理员控制台样式 */
.admin-console {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 800px;
    height: 100vh;
    background-color: #fff;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.admin-console.hidden {
    transform: translateX(100%);
}

.admin-console-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.admin-console-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.close-btn:hover {
    background-color: #e9ecef;
    color: #333;
}

.admin-console-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.admin-console-content h4 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #333;
    font-weight: 600;
}

.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 10px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 10px 15px;
    font-size: 14px;
    cursor: pointer;
    color: #666;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tab-btn:hover {
    background-color: #e9ecef;
    color: #333;
}

.tab-btn.active {
    background-color: #007bff;
    color: #fff;
}

.tab-content {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.tab-panel {
    display: none;
}

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

.image-upload-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.current-image,
.upload-controls {
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.current-image h5,
.upload-controls h5 {
    font-size: 14px;
    margin-bottom: 15px;
    color: #333;
    font-weight: 600;
}

.current-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.upload-controls input[type="file"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f8f9fa;
    cursor: pointer;
}

.level-images-grid,
.model-images-grid,
.story-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.image-item {
    background-color: #fff;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.image-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
    margin-bottom: 10px;
}

.image-item p {
    font-size: 12px;
    margin: 0 0 10px 0;
    color: #333;
    font-weight: 500;
}

.image-item input[type="file"] {
    width: 100%;
    padding: 8px;
    margin-bottom: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f8f9fa;
    font-size: 12px;
    cursor: pointer;
}

.image-item button {
    width: 100%;
    padding: 6px;
    font-size: 12px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.image-item button:hover {
    background-color: #0056b3;
}

/* 产品图片管理容器样式 */
.product-images-container {
    margin-top: 20px;
}

.product-images-grid, .creator-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
    max-height: none;
    overflow: visible;
}

/* 遮罩层样式 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* 轮播样式 */
.carousel-container {
    position: relative;
    max-width: 100%;
    overflow: hidden;
    margin: 20px 0;
}

.carousel-wrapper {
    overflow: hidden;
    width: 100%;
}

.carousel-slide {
    display: flex;
    width: 100%;
    animation: slide 15s linear infinite;
    /* 复制产品项以实现无缝轮播 */
    animation-play-state: running;
}

/* 快速不间断平移变换效果 - 确保首尾相接，无空白 */
@keyframes slide {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.carousel-slide .product-item {
    flex: 0 0 calc(20% - 20px);
    margin: 0 10px;
    transition: transform 0.3s ease;
    min-width: calc(20% - 20px);
}

.carousel-slide .product-item:hover {
    transform: scale(1.05);
}

.carousel-slide .product-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
}

/* 响应式轮播 */
@media (max-width: 1024px) {
    .carousel-slide .product-item {
        flex: 0 0 calc(25% - 20px);
        min-width: calc(25% - 20px);
    }
    
    @keyframes slide {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(-50%);
        }
    }
}

@media (max-width: 768px) {
    .carousel-slide .product-item {
        flex: 0 0 calc(33.333% - 20px);
        min-width: calc(33.333% - 20px);
    }
    
    @keyframes slide {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(-50%);
        }
    }
}

@media (max-width: 480px) {
    .carousel-slide .product-item {
        flex: 0 0 calc(50% - 20px);
        min-width: calc(50% - 20px);
    }
    
    @keyframes slide {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(-50%);
        }
    }
}

/* 响应式管理员控制台 */
@media (max-width: 768px) {
    .admin-console {
        max-width: 100%;
    }
    
    .image-upload-section {
        grid-template-columns: 1fr;
    }
    
    .admin-tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        font-size: 13px;
        padding: 8px 12px;
    }
}