/* 全局样式 - 红黄喜庆配色 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', 'Arial', sans-serif;
}

body {
    background-image: url('../../igame/background.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 100vh;
  margin: 0;
     color: #8B0000;
     line-height: 1.6;
}

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

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #ffd500;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    font-size: 2.2rem;
    position: relative;
    padding-bottom: 15px;
}

h1:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #D32F2F, #FFD700);
    border-radius: 2px;
}

/* 卡片网格布局 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.card {
    background: linear-gradient(145deg, #ffffff, #fff5f5);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(211, 47, 47, 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #FFE4E1;
    position: relative;
}

.card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #D32F2F, #FFD700);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 20px rgba(211, 47, 47, 0.25);
}

.card-image {
    width: 100%;
    height: 160px;
    overflow: hidden;
    position: relative;
}

.card-image:after {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 215, 0, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #D32F2F;
    font-size: 20px;
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover .card-image:after {
    opacity: 1;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

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

.card-name {
    padding: 18px 15px;
    text-align: center;
    font-weight: bold;
    font-size: 16px;
    color: #8B0000;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: rgba(255, 253, 231, 0.7);
    border-top: 1px solid #FFE4E1;
}

/* 后台管理样式 */
.admin-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.form-section, .list-section {
    background: linear-gradient(145deg, #ffffff, #fff9e6);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(211, 47, 47, 0.15);
    border: 1px solid #FFE4E1;
    position: relative;
}

.form-section:before, .list-section:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #D32F2F, #FFD700);
    border-radius: 12px 12px 0 0;
}

.form-section h2, .list-section h2 {
    color: #D32F2F;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #FFD700;
    font-size: 1.5rem;
}

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

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #8B0000;
}

input[type="text"],
input[type="url"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #FFB6C1;
    border-radius: 8px;
    font-size: 16px;
    background: #fff;
    transition: all 0.3s;
}

input[type="text"]:focus,
input[type="url"]:focus {
    border-color: #D32F2F;
    box-shadow: 0 0 0 2px rgba(211, 47, 47, 0.2);
    outline: none;
}

.radio-group {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
}

.input-section {
    margin-top: 8px;
}

button, .button {
    background: linear-gradient(135deg, #D32F2F, #B71C1C);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 15px;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 3px 5px rgba(211, 47, 47, 0.3);
    text-align: center;
}

button:hover, .button:hover {
    background: linear-gradient(135deg, #B71C1C, #8B0000);
    transform: translateY(-2px);
    box-shadow: 0 5px 8px rgba(211, 47, 47, 0.4);
}

.delete-btn {
    background: linear-gradient(135deg, #FF5722, #D84315);
}

.delete-btn:hover {
    background: linear-gradient(135deg, #E64A19, #BF360C);
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #FFE4E1;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #FFE4E1;
}

th {
    background: linear-gradient(135deg, #D32F2F, #B71C1C);
    color: white;
    font-weight: bold;
}

tr:nth-child(even) {
    background-color: #FFF9E6;
}

tr:hover {
    background-color: #FFE4E1;
}

.thumb {
    width: 60px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #FFD700;
}

.actions {
    display: flex;
    gap: 8px;
}

.batch-actions {
    margin-top: 20px;
    text-align: center;
}

/* 播放器样式 */
.player-container {
    display: flex;
    min-height: 100vh;
    background: linear-gradient(135deg, #fff5f5 0%, #fff9e6 100%);
}

.player-main {
    flex: 1;
    padding: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.player-sidebar {
    width: 320px;
    background: linear-gradient(145deg, #ffffff, #fff9e6);
    padding: 20px;
    overflow-y: auto;
    border-left: 1px solid #FFE4E1;
    box-shadow: -5px 0 15px rgba(211, 47, 47, 0.1);
}

.video-player {
    max-width: 900px;
    width: 100%;
    background: linear-gradient(145deg, #ffffff, #fff5f5);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(211, 47, 47, 0.15);
    border: 1px solid #FFE4E1;
    position: relative;
}

.video-player:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #D32F2F, #FFD700);
    border-radius: 12px 12px 0 0;
}

.video-player video {
    width: 100%;
    border-radius: 8px;
    background: #000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.video-player h2 {
    margin: 20px 0;
    font-size: 24px;
    color: #8B0000;
    text-align: center;
}

.share-section {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.share-btn {
    background: linear-gradient(135deg, #D32F2F, #B71C1C);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 3px 5px rgba(211, 47, 47, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.share-btn:hover {
    background: linear-gradient(135deg, #B71C1C, #8B0000);
    transform: translateY(-2px);
    box-shadow: 0 5px 8px rgba(211, 47, 47, 0.4);
}

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

.player-sidebar h3 {
    color: #D32F2F;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #FFD700;
    font-size: 1.4rem;
    text-align: center;
}

.video-list {
    margin-top: 15px;
}

.video-item {
    display: flex;
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
    border: 1px solid #FFE4E1;
    box-shadow: 0 2px 5px rgba(211, 47, 47, 0.1);
}

.video-item:hover {
    background: #FFF9E6;
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(211, 47, 47, 0.15);
}

.video-item.active {
    background: linear-gradient(135deg, #FFF9E6, #FFE4E1);
    border-left: 4px solid #D32F2F;
    box-shadow: 0 4px 8px rgba(211, 47, 47, 0.2);
}

.video-thumb {
    width: 80px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    margin-right: 12px;
    border: 1px solid #FFD700;
    flex-shrink: 0;
}

.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.video-info h4 {
    font-size: 14px;
    margin: 0;
    color: #8B0000;
    font-weight: bold;
    line-height: 1.3;
}

.no-video {
    text-align: center;
    padding: 50px;
    font-size: 18px;
    color: #8B0000;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .player-container {
        flex-direction: column;
    }
    
    .player-sidebar {
        width: 100%;
        order: -1;
        border-left: none;
        border-bottom: 1px solid #FFE4E1;
    }
    
    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .admin-container {
        padding: 10px;
    }
    
    .form-section, .list-section {
        padding: 20px;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .video-player {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .share-btn {
        width: 100%;
        justify-content: center;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .video-item {
        flex-direction: column;
    }
    
    .video-thumb {
        width: 100%;
        height: 120px;
        margin-right: 0;
        margin-bottom: 10px;
    }
}