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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

/* 导航栏 */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
    text-decoration: none;
}

.navbar-nav {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.navbar-nav a {
    color: #333;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.navbar-nav a:hover {
    background: #667eea;
    color: white;
}

/* 主要内容区域 */
.main-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin: 2rem auto;
    padding: 2rem;
    max-width: 1200px;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(86, 171, 47, 0.4);
}

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

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 65, 108, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* 表单样式 */
.form-group {
    margin-bottom: 1.5rem;
}

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

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

.table tr:hover {
    background: #f8f9fa;
}

/* 搜索和筛选区域 */
.search-filter {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.search-filter .row {
    display: flex;
    gap: 1rem;
    align-items: end;
    flex-wrap: wrap;
}

.search-filter .col {
    flex: 1;
    min-width: 200px;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination .page-link {
    padding: 0.5rem 1rem;
    border: 1px solid #dee2e6;
    background: white;
    color: #667eea;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.pagination .page-link.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* 电影列表容器 */
.movie-list-container {
    margin-top: 2rem;
}

.movie-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.movie-list-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.movie-list-stats span {
    background: rgba(102, 126, 234, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    color: #667eea;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
}

/* 电影卡片网格 */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.movie-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.movie-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
}

.movie-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    word-break: break-word;
}

.movie-card-subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
}

.movie-card-body {
    padding: 1rem;
}

.movie-info {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.movie-info strong {
    color: #667eea;
}

.movie-card-actions {
    padding: 1rem;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* 电影表格样式 */
.movie-table-container {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.table-responsive {
    overflow-x: auto;
}

.movie-table {
    width: 100%;
    border-collapse: collapse;
}

.movie-table th,
.movie-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.movie-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.movie-table tr:hover {
    background: #f8f9fa;
}

.movie-name {
    max-width: 300px;
}

.movie-name-main {
    font-weight: 600;
    color: #333;
    word-break: break-word;
}

.movie-name-sub {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.25rem;
}

.movie-year {
    text-align: center;
    color: #667eea;
    font-weight: 600;
}

.movie-size {
    text-align: center;
    font-weight: 600;
    color: #28a745;
}

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

/* 确认订单页面样式 */
.order-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.summary-item {
    background: rgba(102, 126, 234, 0.1);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.summary-label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.summary-value {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.selected-movies-list {
    margin-bottom: 2rem;
}

.selected-movie-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 1rem;
    background: white;
    transition: all 0.3s ease;
}

.selected-movie-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.movie-info {
    flex: 1;
}

.movie-name {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.movie-details {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #666;
    flex-wrap: wrap;
}

.movie-chinese {
    color: #667eea;
    font-weight: 500;
}

.movie-year {
    color: #28a745;
}

.movie-size {
    color: #dc3545;
    font-weight: 600;
}

.order-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.bulk-actions {
    display: flex;
    justify-content: center;
    padding: 1rem 0;
    border-top: 1px solid #e9ecef;
    margin-top: 1rem;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

/* 警告和成功消息 */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* 导航栏优化 - 强制一行显示 */
    .navbar {
        padding: 0.5rem 0;
    }
    
    .navbar .container {
        flex-direction: row;
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: space-between;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
        flex-shrink: 0;
    }
    
    .navbar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.25rem;
        justify-content: flex-end;
        margin: 0;
    }
    
    .navbar-nav li {
        margin: 0;
    }
    
    .navbar-nav a {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }
    
    /* 主内容区域优化 */
    .main-content {
        margin: 1rem auto;
        padding: 1rem;
        border-radius: 10px;
    }
    
    /* 统计信息优化 */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .stat-card {
        padding: 0.75rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    /* 搜索筛选优化 */
    .search-filter {
        margin-bottom: 1rem;
    }
    
    .search-filter .row {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .search-filter .col {
        min-width: auto;
    }
    
    .search-filter .form-control {
        font-size: 16px; /* 防止iOS缩放 */
    }
    
    /* 电影列表优化 */
    .movie-list-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .movie-list-stats {
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 0.25rem;
        font-size: 0.9rem;
    }
    
    .movie-list-stats span {
        background: #f8f9fa;
        padding: 0.25rem 0.5rem;
        border-radius: 4px;
        font-size: 0.8rem;
    }
    
    .view-toggle {
        justify-content: center;
        gap: 0.5rem;
    }
    
    .view-toggle .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    /* 电影网格优化 */
    .movie-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .movie-card {
        margin-bottom: 0;
    }
    
    .movie-card-header {
        padding: 1rem;
    }
    
    .movie-card-title {
        font-size: 1rem;
        line-height: 1.4;
    }
    
    .movie-card-subtitle {
        font-size: 0.9rem;
        margin-top: 0.25rem;
    }
    
    .movie-card-body {
        padding: 0 1rem 1rem;
    }
    
    .movie-card-actions {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0 1rem 1rem;
    }
    
    .movie-card-actions .btn {
        width: 100%;
        margin-bottom: 0;
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    /* 电影表格优化 */
    .movie-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .movie-table {
        min-width: 600px;
    }
    
    .movie-table th,
    .movie-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }
    
    .movie-name {
        max-width: 250px;
    }
    
    .movie-name-main {
        font-size: 0.9rem;
        line-height: 1.3;
    }
    
    .movie-actions {
        flex-direction: column;
        gap: 0.25rem;
        min-width: 120px;
    }
    
    .movie-actions .btn {
        font-size: 0.8rem;
        padding: 0.5rem;
        width: 100%;
    }
    
    /* 分页优化 */
    .pagination {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .pagination .page-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    /* 表格通用优化 */
    .table {
        font-size: 0.9rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem;
    }
    
    /* 卡片优化 */
    .card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    /* 按钮优化 */
    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .btn-sm {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    /* 超小屏幕优化 */
    .container {
        padding: 0 10px;
    }
    
    .main-content {
        margin: 0.5rem auto;
        padding: 0.75rem;
    }
    
    /* 导航栏进一步优化 */
    .navbar .container {
        gap: 0.25rem;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    .navbar-nav a {
        padding: 0.125rem 0.25rem;
        font-size: 0.7rem;
    }
    
    /* 统计信息进一步优化 */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .stat-card {
        padding: 0.5rem;
    }
    
    .stat-number {
        font-size: 1.25rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    /* 电影列表统计优化 */
    .movie-list-stats {
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
    }
    
    .movie-list-stats span {
        width: 100%;
        text-align: center;
        font-size: 0.75rem;
    }
    
    /* 电影卡片进一步优化 */
    .movie-card-header {
        padding: 0.75rem;
    }
    
    .movie-card-title {
        font-size: 0.9rem;
    }
    
    .movie-card-subtitle {
        font-size: 0.8rem;
    }
    
    .movie-card-body {
        padding: 0 0.75rem 0.75rem;
    }
    
    .movie-card-actions {
        padding: 0 0.75rem 0.75rem;
    }
    
    .movie-card-actions .btn {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    /* 表格进一步优化 */
    .movie-table th,
    .movie-table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.8rem;
    }
    
    .movie-name {
        max-width: 200px;
    }
    
    .movie-name-main {
        font-size: 0.8rem;
    }
    
    .movie-actions {
        min-width: 100px;
    }
    
    .movie-actions .btn {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    
    /* 分页进一步优化 */
    .pagination {
        gap: 0.125rem;
    }
    
    .pagination .page-link {
        padding: 0.375rem 0.5rem;
        font-size: 0.8rem;
    }
    
    /* 按钮进一步优化 */
    .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .btn-sm {
        padding: 0.375rem 0.5rem;
        font-size: 0.75rem;
    }
    
    /* 卡片进一步优化 */
    .card {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    /* 隐藏不必要的元素 */
    .movie-card-subtitle {
        display: none;
    }
    
    .movie-info {
        display: none;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    position: relative;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #000;
}

/* 工具提示 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Badge样式 */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
}

.badge-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.badge-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    color: white;
}

.badge-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.badge-danger {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    color: white;
}

/* 小按钮样式 */
.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.25rem;
}

/* 文本样式 */
.text-muted {
    color: #6c757d !important;
}

.text-muted:hover {
    color: #495057 !important;
}
