body {
    background-color: #1a1a1a;
}

.main-content {
    flex-grow: 1;
}

.login-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
}

.card {
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

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

.movie-poster {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    width: 100%;
    height: 100%;
}

#carouselExampleIndicators {
    border-radius: 20px !important;
    overflow: hidden !important;
    position: relative !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
    margin: 10px 0 !important;
}

.carousel-inner {
    border-radius: 20px !important;
    overflow: hidden !important;
}



.carousel-item {
    position: relative;
}

.carousel-item img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    pointer-events: none;
    border-radius: 20px !important;
}

.carousel-control-prev-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e") !important;
}

.carousel-control-next-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e") !important;
}

/* 轮播图标题样式 */
.carousel-title {
    position: absolute !important;
    bottom: 50px !important;
    left: 20px !important;
    background: rgba(0, 0, 0, 0.75) !important;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
    max-width: calc(100% - 40px) !important;
    z-index: 15 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

.carousel-title h5 {
    margin-bottom: 0 !important;
    font-weight: bold !important;
    font-size: 1.1rem !important;
    line-height: 1.3 !important;
    word-wrap: break-word !important;
}

/* 响应式适配 */
@media (max-width: 576px) {
    .carousel-title {
        bottom: 45px !important;
        left: 15px !important;
        padding: 6px 12px !important;
        border-radius: 6px !important;
        max-width: calc(100% - 30px) !important;
    }
    
    .carousel-title h5 {
        font-size: 0.95rem !important;
    }
    
    .carousel-indicators {
        bottom: 12px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
}

@media (max-width: 400px) {
    .carousel-title {
        bottom: 40px !important;
        left: 10px !important;
        padding: 5px 10px !important;
        max-width: calc(100% - 20px) !important;
    }
    
    .carousel-title h5 {
        font-size: 0.85rem !important;
    }
    
    .carousel-indicators {
        bottom: 10px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
    
    .carousel-indicators [data-bs-target] {
        width: 8px !important;
        height: 8px !important;
        margin: 0 3px !important;
    }
}

/* 轮播图指示器样式 */
.carousel-indicators {
    position: absolute !important;
    bottom: 15px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    margin-bottom: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    z-index: 20 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: auto !important;
    padding: 0 !important;
}

.carousel-indicators [data-bs-target] {
    width: 10px !important;
    height: 10px !important;
    border-radius: 50% !important;
    background-color: rgba(255, 255, 255, 0.6) !important;
    border: 1px solid rgba(0, 0, 0, 0.3) !important;
    opacity: 0.7 !important;
    margin: 0 5px !important;
    flex-shrink: 0 !important;
    transition: all 0.3s ease !important;
}

.carousel-indicators [data-bs-target].active {
    background-color: rgba(255, 255, 255, 0.95) !important;
    opacity: 1 !important;
    transform: scale(1.3) !important;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5) !important;
}

/* 确保指示器容器完美居中 */
#carouselExampleIndicators .carousel-indicators {
    position: absolute !important;
    bottom: 15px !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}



.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    padding: 1.2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    background-repeat: no-repeat;
    background-position: center;
}

.form-signin {
    max-width: 400px;
    padding: 1rem;
}

.nav-pills .nav-link.active, .nav-pills .show>.nav-link {
    background-color: var(--bs-primary);
}

.btn-primary {
    --bs-btn-bg: #0d6efd;
    --bs-btn-border-color: #0d6efd;
    --bs-btn-hover-bg: #0b5ed7;
    --bs-btn-hover-border-color: #0a58ca;
}

/* 优化轮播图控制按钮 */
.carousel-control-prev,
.carousel-control-next {
    width: 50px !important;
    height: 50px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: rgba(222, 234, 236, 0.5) !important;
    border-radius: 50% !important;
    opacity: 0.8 !important;
    transition: all 0.3s ease !important;
    z-index: 10 !important;
}

.carousel-control-prev {
    left: 15px !important;
}

.carousel-control-next {
    right: 15px !important;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: rgba(139, 122, 122, 0.7) !important;
    opacity: 1 !important;
    transform: translateY(-50%) scale(1.1) !important;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 24px !important;
    height: 24px !important;
    background-color: transparent !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    filter: invert(1) grayscale(100) brightness(200%) !important;
}

/* 轮播图编辑弹窗 - 深色主题风格 */
#editCarouselOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    transition: none;
    animation: none;
    transform: none;
}

#editCarouselBox {
    background: #2b3035;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transition: none;
    animation: none;
    transform: none;
    position: relative;
}

.edit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border-radius: 12px 12px 0 0;
}

.edit-header h5 {
    margin: 0;
    color: #f8f9fa;
    font-weight: 600;
}

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

.close-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #f8f9fa;
}

.edit-body {
    padding: 20px;
    background: #2b3035;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #f8f9fa;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-size: 14px;
    background-color: #212529;
    color: #f8f9fa;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #198754;
    box-shadow: 0 0 0 2px rgba(25, 135, 84, 0.25);
    background-color: #343a40;
}

.form-input::placeholder {
    color: #6c757d;
}

.form-input:disabled {
    background-color: #1a1a1a;
    color: #6c757d;
    border-color: rgba(255, 255, 255, 0.1);
}

.title-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.color-picker {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
    background-color: #212529;
    transition: all 0.2s ease;
    aspect-ratio: 1/1;
    min-width: 40px;
    min-height: 40px;
    box-sizing: border-box;
    display: block;
    padding: 0;
    margin: 0;
}

.color-picker:hover {
    border-color: #198754;
}

.title-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-size: 14px;
    background-color: #212529;
    color: #f8f9fa;
    transition: all 0.2s ease;
}

.title-input:focus {
    outline: none;
    border-color: #198754;
    box-shadow: 0 0 0 2px rgba(25, 135, 84, 0.25);
    background-color: #343a40;
}

.title-input::placeholder {
    color: #6c757d;
}

.form-help {
    color: #adb5bd;
    font-size: 12px;
    margin-top: 6px;
    display: block;
}

.edit-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 0 0 12px 12px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn-secondary {
    padding: 10px 18px;
    background-color: #495057;
    color: #f8f9fa;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background-color: #5a6268;
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.btn-primary {
    padding: 10px 18px;
    background-color: #198754;
    color: #ffffff;
    border: 1px solid #198754;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background-color: #157347;
    border-color: #157347;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(25, 135, 84, 0.3);
}

/* 轮播图编辑弹窗滚动条样式 - 深色主题 */
#editCarouselBox::-webkit-scrollbar {
    width: 6px;
}

#editCarouselBox::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 3px;
}

#editCarouselBox::-webkit-scrollbar-thumb {
    background: #495057;
    border-radius: 3px;
}

#editCarouselBox::-webkit-scrollbar-thumb:hover {
    background: #5a6268;
}

/* 文件上传输入框特殊样式 */
input[type="file"].form-input {
    padding: 8px 10px;
    background-color: #212529;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
}

input[type="file"].form-input:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background-color: #343a40;
}

input[type="file"].form-input:focus {
    border-color: #198754;
    background-color: #343a40;
}

/* 文件上传输入框的文字颜色 */
input[type="file"].form-input::-webkit-file-upload-button {
    background-color: #495057;
    color: #f8f9fa;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    margin-right: 10px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

input[type="file"].form-input::-webkit-file-upload-button:hover {
    background-color: #5a6268;
}

/* 键盘导航焦点样式 */
.close-btn:focus-visible,
.btn-secondary:focus-visible,
.btn-primary:focus-visible {
    outline: 2px solid #198754;
    outline-offset: 2px;
}

/* 弹窗动画增强 - 仅当用户偏好动画时 */
@media (prefers-reduced-motion: no-preference) {
    .close-btn,
    .btn-secondary,
    .btn-primary,
    .form-input,
    .title-input,
    .color-picker {
        transition: all 0.2s ease;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    #editCarouselBox {
        border: 2px solid #f8f9fa;
    }
    
    .form-input,
    .title-input {
        border: 2px solid rgba(255, 255, 255, 0.4);
    }
    
    .btn-primary {
        border: 2px solid #198754;
    }
}

/* 轮播图编辑弹窗中等屏幕响应式设计 */
@media (max-width: 1024px) and (min-width: 769px) {
    .color-picker {
        width: 42px;
        height: 42px;
        aspect-ratio: 1/1;
        min-width: 42px;
        min-height: 42px;
    }
}

/* 轮播图编辑弹窗响应式设计 - 深色主题 */
@media (max-width: 768px) {
    #editCarouselOverlay {
        padding: 10px;
    }
    
    #editCarouselBox {
        max-width: 100%;
        border-radius: 10px;
    }
    
    .edit-header {
        padding: 12px 15px;
        border-radius: 10px 10px 0 0;
    }
    
    .edit-body {
        padding: 15px;
    }
    
    .edit-footer {
        padding: 12px 15px;
        flex-direction: column;
        gap: 10px;
        border-radius: 0 0 10px 10px;
    }
    
    .btn-secondary,
    .btn-primary {
        width: 100%;
        padding: 12px;
        font-size: 15px;
    }
    
    .title-input-group {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .color-picker {
        width: 50px;
        height: 50px;
        border-radius: 8px;
        aspect-ratio: 1/1;
        min-width: 50px;
        min-height: 50px;
        align-self: flex-start;
    }
    
    .form-input,
    .title-input {
        padding: 12px 14px;
        font-size: 15px;
    }
    
    .form-group {
        margin-bottom: 18px;
    }
    
    .form-group label {
        margin-bottom: 8px;
        font-size: 15px;
    }
}

/* 轮播图编辑弹窗超小屏幕优化 */
@media (max-width: 480px) {
    .color-picker {
        width: 45px;
        height: 45px;
        aspect-ratio: 1/1;
        min-width: 45px;
        min-height: 45px;
        border-radius: 6px;
    }
    
    .title-input-group {
        gap: 8px;
    }
    
    #editCarouselBox {
        max-width: calc(100vw - 20px);
        border-radius: 8px;
    }
    
    .edit-header {
        border-radius: 8px 8px 0 0;
    }
    
    .edit-footer {
        border-radius: 0 0 8px 8px;
    }
}

/* Bottom Mobile Navigation */
.mobile-nav {
    display: none; /* Hidden by default on desktop */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    padding: 8px 4px; /* Add some padding to the container bar */
}

.mobile-nav .nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 4px; /* Add margin to space out the buttons */
    padding: 8px 4px;
    color: #f8f9fa;
    text-decoration: none;
    font-size: 0.75rem;
    background-color: #343a40; /* Individual background for each button */
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: background-color 0.2s;
}

.mobile-nav .nav-item i {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.mobile-nav .nav-item:hover {
    background-color: #495057;
}

/* Show the mobile nav only on smaller screens */
@media (max-width: 768px) {
    .mobile-nav {
        display: flex;
        justify-content: space-around;
    }

    body {
        padding-bottom: 80px; /* Adjust body padding to prevent content from being hidden */
    }
}

@media (max-width: 991.98px) {
  /* Position the navbar's container to anchor the absolute menu */
  .navbar > .container {
    position: relative;
  }
  
  .navbar-collapse {
    position: absolute;
    top: 100%; /* Position below the navbar */
    right: 0;
    z-index: 1000; /* Ensure it's on top */
    width: auto;
  }

  /* Style the list of navigation items as the floating panel */
  .navbar-collapse .navbar-nav {
    padding: 1rem;
    margin-top: 0.5rem;
    background-color: rgba(33, 37, 41, 0.95);
    border-radius: 0.375rem;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  }
} 

/* --- Login & Auth Page Styles --- */

.auth-page-body {
    background-color: #1a1a1a;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    justify-content: center;
}

.auth-header {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: #f8f9fa;
    padding: 1rem 0;
}

.auth-header img {
    height: 2.2rem;
    margin-right: 0.5rem;
    vertical-align: text-bottom;
}

.auth-card {
    background-color: #2b3035; /* Dark card background */
    padding: 2.5rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 450px;
    margin: 2rem auto;
}

.auth-card .nav-pills .nav-link {
    color: #adb5bd; /* Lighter text for inactive tabs */
    font-weight: 600;
    padding: 0.75rem;
    border-radius: 0.5rem;
    background: none;
}

.auth-card .nav-pills .nav-link.active {
    background-color: #198754; /* Green background for active tab */
    color: #ffffff;
}

.auth-card .text-muted {
    color: #adb5bd !important; /* Override bootstrap's muted color */
}

.auth-card h2, .auth-card .form-label {
    color: #f8f9fa; /* White text for titles and labels */
}

.auth-card .form-control {
    border-radius: 0.5rem;
    padding: 0.8rem 1rem;
    height: auto;
    border: 1px solid #495057;
    background-color: #212529; /* Dark input background */
    color: #f8f9fa; /* White input text */
}
.auth-card .form-control:focus {
    background-color: #343a40;
    border-color: #198754; /* Green focus border */
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
}
.auth-card .form-control::placeholder {
    color: #6c757d;
}


.auth-btn {
    padding: 0.8rem;
    border-radius: 0.5rem;
    border: none;
    color: white;
    font-weight: bold;
    font-size: 1rem;
    background-color: #198754; /* Green button */
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 1rem;
    box-shadow: 0 4px 15px rgba(25, 135, 84, 0.2);
}

.auth-btn:hover {
    background-color: #157347;
    box-shadow: 0 6px 20px rgba(25, 135, 84, 0.4);
    transform: translateY(-2px);
}

.auth-links {
    margin-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.auth-links a {
    color: #20c997; /* Light green for links */
    text-decoration: none;
    font-weight: 500;
}
.auth-links a:hover {
    text-decoration: underline;
}

/* 分页优化样式 */
.pagination {
    --bs-pagination-padding-x: 0.5rem;
    --bs-pagination-padding-y: 0.25rem;
    --bs-pagination-font-size: 0.875rem;
}

/* 响应式分页 */
@media (max-width: 576px) {
    .pagination {
        --bs-pagination-padding-x: 0.4rem;
        --bs-pagination-padding-y: 0.2rem;
        --bs-pagination-font-size: 0.75rem;
    }
    
    .pagination .page-link {
        min-width: 32px;
        text-align: center;
    }
    
    /* 分页信息文字响应式 */
    .pagination-info {
        font-size: 0.75rem;
        margin-bottom: 0.5rem;
        text-align: center;
    }
}

/* 分页容器响应式 */
.pagination-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.pagination-container .pagination {
    white-space: nowrap;
    margin-bottom: 0;
}

/* 优化省略号样式 */
.pagination .page-item.disabled .page-link {
    border: none;
    background: transparent;
    color: #6c757d;
} 