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

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #000;
    color: #fff;
    min-height: 100vh;
}

header {
    padding: 30px 20px;
    text-align: center;
    border-bottom: 1px solid #333;
}

h1 {
    color: #ff4444;
    font-size: 2.5em;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(255, 68, 68, 0.3);
}

.category-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 12px 30px;
    background-color: transparent;
    color: #fff;
    border: 2px solid #ff4444;
    border-radius: 25px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.category-btn:hover {
    background-color: #ff4444;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 68, 68, 0.4);
}

.category-btn.active {
    background-color: #ff4444;
    box-shadow: 0 5px 15px rgba(255, 68, 68, 0.4);
}

main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.category-title {
    color: #ff4444;
    font-size: 2em;
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ff4444;
    display: inline-block;
    width: 100%;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

.video-card {
    background-color: #1a1a1a;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 68, 68, 0.3);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 宽高比 */
    overflow: hidden;
    background-color: #000;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-thumbnail img.loaded {
    opacity: 1;
}

.image-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #333;
    border-top-color: #ff4444;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 5;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.play-button::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 20px solid #fff;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    margin-left: 5px;
}

.video-card:hover .play-button {
    background-color: rgba(255, 68, 68, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

.vip-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #ff4444;
    color: #fff;
    padding: 5px 15px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.9em;
    z-index: 10;
}

.video-info {
    padding: 15px;
}

.video-title {
    font-size: 1.1em;
    margin-bottom: 10px;
    color: #fff;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    color: #888;
    font-size: 0.9em;
}

.video-duration {
    color: #aaa;
}

.video-rating {
    color: #ff4444;
    font-weight: bold;
}

/* 响应式设计 */
@media (max-width: 768px) {
    h1 {
        font-size: 1.8em;
    }

    .category-btn {
        padding: 10px 20px;
        font-size: 1em;
    }

    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }

    .category-title {
        font-size: 1.5em;
    }
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: #1a1a1a;
    border-radius: 15px;
    padding: 40px 30px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    animation: slideUp 0.3s ease;
    border: 1px solid #333;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-title {
    color: #fff;
    font-size: 1.5em;
    margin-bottom: 10px;
    font-weight: bold;
}

.modal-subtitle {
    color: #888;
    font-size: 1em;
    margin-bottom: 30px;
}

.modal-method {
    background-color: #2a2a2a;
    border-radius: 10px;
    padding: 30px 20px;
    margin-bottom: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.modal-method:hover {
    background-color: #333;
    border-color: #ff4444;
    transform: scale(1.02);
}

.method-title {
    color: #ff4444;
    font-size: 1.2em;
    margin-bottom: 15px;
    font-weight: bold;
}

.method-text {
    color: #ffd700;
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.method-info {
    color: #aaa;
    font-size: 0.95em;
}

.modal-cancel {
    width: 100%;
    padding: 15px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.modal-cancel:hover {
    background-color: #444;
    transform: translateY(-2px);
}

@media (max-width: 480px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .category-nav {
        gap: 10px;
    }

    .category-btn {
        padding: 8px 15px;
        font-size: 0.9em;
    }

    .modal-content {
        padding: 30px 20px;
        width: 95%;
    }

    .modal-title {
        font-size: 1.3em;
    }

    .method-text {
        font-size: 1.1em;
    }
}
