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

body {
    font-family: 'Noto Sans SC', sans-serif;
    line-height: 1.6;
    color: #555;
    background: linear-gradient(135deg, #ffd1dc 0%, #c9e9ff 50%, #d0f0fd 100%);
    min-height: 100vh;
    padding: 20px 0;
}

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

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

.header-content {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(255, 105, 180, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 182, 193, 0.3);
}

.header h1 {
    font-size: 2.5rem;
    color: #ff6b6b;
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    gap: 20px;
}

.nav-tab {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    text-decoration: none;
    color: #ff6b6b;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid #ffb6c1;
}

.nav-tab:hover,
.nav-tab.active {
    background: #ff6b6b;
    color: white;
    transform: translateY(-3px);
}

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

.date-selector label {
    font-size: 1rem;
    color: #ff6b6b;
    display: flex;
    align-items: center;
    font-weight: 600;
}

.date-selector select {
    padding: 10px 15px;
    border-radius: 12px;
    border: 2px solid #ffb6c1;
    background: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    color: #ff6b6b;
    min-width: 200px;
    box-shadow: 0 4px 10px rgba(255, 182, 193, 0.3);
}

.content-section {
    display: none;
    width: 100%;
}

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

.content-section h2 {
    text-align: center;
    color: #ff6b6b;
    margin-bottom: 20px;
    font-size: 2rem;
}

.stories-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    padding: 10px;
}

.scripts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    padding: 10px;
}

.story-card, .script-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(255, 105, 180, 0.15);
    transition: all 0.4s ease;
    border: 2px solid #ffb6c1; /* 使用实色而非透明色 */
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.story-card:hover, .script-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(255, 105, 180, 0.3);
    border-color: rgba(255, 182, 193, 0.4);
}

.story-header, .script-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(135deg, #ffe0e6 0%, #e6f7ff 100%);
    border-bottom: 1px solid rgba(255, 182, 193, 0.2);
}

.story-content, .script-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, padding 0.5s ease;
    background: rgba(248, 249, 250, 0.5);
}

.story-card.expanded, .script-card.expanded {
    margin: 10px 0;
}

.story-card.expanded .story-content, .script-card.expanded .script-content {
    max-height: 1000px; /* 足够容纳内容的大值 */
    padding: 0 20px 20px 20px;
}

.story-image {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ffb6c1;
    flex-shrink: 0;
    background: white;
    padding: 3px;
}

.story-info, .script-info {
    flex: 1;
}

.story-info h3, .script-info h3 {
    font-size: 1.3rem;
    color: #ff6b6b;
    margin-bottom: 8px;
    font-weight: 600;
}

.story-excerpt, .script-excerpt {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
}

.story-full-content, .script-full-content {
    color: #555;
    line-height: 1.7;
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
}

.story-full-content h3, .script-full-content h3 {
    color: #ff6b6b;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px dashed #ffb6c1;
    font-size: 1.5rem;
}

.story-full-content p, .script-full-content p {
    margin-bottom: 15px;
    color: #555;
    text-align: justify;
}

/* 故事分类样式 */
.story-categories {
    margin: 40px 0;
    text-align: center;
}

.story-categories h2 {
    text-align: center;
    color: #ff6b6b;
    margin-bottom: 30px;
    font-size: 2rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    padding: 10px;
}

.category-item {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(255, 105, 180, 0.15);
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 182, 193, 0.2);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.category-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(255, 105, 180, 0.3);
    border-color: rgba(255, 182, 193, 0.4);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.category-text h3 {
    font-size: 1.3rem;
    color: #ff6b6b;
    margin-bottom: 10px;
    font-weight: 600;
}

.category-text p {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* AI动漫页面样式 */
.anime-showcase {
    width: 100%;
    margin: 20px 0;
}

.hero-video {
    position: relative;
    width: 100%;
    margin: 0 auto 40px;
    max-width: 900px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    aspect-ratio: 16/9;
}

#featuredVideo {
    width: 100%;
    height: 100%;
    display: block;
}

.video-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 40px 30px 20px;
}

.video-overlay h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: white;
}

.video-overlay p {
    font-size: 1rem;
    opacity: 0.9;
}

.filter-controls {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.8);
    padding: 15px 20px;
    border-radius: 30px;
    border: 2px solid #ffb6c1;
    align-items: center;
}

.filter-btn {
    padding: 8px 16px;
    background: transparent;
    border: 2px solid #ffb6c1;
    border-radius: 20px;
    color: #ff6b6b;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: #ff6b6b;
    color: white;
    border-color: #ff6b6b;
}

.recent-animes,
.all-animes {
    margin-bottom: 50px;
}

.recent-animes h2,
.all-animes h2 {
    text-align: left;
    color: #ff6b6b;
    margin-bottom: 25px;
    font-size: 1.8rem;
    padding-left: 10px;
    border-left: 5px solid #ff6b6b;
}

.anime-list {
    display: flex;
    gap: 25px;
    overflow-x: auto;
    padding: 10px 0 20px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.anime-list::-webkit-scrollbar {
    display: none;
}

.mini-anime-item {
    flex: 0 0 auto;
    width: 250px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 182, 193, 0.2);
}

.mini-anime-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.mini-anime-thumbnail {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    height: 140px;
}

.mini-thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mini-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mini-anime-thumbnail:hover .mini-play-overlay {
    opacity: 1;
}

.mini-play-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #ff6b6b;
    font-weight: bold;
}

.mini-anime-info {
    padding: 15px;
}

.mini-anime-info h4 {
    color: #ff6b6b;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.mini-anime-date {
    color: #888;
    font-size: 0.85rem;
}

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

.grid-anime-item {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 182, 193, 0.2);
    display: flex;
    flex-direction: column;
}

.grid-anime-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.grid-anime-thumbnail {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    height: 180px;
}

.grid-thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.grid-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.grid-anime-thumbnail:hover .grid-play-overlay {
    opacity: 1;
}

.grid-play-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #ff6b6b;
    font-weight: bold;
}

.grid-anime-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.grid-anime-info h3 {
    color: #ff6b6b;
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.grid-anime-date {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.grid-anime-description {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.4;
    flex-grow: 1;
}

/* 外部视频链接样式 */
.external-video {
    cursor: pointer;
    transition: all 0.3s ease;
}

.external-video:hover {
    transform: scale(1.03);
}

.external-video-link {
    position: relative;
    cursor: pointer;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 16/9;
}

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

.external-video-warning {
    text-align: center;
    padding: 30px;
}

.redirect-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin: 20px 0;
    transition: all 0.3s ease;
}

.redirect-btn:hover {
    background: #ff5252;
    transform: translateY(-2px);
}

.hint {
    color: #888;
    font-size: 0.9rem;
}

/* 视频模态框样式 */
#modalVideoPlayer {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 15px;
    max-height: 70vh;
}

.modal h2 {
    color: #ff6b6b;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 2px dashed #ffb6c1;
    font-size: 1.5rem;
}

.modal p {
    color: #555;
    line-height: 1.5;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 900px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 50px rgba(255, 105, 180, 0.4);
    border: 3px solid #ffb6c1;
}

.close {
    color: #ff6b6b;
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close:hover,
.close:focus {
    color: white;
    background: #ff6b6b;
    transform: rotate(90deg);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 182, 193, 0.7);
    backdrop-filter: blur(5px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .stories-container,
    .scripts-container,
    .anime-grid {
        grid-template-columns: 1fr;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .story-header,
    .script-header {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 10px;
    }
    
    .story-image {
        width: 80px;
        height: 80px;
    }
    
    .date-selector {
        flex-direction: column;
        align-items: center;
    }
    
    .date-selector select {
        min-width: 100%;
        max-width: 300px;
    }
    
    .story-info h3,
    .script-info h3 {
        text-align: center;
    }
    
    .story-excerpt,
    .script-excerpt {
        text-align: center;
    }
    
    .hero-video {
        aspect-ratio: 16/10;
    }
    
    .anime-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
        overflow-x: visible;
    }
    
    .nav-tabs {
        flex-wrap: wrap;
    }
    
    .filter-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.story-card,
.script-card,
.grid-anime-item {
    animation: fadeIn 0.5s ease-out;
}

/* 角色形象样式 */
.character-info {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.character {
    flex: 1;
    min-width: 300px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(255, 105, 180, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 182, 193, 0.2);
}

.character-image {
    margin-bottom: 15px;
}

.character-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #ffb6c1;
    background: white;
    padding: 5px;
    display: block;
    margin: 0 auto 15px auto;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(#ff9ec0, #ff6b6b);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(#ff6b6b, #ff8a9e);
}

/* 无故事消息样式 */
.no-stories-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #888;
    font-size: 1.2rem;
}

.no-stories-message p {
    margin: 0;
    display: inline-block;
    padding: 15px 30px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #ffb6c1;
}

/* 视频加载指示器 */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #ff6b6b;
    font-size: 1.2rem;
    font-weight: 600;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 107, 107, 0.2);
    border-top: 5px solid #ff6b6b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.video-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #ff6b6b;
    font-size: 1.2rem;
    font-weight: 600;
}

/* 统计信息和播放按钮样式 */
.stats-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    padding: 15px 20px;
    border-radius: 15px;
    margin: 20px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    flex-wrap: wrap;
    gap: 15px;
}

.stats-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    flex: 1;
}

.stat-item {
    background: rgba(255, 255, 255, 0.3);
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    backdrop-filter: blur(5px);
}

.play-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.play-btn {
    background: linear-gradient(135deg, #00b09b 0%, #96c93d 100%);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

.play-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
}

.pause-btn {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
}

.stop-btn {
    background: linear-gradient(135deg, #8e2de2 0%, #4a00e0 100%);
    width: 40px;
    height: 40px;
}

.progress-container {
    width: 100%;
    margin-top: 15px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ff9a9e, #a8edea);
    width: 0%;
    transition: width 0.1s ease;
}

/* 移动设备适配 */
@media (max-width: 768px) {
    .stats-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .play-controls {
        justify-content: center;
    }
}