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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
    background-image: url('../public/images/background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;

}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 50px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(1px);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}


.header {
    background-color: #2c3e50;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav {
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.logo-img {
    height: 40px;
    width: auto;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: bold;
}

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

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.nav-links a:hover {
    color: #3498db;
    transform: translateY(-2px);
}

/* Main 内容样式 */
.main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

.hero {
    text-align: center;
    padding: 3rem 15px;
    background-image: url('../public/images/banners/Movie.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    margin-bottom: 3rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    height: 300px;
    margin: 0 auto 3rem auto;
    max-width: 600px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    z-index: 1;
}

.hero>* {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.search-container {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
    gap: 8px;
    flex-direction: column;
    align-items: center;
}

.search-container::after {
    content: '';
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    text-align: center;
    font-style: italic;
}

.search-input {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    width: 250px;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    border-color: #3498db;
}

.search-btn {
    padding: 8px 16px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.search-btn:hover {
    background-color: #2980b9;
}

/* 搜索按钮加载状态 */
.search-btn.loading {
    background-color: #95a5a6;
    cursor: not-allowed;
    pointer-events: none;
    position: relative;
}

.search-btn.loading::after {
    content: '...';
    margin-left: 5px;
    animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

.movie-description {
    margin-bottom: 30px;
    color: #fff;
    font-size: 1rem;
    opacity: 0.9;
    text-align: center;
}

.movie-description .lastline {
    margin-bottom: 30px;
}

.categories {
    margin-bottom: 3rem;
}

.categories h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

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

.category-card {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.category-card.action-card {
    background-image: url('../public/images/banners/Action.jpeg');
}

.category-card.drama-card {
    background-image: url('../public/images/banners/drama.jpg');
}

.category-card.comedy-card {
    background-image: url('../public/images/banners/comedy.jpg');
}

.category-card.scifi-card {
    background-image: url('../public/images/banners/sci-fi.jpg');
}

.category-card.animation-card {
    background-image: url('../public/images/banners/Animation.png');
}

.category-card.romance-card {
    background-image: url('../public/images/banners/romance.jpg');
}

/* 遮罩层 */
.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(2px);
    z-index: 1;
}

.category-card>* {
    position: relative;
    z-index: 2;
}

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

.category-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

.category-card p {
    color: #fff;
    margin-bottom: 1.5rem;
}

.category-link {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.category-link:hover {
    background-color: #2980b9;
}

.footer {
    background-color: #2c3e50;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-content p {
    opacity: 0.8;
}

.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: none;
    font-size: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

.back-to-top:hover {
    background-color: #2980b9;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #3498db;
    color: white;
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* 音乐控制样式 */
.music-controls {
    position: fixed;
    bottom: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px 15px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
}

.music-controls:hover {
    background: rgba(0, 0, 0, 0.9);
}

.music-toggle {
    background: #3498db;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.music-toggle:hover {
    background: #2980b9;
    transform: scale(1.1);
}

.music-toggle.playing {
    background: #27ae60;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.volume-control {
    display: flex;
    align-items: center;
}

.volume-control input[type="range"] {
    width: 80px;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.volume-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #3498db;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.volume-control input[type="range"]::-webkit-slider-thumb:hover {
    background: #2980b9;
    transform: scale(1.2);
}

.volume-control input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #3498db;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.volume-control input[type="range"]::-moz-range-thumb:hover {
    background: #2980b9;
    transform: scale(1.2);
}

/* 搜索结果样式 */
.search-results {
    margin: 2rem 0;
    animation: fadeInUp 0.6s ease;
    position: relative;
}

.search-results-header {
    text-align: center;
    margin-bottom: 3rem;
    color: white;
}

.search-results-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.search-results-header p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.search-results .btn {
    padding: 0.8rem 2rem;
    font-size: 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.search-results .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* 搜索结果电影网格 */
.search-results .movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* 当搜索结果较少时保持正常大小 */
.search-results .movies-grid:has(.search-result-card:only-child) {
    grid-template-columns: minmax(350px, 1fr);
    justify-items: center;
}

.search-results .movies-grid:has(.search-result-card:nth-child(2):last-child) {
    grid-template-columns: repeat(2, minmax(350px, 1fr));
    justify-items: center;
}

/* 搜索结果电影卡片 */
.search-result-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-result-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* 单个结果时的卡片样式 */
.search-results .movies-grid:has(.search-result-card:only-child) .search-result-card {
    max-width: 500px;
    width: 100%;
}

.search-results .movies-grid:has(.search-result-card:only-child) .search-result-card .movie-poster {
    height: 250px;
}

.search-results .movies-grid:has(.search-result-card:only-child) .search-result-card .movie-info {
    padding: 1.5rem;
}

.search-results .movies-grid:has(.search-result-card:only-child) .search-result-card .movie-title {
    font-size: 1.4rem;
}

/* 两个结果时的卡片样式 */
.search-results .movies-grid:has(.search-result-card:nth-child(2):last-child) .search-result-card {
    max-width: 400px;
    width: 100%;
}

.search-results .movies-grid:has(.search-result-card:nth-child(2):last-child) .search-result-card .movie-poster {
    height: 220px;
}

.search-results .movies-grid:has(.search-result-card:nth-child(2):last-child) .search-result-card .movie-info {
    padding: 1.3rem;
}

.search-results .movies-grid:has(.search-result-card:nth-child(2):last-child) .search-result-card .movie-title {
    font-size: 1.3rem;
}

.search-result-card .movie-poster {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.search-result-card .poster-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.3));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.2rem;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-result-card:hover .poster-overlay {
    opacity: 1;
}

.search-result-card .movie-title-overlay {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 0.4rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.search-score {
    background: rgba(52, 152, 219, 0.9);
    color: white;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    align-self: flex-start;
    backdrop-filter: blur(10px);
}

.search-result-card .movie-info {
    padding: 1.2rem;
}

.search-result-card .movie-title {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.search-result-card .movie-meta {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
}

.search-result-card .movie-year,
.search-result-card .movie-category {
    background: #ecf0f1;
    color: #2c3e50;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.search-result-card .movie-rating {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #f39c12;
    font-weight: 600;
}

.search-result-card .rating-stars {
    color: #f39c12;
    font-size: 0.8rem;
}

.search-result-card .movie-description {
    color: #555;
    margin-bottom: 0.8rem;
    line-height: 1.5;
    font-size: 0.85rem;
}

.search-result-card .movie-details {
    margin-bottom: 1.2rem;
    font-size: 0.8rem;
}

.search-result-card .movie-details p {
    margin-bottom: 0.4rem;
    color: #666;
}

.search-result-card .movie-details strong {
    color: #2c3e50;
    font-weight: 600;
}

.search-result-card .movie-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.search-result-card .btn {
    flex: 1;
    min-width: 100px;
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.search-result-card .btn-primary {
    background: #3498db;
    color: white;
    border: none;
}

.search-result-card .btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.search-result-card .btn-secondary {
    background: #95a5a6;
    color: white;
    border: none;
}

.search-result-card .btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

/* 搜索动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 搜索结果高亮动画 - 已移除 */

/* 搜索结果容器高亮效果 */
.search-results {
    margin: 2rem 0;
    animation: fadeInUp 0.6s ease;
    position: relative;
}

.search-results::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: transparent;
    border-radius: 17px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-results.highlighted::before {
    opacity: 0;
}

/* 滚动指示器样式 */
#scroll-indicator {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: rgba(52, 152, 219, 0.95);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0;
    transition: all 0.3s ease;
    display: none;
}

.scroll-indicator-content {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.scroll-icon {
    font-size: 1.2rem;
    animation: bounce 1s infinite;
}

.scroll-text {
    white-space: nowrap;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

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

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

    .search-input {
        width: 250px;
    }

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

    .search-results .movies-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* 移动端单个结果时的样式 */
    .search-results .movies-grid:has(.search-result-card:only-child) {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }
    
    /* 移动端两个结果时的样式 */
    .search-results .movies-grid:has(.search-result-card:nth-child(2):last-child) {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .search-result-card .movie-poster {
        height: 200px;
    }
    
    .search-result-card .movie-info {
        padding: 1rem;
    }
    
    .search-result-card .movie-actions {
        flex-direction: column;
    }
    
    .search-result-card .btn {
        min-width: auto;
    }
    
    /* 移动端滚动指示器 */
    #scroll-indicator {
        top: 10px;
        left: 20px;
        right: 20px;
        transform: none;
        text-align: center;
    }
    
    .scroll-indicator-content {
        justify-content: center;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .search-container {
        flex-direction: column;
        align-items: center;
    }

    .search-input {
        width: 100%;
        max-width: 300px;
    }

    .search-results-header h2 {
        font-size: 2rem;
    }
    
    .search-results-header p {
        font-size: 1rem;
    }
    
    .search-result-card .movie-poster {
        height: 180px;
    }
    
    .search-result-card .movie-title {
        font-size: 1.2rem;
    }
    
    /* 小屏幕单个结果时的样式 */
    .search-results .movies-grid:has(.search-result-card:only-child) {
        max-width: 350px;
    }
    
    .search-results .movies-grid:has(.search-result-card:only-child) .search-result-card .movie-poster {
        height: 180px;
    }
    
    /* 小屏幕滚动指示器 */
    #scroll-indicator {
        top: 5px;
        left: 10px;
        right: 10px;
        padding: 0.6rem 1rem;
    }
    
    .scroll-indicator-content {
        font-size: 0.75rem;
        gap: 0.5rem;
    }
    
    .scroll-icon {
        font-size: 1rem;
    }
}

/* 测试页面样式 */
.search-instructions {
    margin: 3rem 0;
    color: white;
}

.search-instructions h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

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

.instruction-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.instruction-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.instruction-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #3498db;
}

.instruction-card p {
    color: #ecf0f1;
    line-height: 1.6;
    opacity: 0.9;
}

.test-examples {
    margin: 3rem 0;
    text-align: center;
    color: white;
}

.test-examples h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.examples-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.example-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.example-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.example-btn:active {
    transform: translateY(0);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .instructions-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .instruction-card {
        padding: 1.5rem;
    }
    
    .examples-grid {
        flex-direction: column;
        align-items: center;
    }
    
    .example-btn {
        width: 200px;
    }
}

@media (max-width: 480px) {
    .search-instructions h2,
    .test-examples h2 {
        font-size: 2rem;
    }
    
    .instruction-card {
        padding: 1rem;
    }
    
    .example-btn {
        width: 180px;
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}