/* Utility Styles - Animations, Responsive, Helpers */

    animation: cardSelect 0.3s ease;
}

/* 4️⃣ 卡片Hover增强 */
.moment-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.moment-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(232, 232, 232, 0.3);
}

.moment-card.selected:hover {
    transform: translateY(-5px) scale(1.05);
}

/* 5️⃣ 数字滚动动画 */
@keyframes countUp {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.preview-stat-value {
    display: inline-block;
}

.preview-stat-value.updating {
    animation: countUp 0.4s ease;
}

/* 6️⃣ 按钮点击涟漪效果 */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.action-btn-new, .bulk-action-btn {
    position: relative;
    overflow: hidden;
}

.action-btn-new::after, .bulk-action-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    pointer-events: none;
}

.action-btn-new:active::after, .bulk-action-btn:active::after {
    animation: ripple 0.6s ease-out;
}

/* 7️⃣ 视频预览窗口样式 */
.video-preview-window {
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid rgba(232, 232, 232, 0.2);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.5s ease;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.preview-title {
    font-size: 14px;
    font-weight: 600;
    color: #E8E8E8;
}

.preview-status {
    font-size: 12px;
    color: rgba(232, 232, 232, 0.6);
    padding: 4px 12px;
    background: rgba(232, 232, 232, 0.1);
    border-radius: 12px;
}

.preview-screen {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: rgba(20, 20, 20, 0.8);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    margin-bottom: 12px;
}

.preview-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: rgba(232, 232, 232, 0.4);
}

.preview-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.6;
}

.preview-text {
    font-size: 14px;
}

.preview-content {
    width: 100%;
    height: 100%;
    position: relative;
}

.preview-video-frame {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(232, 232, 232, 0.1), rgba(232, 232, 232, 0.05));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: fadeIn 0.3s ease;
}

.preview-event-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.preview-event-icon {
    font-size: 64px;
    animation: fadeInUp 0.5s ease;
}

.preview-event-type {
    font-size: 20px;
    font-weight: 600;
    color: #E8E8E8;
    animation: fadeInUp 0.5s ease 0.1s both;
}

.preview-player-info {
    margin-top: 16px;
    font-size: 16px;
    color: rgba(232, 232, 232, 0.8);
    animation: fadeInUp 0.5s ease 0.2s both;
}

.preview-time-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(232, 232, 232, 0.2);
    backdrop-filter: blur(10px);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #E8E8E8;
    animation: slideInFromLeft 0.5s ease 0.3s both;
}

.preview-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.preview-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(232, 232, 232, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.preview-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #E8E8E8, rgba(232, 232, 232, 0.6));
    width: 0%;
    transition: width 0.3s ease;
}

.preview-info-bar {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(232, 232, 232, 0.6);
}

/* 8️⃣ Timeline 增强 */
.match-timeline {
    position: relative;
}

.match-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(232, 232, 232, 0.1) 50%, 
        transparent 100%);
    animation: timelineScan 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes timelineScan {
    0%, 100% {
        transform: translateX(-100%);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%);
    }
}

/* 9️⃣ 加载状态动画 */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.action-btn-new.loading::before {
    content: '⏳';
    display: inline-block;
    margin-right: 8px;
    animation: spin 1s linear infinite;
}

/* 🔟 响应式调整 */
@media (max-width: 768px) {
    .preview-icon {
        font-size: 36px;
    }
    
    .preview-event-icon {
        font-size: 48px;
    }
    
    .preview-event-type {
        font-size: 16px;
    }
}

/* 1️⃣1️⃣ 智能提示动画 */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.smart-tip {
    background: rgba(232, 232, 232, 0.1);
    border: 1px solid rgba(232, 232, 232, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 16px;
    color: #E8E8E8;
    font-size: 14px;
    animation: slideDown 0.4s ease;
}

.smart-tip::before {
    content: '💡 ';
}
/* ========================================
   🎯 Multi-Track Timeline Styles
   ======================================== */

/* Timeline Container */
.timeline-multi-track {
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid rgba(232, 232, 232, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
}

/* Timeline Header */
.timeline-header-multi {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(232, 232, 232, 0.1);
}

.timeline-header-multi .timeline-title {
    font-size: 16px;
    font-weight: 600;
    color: #E8E8E8;
}

/* Track Toggle Buttons */
.timeline-track-toggles {
    display: flex;
    gap: 8px;
}

.track-toggle-btn {
    padding: 6px 12px;
    background: rgba(232, 232, 232, 0.1);
    border: 1px solid rgba(232, 232, 232, 0.2);
    border-radius: 6px;
    color: rgba(232, 232, 232, 0.7);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.track-toggle-btn:hover {
    background: rgba(232, 232, 232, 0.15);
    border-color: rgba(232, 232, 232, 0.3);
    color: #E8E8E8;
}

.track-toggle-btn.active {
    background: rgba(232, 232, 232, 0.2);
    border-color: #E8E8E8;
    color: #E8E8E8;
    box-shadow: 0 0 8px rgba(232, 232, 232, 0.3);
}

.track-toggle-btn span:first-child {
    font-size: 14px;
}

/* Timeline Track */
.timeline-track {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding: 12px 0;
    animation: fadeIn 0.3s ease;
}

.timeline-track:not(:last-of-type) {
    border-bottom: 1px solid rgba(232, 232, 232, 0.05);
}

/* Track Label */
.track-label {
    min-width: 140px;
    font-size: 13px;
    color: rgba(232, 232, 232, 0.8);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.track-label span:first-child {
    font-size: 16px;
}

/* Track Bar */
.track-bar {
    flex: 1;
    height: 32px;
    background: rgba(232, 232, 232, 0.08);
    border-radius: 16px;
    position: relative;
    overflow: visible;
}

/* Halftime Divider */
.track-bar::before {
    content: '';
    position: absolute;
    left: 50%;
    top: -4px;
    bottom: -4px;
    width: 2px;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(232, 232, 232, 0.3),
        transparent
    );
    z-index: 1;
    pointer-events: none;
}

/* Timeline Moment Marker */
.timeline-moment {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

.moment-marker {
    display: block;
    width: 28px;
    height: 28px;
    font-size: 18px;
    text-align: center;
    line-height: 28px;
    background: rgba(232, 232, 232, 0.15);
    border-radius: 50%;
    border: 2px solid rgba(232, 232, 232, 0.5);
    transition: all 0.3s ease;
    position: relative;
}

/* Hover Effects */
.timeline-moment:hover .moment-marker {
    transform: scale(1.4);
    box-shadow: 0 0 20px rgba(232, 232, 232, 0.6);
    border-width: 3px;
}

/* Selected State */
.timeline-moment.selected .moment-marker {
    background: rgba(232, 232, 232, 0.9);
    border-color: #E8E8E8;
    box-shadow: 0 0 16px rgba(232, 232, 232, 0.8);
    border-width: 3px;
}

/* Event Type Colors */
.moment-marker[data-type="goal"] {
    border-color: #FFD700;
    color: #FFD700;
}

.moment-marker[data-type="goal"].selected {
    background: rgba(255, 215, 0, 0.3);
    border-color: #FFD700;
}

.moment-marker[data-type="assist"] {
    border-color: #00BFFF;
    color: #00BFFF;
}

.moment-marker[data-type="assist"].selected {
    background: rgba(0, 191, 255, 0.3);
    border-color: #00BFFF;
}

.moment-marker[data-type="save"] {
    border-color: #32CD32;
    color: #32CD32;
}

.moment-marker[data-type="save"].selected {
    background: rgba(50, 205, 50, 0.3);
    border-color: #32CD32;
}

.moment-marker[data-type="red-card"] {
    border-color: #FF4444;
    color: #FF4444;
}

.moment-marker[data-type="red-card"].selected {
    background: rgba(255, 68, 68, 0.3);
    border-color: #FF4444;
}

.moment-marker[data-type="near-miss"] {
    border-color: #FFA500;
    color: #FFA500;
}

.moment-marker[data-type="sprint"] {
    border-color: #9370DB;
    color: #9370DB;
}

.moment-marker[data-type="tactical-play"] {
    border-color: #4169E1;
    color: #4169E1;
}

.moment-marker[data-type="skill-move"] {
    border-color: #FF69B4;
    color: #FF69B4;
}

.moment-marker[data-type="celebration"] {
    border-color: #FFD700;
    color: #FFD700;
}

/* Time Ticks */
.timeline-ticks {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-top: 8px;
    padding: 0 70px 0 140px;
}

.timeline-ticks span {
    font-size: 11px;
    color: rgba(232, 232, 232, 0.5);
    position: absolute;
    transform: translateX(-50%);
}

.timeline-ticks .halftime-tick {
    color: rgba(232, 232, 232, 0.8);
    font-weight: 600;
}

/* Tooltip Enhancement */
.timeline-moment::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: rgba(20, 20, 20, 0.95);
    color: #E8E8E8;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 100;
    border: 1px solid rgba(232, 232, 232, 0.2);
}

.timeline-moment:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-12px);
}

/* Responsive */
@media (max-width: 768px) {
    .timeline-header-multi {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .timeline-track-toggles {
        width: 100%;
        justify-content: space-between;
    }
    
    .track-toggle-btn {
        flex: 1;
        justify-content: center;
    }
    
    .track-label {
        min-width: 100px;
        font-size: 12px;
    }
    
    .timeline-ticks {
        padding: 0 20px 0 100px;
    }
    
    .moment-marker {
        width: 24px;
        height: 24px;
        font-size: 16px;
        line-height: 24px;
    }
}

/* Animation for track appearance */
@keyframes trackSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-track[data-track="player"],
.timeline-track[data-track="type"] {
    animation: trackSlideIn 0.4s ease;
}

/* ========================================
   🎬 Smart Storyboard - Complete Styles
   ======================================== */

/* Main Storyboard Layout */
.storyboard-main-layout {
    display: grid;
    grid-template-columns: 60% 40%;
    gap: 24px;
    margin-bottom: 32px;
}

/* ========================================
   📺 Main Video Player (Left 60%)
   ======================================== */

.main-video-player {
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid rgba(232, 232, 232, 0.2);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(232, 232, 232, 0.05);
    border-bottom: 1px solid rgba(232, 232, 232, 0.1);
}

.player-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.player-icon {
    font-size: 24px;
}

.player-title {
    font-size: 18px;
    font-weight: 600;
    color: #E8E8E8;
}

.player-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: rgba(232, 232, 232, 0.7);
}

.player-duration {
    padding: 4px 12px;
    background: rgba(232, 232, 232, 0.1);
    border-radius: 12px;
}

/* Player Screen */
.player-screen {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
}

.player-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(232, 232, 232, 0.05), rgba(232, 232, 232, 0.02));
    position: relative;
}

.play-button-large {
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 32px;
}

.play-button-large:hover {
    transform: scale(1.1);
}

.play-button-large:hover circle {
    fill: rgba(232, 232, 232, 0.25);
}

.player-overlay-info {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
}

.current-event-display {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 32px;
    background: rgba(20, 20, 20, 0.9);
    border: 1px solid rgba(232, 232, 232, 0.3);
    border-radius: 16px;
    backdrop-filter: blur(20px);
}

.event-icon-large {
    font-size: 48px;
}

.event-details-large {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.event-name-large {
    font-size: 20px;
    font-weight: 600;
    color: #E8E8E8;
}

.event-time-large {
    font-size: 16px;
    color: rgba(232, 232, 232, 0.7);
}

.event-confidence {
    font-size: 14px;
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    animation: confidenceGlow 2s ease-in-out infinite;
}

@keyframes confidenceGlow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    }
    50% {
        text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    }
}

/* Active Player */
.player-active {
    width: 100%;
    height: 100%;
    position: relative;
}

.video-frame {
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-content {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(232, 232, 232, 0.1), rgba(232, 232, 232, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.video-event-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.video-event-icon {
    font-size: 80px;
    animation: eventPulse 1.5s ease-in-out infinite;
}

@keyframes eventPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.video-event-label {
    font-size: 24px;
    font-weight: 600;
    color: #E8E8E8;
    padding: 8px 24px;
    background: rgba(20, 20, 20, 0.8);
    border-radius: 24px;
    border: 2px solid rgba(232, 232, 232, 0.3);
}

/* Player Controls */
.player-controls {
    padding: 16px 20px;
    background: rgba(20, 20, 20, 0.9);
}

.progress-bar-main {
    width: 100%;
    height: 8px;
    background: rgba(232, 232, 232, 0.2);
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    margin-bottom: 16px;
}

.progress-fill-main {
    height: 100%;
    background: linear-gradient(90deg, #E8E8E8, rgba(232, 232, 232, 0.7));
    border-radius: 4px;
    transition: width 0.1s linear;
}

.progress-markers {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.progress-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #E8E8E8;
    background: rgba(232, 232, 232, 0.3);
    transition: all 0.3s ease;
}

.progress-marker:hover {
    transform: translate(-50%, -50%) scale(1.3);
}

.progress-handle {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: #E8E8E8;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(232, 232, 232, 0.5);
    cursor: grab;
    transition: left 0.1s linear;
}

.progress-handle:active {
    cursor: grabbing;
    transform: translate(-50%, -50%) scale(1.2);
}

.controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.controls-left,
.controls-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.control-btn {
    width: 40px;
    height: 40px;
    background: rgba(232, 232, 232, 0.1);
    border: 1px solid rgba(232, 232, 232, 0.2);
    border-radius: 8px;
    color: #E8E8E8;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    background: rgba(232, 232, 232, 0.2);
    border-color: #E8E8E8;
    transform: scale(1.05);
}

.time-display {
    font-size: 14px;
    color: rgba(232, 232, 232, 0.8);
    font-variant-numeric: tabular-nums;
}

/* ========================================
   🎯 Smart Storyboard (Right 40%)
   ======================================== */

.smart-storyboard {
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid rgba(232, 232, 232, 0.2);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    max-height: 800px;
}

.storyboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(232, 232, 232, 0.05);
    border-bottom: 1px solid rgba(232, 232, 232, 0.1);
}

.storyboard-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.storyboard-icon {
    font-size: 24px;
}

.storyboard-title {
    font-size: 16px;
    font-weight: 600;
    color: #E8E8E8;
}

.storyboard-count {
    font-size: 12px;
    color: rgba(232, 232, 232, 0.7);
    padding: 3px 10px;
    background: rgba(232, 232, 232, 0.1);
    border-radius: 10px;
}

/* Active Filters Bar */
.active-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    background: rgba(232, 232, 232, 0.08);
    border-bottom: 1px solid rgba(232, 232, 232, 0.2);
}

.filters-label {
    font-size: 11px;
    font-weight: 600;
    color: #E8E8E8;
    white-space: nowrap;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px 4px 10px;
    background: rgba(232, 232, 232, 0.15);
    border: 1px solid rgba(232, 232, 232, 0.3);
    border-radius: 12px;
    font-size: 11px;
    color: #E8E8E8;
    font-weight: 600;
}

.filter-remove {
    background: none;
    border: none;
    color: #E8E8E8;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.filter-remove:hover {
    background: rgba(232, 232, 232, 0.2);
}

.filter-clear {
    font-size: 11px;
    font-weight: 600;
    color: rgba(232, 232, 232, 0.7);
    background: none;
    border: 1px solid rgba(232, 232, 232, 0.2);
    padding: 4px 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.filter-clear:hover {
    background: rgba(232, 232, 232, 0.1);
    color: #E8E8E8;
    border-color: rgba(232, 232, 232, 0.4);
}

/* Storyboard Scroll Area */
.storyboard-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 0; /* 移除gap，由各行的margin-bottom控制 */
}

.storyboard-scroll::-webkit-scrollbar {
    width: 8px;
}

.storyboard-scroll::-webkit-scrollbar-track {
    background: rgba(232, 232, 232, 0.05);
}

.storyboard-scroll::-webkit-scrollbar-thumb {
    background: rgba(232, 232, 232, 0.2);
    border-radius: 4px;
}

.storyboard-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(232, 232, 232, 0.3);
}

/* ========================================
   🚫 OLD Storyboard Card Style - DISABLED
   ======================================== */
/* 旧的单卡片样式 - 已被扑克牌分组布局取代 */
.storyboard-card {
    display: none !important; /* 隐藏旧样式 */
}

/* OLD STYLES - KEEP FOR REFERENCE BUT DISABLED */
/*
.storyboard-card-old {
    display: flex;
    gap: 16px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(232, 232, 232, 0.08) 0%, rgba(232, 232, 232, 0.03) 100%);
    border: 2px solid rgba(232, 232, 232, 0.15);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    animation: cardFadeIn 0.5s ease forwards;
    position: relative;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        0 1px 3px rgba(232, 232, 232, 0.1),
        inset 0 1px 0 rgba(232, 232, 232, 0.1);
    transform-origin: center;
    backdrop-filter: blur(10px);
}

/* 扑克牌堆叠偏移效果 - 每张牌微微旋转和偏移 */
.storyboard-card:nth-child(odd) {
    transform: rotate(-0.5deg) translateX(-2px);
}

.storyboard-card:nth-child(even) {
    transform: rotate(0.5deg) translateX(2px);
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95) rotate(0deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Hover效果 - 扑克牌抽起 */
.storyboard-card:hover {
    background: linear-gradient(135deg, rgba(232, 232, 232, 0.15) 0%, rgba(232, 232, 232, 0.08) 100%);
    border-color: rgba(232, 232, 232, 0.5);
    transform: translateY(-8px) translateX(0) rotate(0deg) scale(1.02);
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.4),
        0 4px 12px rgba(232, 232, 232, 0.2),
        inset 0 1px 0 rgba(232, 232, 232, 0.2);
    z-index: 10;
}

/* Active状态 - 被选中的牌 */
.storyboard-card.active {
    background: linear-gradient(135deg, rgba(232, 232, 232, 0.2) 0%, rgba(232, 232, 232, 0.1) 100%);
    border-color: #E8E8E8;
    transform: translateY(-4px) translateX(0) rotate(0deg) scale(1.01);
    box-shadow: 
        0 8px 24px rgba(232, 232, 232, 0.4),
        0 0 32px rgba(232, 232, 232, 0.2),
        inset 0 1px 0 rgba(232, 232, 232, 0.3);
    z-index: 5;
}

.storyboard-card.dimmed {
    opacity: 0.3;
    pointer-events: none;
    filter: grayscale(0.5);
}

/* ========================================
   🃏 扑克牌网格布局 - Poker Card Grid Style
   ======================================== */

/* 🚫 OLD: 分组布局样式已废弃（不再使用分组标题和框） */
/* .storyboard-group, .group-header, .group-icon, .group-title, .group-count, .poker-cards-row - DEPRECATED */

/* 卡片行容器 - 平铺布局（卡片少时） */
.poker-cards-row-flat {
    display: flex;
    flex-wrap: nowrap; /* 禁止换行，保持一行 */
    gap: 0; /* 移除间距，改用负margin控制 */
    align-items: center;
    padding: 10px 0;
    min-height: 140px;
    margin-bottom: 8px;
    overflow: visible; /* 不使用滚动条 */
}

/* 卡片行容器 - 堆叠布局（卡片多时） */
.poker-cards-row-stacked {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    padding: 10px 0;
    overflow: visible; /* 无滚动条，靠紧密堆叠 */
    position: relative;
    min-height: 150px;
    margin-bottom: 8px;
}

/* 行之间添加微妙的分隔线 */
.poker-cards-row-flat:not(:last-child),
.poker-cards-row-stacked:not(:last-child) {
    border-bottom: 1px solid rgba(232, 232, 232, 0.08);
}

/* 单个扑克牌 */
.poker-card {
    position: relative;
    width: 110px;
    height: 130px;
    flex-shrink: 0;
    cursor: pointer;
    /* 🎨 优化：更快的过渡，更平滑的回弹 */
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: bottom center;
    /* 🚀 GPU加速优化 */
    will-change: transform, opacity;
    /* 🎨 确保基础状态明确定义 */
    transform: translateY(0) scale(1) translateZ(0);
    backface-visibility: hidden;
}

/* ========================================
   🎬 Filter Animation Classes
   ======================================== */

/* Fade Out Animation - When card is hidden by filter */
.poker-card.filter-fade-out {
    opacity: 0;
    transform: translateY(10px) scale(0.95) translateZ(0);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

/* Fade In Animation - When card is shown by filter */
.poker-card.filter-fade-in {
    opacity: 1;
    transform: translateY(0) scale(1) translateZ(0);
    transition: opacity 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Initial hidden state (before fade in) */
.poker-card:not(.filter-fade-in):not(.filter-fade-out) {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Enhance border glow on fade in */
.poker-card.filter-fade-in .poker-card-inner {
    border-color: rgba(232, 232, 232, 0.4);
    box-shadow: 
        0 6px 16px rgba(0, 0, 0, 0.4),
        0 2px 4px rgba(232, 232, 232, 0.2),
        0 0 12px rgba(232, 232, 232, 0.15),
        inset 0 1px 0 rgba(232, 232, 232, 0.15);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ========================================
   🎨 Timeline Connection Animation
   ======================================== */

/* SVG Connection Layer */
.timeline-connection-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    overflow: visible;
    /* 🚀 GPU加速优化 */
    will-change: contents;
    transform: translateZ(0);
}

/* Connection Path */
.connection-path {
    fill: none;
    stroke: url(#connectionGradient);
    stroke-width: 2;
    stroke-linecap: round;
    opacity: 0;
    filter: url(#connectionGlow);
    transition: opacity 0.3s ease;
}

/* Animated Connection Path */
.connection-path.active {
    opacity: 1;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawConnection 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes drawConnection {
    to {
        stroke-dashoffset: 0;
    }
}

/* Timeline Highlight Point */
.timeline-highlight-point {
    fill: #E8E8E8;
    opacity: 0;
    transition: opacity 0.3s ease, r 0.3s ease;
}

.timeline-highlight-point.active {
    opacity: 1;
    animation: pulsePoint 1.5s ease-in-out infinite;
}

@keyframes pulsePoint {
    0%, 100% {
        r: 4;
        opacity: 1;
    }
    50% {
        r: 6;
        opacity: 0.6;
    }
}

/* Card Active State (when showing connection) */
.poker-card.timeline-connected .poker-card-inner {
    border-color: rgba(232, 232, 232, 0.8);
    box-shadow: 
        0 6px 16px rgba(0, 0, 0, 0.4),
        0 2px 8px rgba(232, 232, 232, 0.5),
        0 0 20px rgba(232, 232, 232, 0.3),
        inset 0 1px 0 rgba(232, 232, 232, 0.2);
    transform: translateY(-8px) scale(1.02);
}

/* Timeline Segment Highlight */
.timeline-segment.connected {
    background: rgba(232, 232, 232, 0.15);
    border-color: rgba(232, 232, 232, 0.4);
    transition: all 0.3s ease;
}

/* Score Marker Highlight (when card is connected) */
.score-marker.connected {
    transform: translateX(-50%) scale(1.3);
    z-index: 100;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.score-marker.connected .score-dot {
    box-shadow: 0 0 12px currentColor;
    transform: translateY(-50%) scale(1.2);
}

/* 堆叠行中的卡片：使用扑克牌堆叠效果 */
.poker-cards-row-stacked .poker-card {
    z-index: var(--card-index); /* 🚀 修复：右边的卡在上面（按时间顺序，后发生的事件z-index更高） */
}

.poker-cards-row-stacked .poker-card:not(:first-child) {
    margin-left: -80px; /* 更紧密堆叠，避免滚动条 */
}

/* 平铺行中的卡片：轻微堆叠效果 */
.poker-cards-row-flat .poker-card {
    position: relative;
    flex-shrink: 0;
    z-index: var(--card-index); /* 🚀 修复：右边的卡在上面（按时间顺序，后发生的事件z-index更高） */
}

.poker-cards-row-flat .poker-card:not(:first-child) {
    margin-left: -25px; /* 轻微重叠，比堆叠行(-65px)小得多 */
}

/* 防止平铺卡片在 hover 时影响布局 */
.poker-cards-row-flat .poker-card:hover {
    transform: translateY(-5px) scale(1.08) translateZ(0); /* 🎨 优化：只上移5px */
    z-index: 200 !important; /* Hover时提到最前 */
}

.poker-card-inner {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    /* 🎨 不透明背景：被挡住的卡片完全隐藏 */
    background: linear-gradient(135deg, rgba(40, 40, 40, 1) 0%, rgba(30, 30, 30, 1) 100%);
    border: 2px solid rgba(232, 232, 232, 0.2);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 
        0 6px 16px rgba(0, 0, 0, 0.4),
        0 2px 4px rgba(232, 232, 232, 0.1),
        inset 0 1px 0 rgba(232, 232, 232, 0.15);
    /* backdrop-filter: blur(8px); */ /* 移除毛玻璃效果，因为已经不透明 */
    transition: all 0.3s ease;
}

/* Hover 效果 - 扑克牌突出（🎨 优化：减少位移，增强视觉效果） */
.poker-card:hover:not(.filter-fade-out) {
    transform: translateY(-5px) scale(1.08) translateZ(0); /* 只上移5px，避免布局混乱 */
    z-index: 200 !important;
    /* 🎨 hover时使用更快的过渡 */
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Prevent hover effect during fade animation */
.poker-card.filter-fade-out:hover,
.poker-card.filter-fade-in:hover {
    z-index: 200 !important;
}

.poker-card:hover .poker-card-inner {
    background: linear-gradient(135deg, rgba(232, 232, 232, 0.3) 0%, rgba(232, 232, 232, 0.15) 100%);
    border-color: rgba(232, 232, 232, 0.8); /* 增强边框 */
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.6),
        0 0 32px rgba(232, 232, 232, 0.5), /* 增强光晕 */
        0 0 8px rgba(232, 232, 232, 0.8),
        inset 0 1px 0 rgba(232, 232, 232, 0.3);
    /* 🎨 确保过渡平滑 */
    transition: all 0.2s ease-out;
}

/* 卡片缩略图 */
.poker-card-thumbnail {
    position: relative;
    width: 100%;
    height: 75px;
    /* 🎨 不透明背景 */
    background: linear-gradient(135deg, rgba(10, 10, 10, 1) 0%, rgba(20, 20, 20, 1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid rgba(232, 232, 232, 0.1);
}

.thumbnail-gif-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.poker-card-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    background: rgba(232, 232, 232, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #E8E8E8;
    opacity: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.poker-card:hover .poker-card-play {
    opacity: 1;
    background: rgba(232, 232, 232, 0.95);
    color: #0A0A0A;
    transform: translate(-50%, -50%) scale(1.15);
}

/* 卡片信息 */
.poker-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 8px;
    gap: 4px;
}

.poker-card-type {
    font-size: 12px;
    font-weight: 700;
    color: #E8E8E8;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    letter-spacing: 0.3px;
}

.poker-card-time {
    font-size: 13px;
    font-weight: 700;
    color: #E8E8E8;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    white-space: nowrap;
}

/* 补时标记 - 特殊样式 */
.poker-card-time.injury-time {
    color: #FF6B6B;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.2), rgba(239, 68, 68, 0.15));
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(255, 107, 107, 0.3);
    font-weight: 800;
    animation: pulse-injury 2s ease-in-out infinite;
}

@keyframes pulse-injury {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.4);
    }
    50% {
        box-shadow: 0 0 8px 2px rgba(255, 107, 107, 0.6);
    }
}

/* 旧的样式保留（已不使用） */
.poker-card-player {
    display: none;
}

.poker-card-confidence {
    display: none;
}

/* Card Thumbnail - 扑克牌封面样式 */
.card-thumbnail {
    position: relative;
    width: 140px;
    height: 78px;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.8) 0%, rgba(20, 20, 20, 0.6) 100%);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(232, 232, 232, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.storyboard-card:hover .card-thumbnail {
    border-color: rgba(232, 232, 232, 0.4);
    box-shadow: 0 4px 16px rgba(232, 232, 232, 0.2);
    transform: scale(1.05);
}

.card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(232, 232, 232, 0.1), rgba(232, 232, 232, 0.05));
    font-size: 32px;
}

.card-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    background: rgba(232, 232, 232, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.storyboard-card:hover .card-play-overlay {
    opacity: 1;
}

/* Card Info - 扑克牌信息区域 */
.card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-icon {
    font-size: 22px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.storyboard-card:hover .card-icon {
    transform: scale(1.15);
}

.card-type {
    font-size: 15px;
    font-weight: 700;
    color: #E8E8E8;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    letter-spacing: 0.3px;
    transition: color 0.3s ease;
}

.storyboard-card:hover .card-type {
    color: #E8E8E8;
}

.card-confidence {
    margin-left: auto;
    font-size: 11px;
    font-weight: 700;
    color: #0A0A0A;
    padding: 4px 10px;
    background: linear-gradient(135deg, #E8E8E8, #D1D1D1);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(232, 232, 232, 0.4);
    animation: confidenceGlow 2s ease-in-out infinite;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.storyboard-card:hover .card-confidence {
    box-shadow: 0 4px 12px rgba(232, 232, 232, 0.6);
    transform: scale(1.05);
}

.card-details {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
    color: rgba(232, 232, 232, 0.8);
}

.card-time {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: rgba(232, 232, 232, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.card-player {
    padding: 4px 10px;
    background: rgba(232, 232, 232, 0.12);
    border: 1px solid rgba(232, 232, 232, 0.2);
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.storyboard-card:hover .card-player {
    background: rgba(232, 232, 232, 0.18);
    border-color: rgba(232, 232, 232, 0.3);
    transform: translateY(-1px);
}

/* ========================================
   👤 Player Focus Section
   ======================================== */

.controls-bottom-section {
    margin-bottom: 24px;
}

.player-focus-section,
.style-magic-section {
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(232, 232, 232, 0.2);
    border-radius: 16px;
    padding: 20px;
}

/* Style Magic - Compact Version */
.style-magic-compact {
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(232, 232, 232, 0.2);
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 24px;
    overflow: visible;
}

.style-buttons-compact {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    overflow: visible;
}

.style-btn-compact {
    position: relative;
    background: rgba(232, 232, 232, 0.08);
    border: 1px solid rgba(232, 232, 232, 0.2);
    border-radius: 8px;
    padding: 8px 16px;
    color: rgba(232, 232, 232, 0.7);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: visible;
}

.style-btn-compact:hover {
    background: rgba(232, 232, 232, 0.15);
    border-color: rgba(232, 232, 232, 0.4);
    color: #E8E8E8;
    transform: translateY(-1px);
}

.style-btn-compact.active {
    background: rgba(232, 232, 232, 0.15);
    border-color: rgba(232, 232, 232, 0.5);
    color: #E8E8E8;
}

.style-name-compact {
    display: block;
}

/* Custom tooltip for Style Magic buttons */
.style-btn-compact::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: rgba(0, 0, 0, 0.95);
    color: #FFFFFF;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
    white-space: normal;
    width: 280px;
    text-align: left;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.style-btn-compact::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.95);
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    z-index: 999;
}

.style-btn-compact:hover::before,
.style-btn-compact:hover::after {
    opacity: 1;
}

/* Player Focus integrated into video player */
.player-focus-integrated {
    padding: 16px 20px;
    border-top: 1px solid rgba(232, 232, 232, 0.1);
    background: rgba(10, 10, 10, 0.4);
}

.section-label-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.section-label-compact .label-text {
    font-size: 13px;
    font-weight: 600;
    color: #E8E8E8;
}

.section-label-compact .label-subtitle {
    font-size: 11px;
    color: rgba(232, 232, 232, 0.5);
}

/* More compact avatars when inside video player */
.player-focus-integrated .player-avatars {
    gap: 12px;
}

.player-focus-integrated .player-avatar {
    cursor: pointer;
    transition: transform 0.2s;
}

.player-focus-integrated .player-avatar:hover {
    transform: translateY(-2px);
}

.player-focus-integrated .avatar-circle {
    width: 48px;
    height: 48px;
    font-size: 18px;
}

.player-focus-integrated .avatar-name {
    font-size: 11px;
}

.player-focus-integrated .avatar-badge {
    width: 18px;
    height: 18px;
    font-size: 10px;
}

/* Keep old styles for potential other uses */
.player-focus-section {
    margin-bottom: 24px;
}

.section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.label-icon {
    font-size: 20px;
}

.label-text {
    font-size: 16px;
    font-weight: 600;
    color: #E8E8E8;
}

.label-subtitle {
    font-size: 12px;
    color: rgba(232, 232, 232, 0.5);
    margin-left: auto;
}

/* Player Avatars */
.player-avatars {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.player-avatar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.player-avatar:hover {
    transform: translateY(-4px);
}

.avatar-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(232, 232, 232, 0.1);
    border: 2px solid rgba(232, 232, 232, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    transition: all 0.3s ease;
}

.player-avatar:hover .avatar-circle {
    border-color: rgba(232, 232, 232, 0.5);
    background: rgba(232, 232, 232, 0.15);
}

.player-avatar.active .avatar-circle {
    border-color: #E8E8E8;
    background: rgba(232, 232, 232, 0.2);
    box-shadow: 0 0 20px rgba(232, 232, 232, 0.3);
}

.avatar-name {
    font-size: 13px;
    color: rgba(232, 232, 232, 0.8);
    font-weight: 500;
}

.avatar-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    background: linear-gradient(135deg, #E8E8E8, #D1D1D1);
    color: #0A0A0A;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(232, 232, 232, 0.4);
    border: 2px solid #0A0A0A;
    cursor: help;
    transition: all 0.2s ease;
}

.avatar-badge:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(232, 232, 232, 0.6);
}

/* ========================================
   ✨ Style Magic Section
   ======================================== */

.style-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.style-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(232, 232, 232, 0.05);
    border: 1px solid rgba(232, 232, 232, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.style-btn:hover {
    background: rgba(232, 232, 232, 0.1);
    border-color: rgba(232, 232, 232, 0.3);
    transform: translateY(-2px);
}

.style-btn.active {
    background: rgba(232, 232, 232, 0.15);
    border-color: #E8E8E8;
    box-shadow: 0 0 20px rgba(232, 232, 232, 0.2);
}

.style-icon-wrapper {
    width: 40px;
    height: 40px;
    background: rgba(232, 232, 232, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.style-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.style-name {
    font-size: 14px;
    font-weight: 600;
    color: #E8E8E8;
}

.style-desc {
    font-size: 11px;
    color: rgba(232, 232, 232, 0.6);
}

/* ========================================
   📤 Output Generation Section
   ======================================== */

.output-generation-section {
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(232, 232, 232, 0.2);
    border-radius: 16px;
    padding: 18px;
}

.output-settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.output-format-group {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex: 1;
    max-width: 100%;
}

.output-label {
    font-size: 12px;
    font-weight: 600;
    color: #E8E8E8;
    white-space: nowrap;
    padding-top: 8px;
}

.ratio-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 100%;
    align-items: center;
}

/* Platform grouping - add visual separation after certain platforms */
.ratio-btn[data-platform="original"],
.ratio-btn[data-platform="youtube-shorts"],
.ratio-btn[data-platform="tiktok"],
.ratio-btn[data-platform="instagram-portrait"],
.ratio-btn[data-platform="facebook"],
.ratio-btn[data-platform="twitter"] {
    margin-right: 12px;
    position: relative;
}

/* Add a subtle divider after platform groups - using a wrapper approach */
.ratio-btn[data-platform="original"],
.ratio-btn[data-platform="youtube-shorts"],
.ratio-btn[data-platform="tiktok"],
.ratio-btn[data-platform="instagram-portrait"],
.ratio-btn[data-platform="facebook"],
.ratio-btn[data-platform="twitter"] {
    box-shadow: 9px 0 0 -8px rgba(232, 232, 232, 0.15);
}

/* Same platform buttons get a subtle background tint */
.ratio-btn[data-platform="original"] {
    background: rgba(232, 232, 232, 0.08);
}
.ratio-btn[data-platform="original"]:hover {
    background: rgba(232, 232, 232, 0.12);
}

.ratio-btn[data-platform*="youtube"] {
    background: rgba(255, 0, 0, 0.03);
}
.ratio-btn[data-platform*="youtube"]:hover {
    background: rgba(255, 0, 0, 0.08);
}

.ratio-btn[data-platform="tiktok"] {
    background: rgba(255, 107, 157, 0.03);
}
.ratio-btn[data-platform="tiktok"]:hover {
    background: rgba(255, 107, 157, 0.08);
}

.ratio-btn[data-platform*="instagram"] {
    background: rgba(228, 64, 95, 0.03);
}
.ratio-btn[data-platform*="instagram"]:hover {
    background: rgba(228, 64, 95, 0.08);
}

.ratio-btn[data-platform="facebook"] {
    background: rgba(24, 119, 242, 0.03);
}
.ratio-btn[data-platform="facebook"]:hover {
    background: rgba(24, 119, 242, 0.08);
}

.ratio-btn[data-platform="twitter"] {
    background: rgba(232, 232, 232, 0.03);
}
.ratio-btn[data-platform="twitter"]:hover {
    background: rgba(232, 232, 232, 0.08);
}

.ratio-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 10px;
    min-width: 58px;
    background: rgba(232, 232, 232, 0.05);
    border: 1px solid rgba(232, 232, 232, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

/* Custom tooltip on hover */
.ratio-btn::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: rgba(0, 0, 0, 0.95);
    color: #FFFFFF;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    z-index: 1000;
    border: 1px solid rgba(232, 232, 232, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.ratio-btn:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(-12px);
}

/* Tooltip arrow */
.ratio-btn::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.95);
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    z-index: 999;
}

.ratio-btn:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-8px);
}

.ratio-btn:hover {
    background: rgba(232, 232, 232, 0.1);
    border-color: rgba(232, 232, 232, 0.3);
}

.ratio-btn.active {
    background: rgba(232, 232, 232, 0.15) !important;
    border-color: #E8E8E8;
    box-shadow: 0 0 15px rgba(232, 232, 232, 0.2);
}

/* Override platform colors for active state */
.ratio-btn.active[data-platform="original"],
.ratio-btn.active[data-platform*="youtube"],
.ratio-btn.active[data-platform="tiktok"],
.ratio-btn.active[data-platform*="instagram"],
.ratio-btn.active[data-platform="facebook"],
.ratio-btn.active[data-platform="twitter"],
.ratio-btn.active[data-platform="mobile"],
.ratio-btn.active[data-platform="ultrawide"] {
    background: rgba(232, 232, 232, 0.15) !important;
    border-color: #E8E8E8;
    box-shadow: 0 0 15px rgba(232, 232, 232, 0.3);
}

.platform-logo {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.ratio-btn:hover .platform-logo {
    opacity: 0.9;
    transform: scale(1.05);
}

.ratio-btn.active .platform-logo {
    opacity: 1;
    filter: drop-shadow(0 0 4px rgba(232, 232, 232, 0.3));
}

/* TikTok logo uses currentColor, so we can control it */
.ratio-btn .platform-logo path[fill="currentColor"] {
    fill: rgba(232, 232, 232, 0.8);
}

.ratio-btn:hover .platform-logo path[fill="currentColor"] {
    fill: rgba(232, 232, 232, 0.95);
}

.ratio-btn.active .platform-logo path[fill="currentColor"] {
    fill: #FFFFFF;
}

.ratio-text {
    font-size: 10px;
    font-weight: 600;
    color: #E8E8E8;
    text-align: center;
    white-space: nowrap;
}

/* Output Stats */
.output-stats {
    display: flex;
    gap: 24px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-label {
    font-size: 13px;
    color: rgba(232, 232, 232, 0.6);
}

.stat-value {
    font-size: 16px;
    font-weight: 700;
    color: #E8E8E8;
    font-variant-numeric: tabular-nums;
}

/* Generate Button */
/* Old large button styles - replaced with generate-btn-compact */
/*
.generate-btn-large {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #E8E8E8, rgba(232, 232, 232, 0.9));
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.generate-btn-large::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.generate-btn-large:hover::before {
    width: 400px;
    height: 400px;
}

.generate-btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(232, 232, 232, 0.4);
}

.generate-btn-large:active {
    transform: translateY(0);
}
*/

/* Button state styles removed - no longer using generating/complete states */
/*
.btn-icon-large {
    font-size: 32px;
    z-index: 1;
}

.btn-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 1;
}

.btn-text-large {
    font-size: 16px;
    font-weight: 700;
    color: #0A0A0A;
}

.btn-subtitle {
    font-size: 11px;
    color: rgba(10, 10, 10, 0.7);
}
*/

.btn-arrow {
    font-size: 20px;
    color: #0A0A0A;
    z-index: 1;
    transition: transform 0.3s ease;
}

.generate-btn-large:hover .btn-arrow {
    transform: translateX(4px);
}

/* Compact Generate Button */
.generate-btn-compact {
    padding: 10px 20px;
    background: linear-gradient(135deg, #E8E8E8, #D1D1D1);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(232, 232, 232, 0.3);
    white-space: nowrap;
}

.generate-btn-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(232, 232, 232, 0.5);
    background: linear-gradient(135deg, #F5F5F5, #E8E8E8);
}

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

.generate-btn-compact .btn-text {
    font-size: 14px;
    font-weight: 700;
    color: #0A0A0A;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ========================================
   🎨 Style-Specific Visual Effects
   ======================================== */

/* Dramatic Style */
.player-screen.style-dramatic .video-content {
    filter: contrast(1.3) saturate(1.5);
    animation: dramaticPulse 0.5s ease-in-out;
}

@keyframes dramaticPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Technical Style */
.player-screen.style-technical .video-content {
    filter: grayscale(0.3) contrast(1.1);
}

.player-screen.style-technical .video-event-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px dashed rgba(232, 232, 232, 0.3);
    pointer-events: none;
}

/* Cinematic Style */
.player-screen.style-cinematic .video-content {
    filter: sepia(0.2) contrast(1.2);
}

.player-screen.style-cinematic::before,
.player-screen.style-cinematic::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 60px;
    background: #000;
    z-index: 1;
    pointer-events: none;
}

.player-screen.style-cinematic::before {
    top: 0;
}

.player-screen.style-cinematic::after {
    bottom: 0;
}

/* ========================================
   �� Responsive Design
   ======================================== */

@media (max-width: 1200px) {
    .storyboard-main-layout {
        grid-template-columns: 55% 45%;
    }
    
    /* Player Focus and Style Magic are now separate sections, no grid needed */
}

@media (max-width: 968px) {
    .storyboard-main-layout {
        grid-template-columns: 1fr;
    }
    
    .smart-storyboard {
        max-height: 500px;
    }
    
    .player-avatars {
        justify-content: center;
    }
    
    .style-buttons {
        grid-template-columns: 1fr;
    }
    
    .output-settings-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    .player-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .player-meta {
        width: 100%;
        justify-content: space-between;
    }
    
    .storyboard-card {
        flex-direction: column;
    }
    
    .card-thumbnail {
        width: 100%;
        height: 180px;
    }
    
    .player-avatars {
        gap: 12px;
    }
    
    .avatar-circle {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .ratio-buttons {
        flex-wrap: wrap;
    }
    
    /* Button state styles removed */
    /*
    .generate-btn-large {
        padding: 16px 24px;
    }
    
    .btn-text-large {
        font-size: 18px;
    }
    */
}

/* ========================================
   🎭 Additional Animations
   ======================================== */

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.storyboard-main-layout {
    animation: scaleIn 0.6s ease;
}

.controls-bottom-section {
    animation: slideInFromRight 0.8s ease;
}

.output-generation-section {
    animation: slideInFromRight 1s ease;
}

/* ========================================
   💡 Event Detail Tooltip (悬浮卡片)
   ======================================== */

.storyboard-card {
    position: relative;
}

.event-detail-tooltip {
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 16px;
    width: 320px;
    background: rgba(10, 10, 10, 0.98);
    border: 2px solid rgba(232, 232, 232, 0.3);
    border-radius: 16px;
    padding: 20px;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
}

.storyboard-card:hover .event-detail-tooltip {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) translateX(8px);
}

/* Tooltip Arrow */
.event-detail-tooltip::before {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 10px 10px 0;
    border-color: transparent rgba(232, 232, 232, 0.3) transparent transparent;
}

.event-detail-tooltip::after {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 8px 8px 0;
    border-color: transparent rgba(10, 10, 10, 0.98) transparent transparent;
    margin-right: -2px;
}

/* Tooltip Header */
.tooltip-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(232, 232, 232, 0.2);
}

.tooltip-icon {
    font-size: 32px;
}

.tooltip-title-group {
    flex: 1;
}

.tooltip-event-type {
    font-size: 16px;
    font-weight: 700;
    color: #E8E8E8;
    margin-bottom: 4px;
}

.tooltip-event-time {
    font-size: 13px;
    color: rgba(232, 232, 232, 0.6);
}

/* Tooltip Body */
.tooltip-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tooltip-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tooltip-section-label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(232, 232, 232, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tooltip-section-content {
    font-size: 14px;
    color: rgba(232, 232, 232, 0.9);
    line-height: 1.5;
}

/* Players List */
.tooltip-players {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tooltip-player-tag {
    padding: 4px 10px;
    background: rgba(232, 232, 232, 0.1);
    border: 1px solid rgba(232, 232, 232, 0.2);
    border-radius: 12px;
    font-size: 12px;
    color: #E8E8E8;
}

/* Buffer Times */
.tooltip-buffer {
    display: flex;
    gap: 12px;
}

.buffer-item {
    flex: 1;
    padding: 8px;
    background: rgba(232, 232, 232, 0.05);
    border-radius: 8px;
    text-align: center;
}

.buffer-label {
    font-size: 10px;
    color: rgba(232, 232, 232, 0.5);
    margin-bottom: 4px;
}

.buffer-value {
    font-size: 16px;
    font-weight: 700;
    color: #E8E8E8;
}

/* Confidence Bar */
.tooltip-confidence {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.confidence-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(232, 232, 232, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.confidence-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    border-radius: 4px;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.confidence-text {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.confidence-label {
    color: rgba(232, 232, 232, 0.6);
}

.confidence-value {
    color: #FFD700;
    font-weight: 700;
}

/* Key Frames */
.tooltip-keyframes {
    display: flex;
    gap: 6px;
}

.keyframe-thumb {
    width: 48px;
    height: 32px;
    background: rgba(232, 232, 232, 0.1);
    border: 1px solid rgba(232, 232, 232, 0.2);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

/* AI Insights */
.tooltip-insights {
    padding: 10px;
    background: rgba(255, 215, 0, 0.1);
    border-left: 3px solid #FFD700;
    border-radius: 6px;
}

.insights-text {
    font-size: 12px;
    color: rgba(232, 232, 232, 0.8);
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 1400px) {
    .event-detail-tooltip {
        width: 280px;
        padding: 16px;
    }
}

@media (max-width: 1200px) {
    /* Tooltip appears above card on smaller screens */
    .event-detail-tooltip {
        left: 50%;
        top: auto;
        bottom: 100%;
        transform: translateX(-50%);
        margin-left: 0;
        margin-bottom: 12px;
    }
    
    .storyboard-card:hover .event-detail-tooltip {
        transform: translateX(-50%) translateY(-8px);
    }
    
    .event-detail-tooltip::before {
        right: auto;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        border-width: 10px 10px 0 10px;
        border-color: rgba(232, 232, 232, 0.3) transparent transparent transparent;
    }
    
    .event-detail-tooltip::after {
        right: auto;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        border-width: 8px 8px 0 8px;
        border-color: rgba(10, 10, 10, 0.98) transparent transparent transparent;
        margin-right: 0;
        margin-top: -2px;
    }
}

/* ========================================
   🔤 Smart Storyboard Font Size Adjustments
   Match Multi-Persona Studio sizes
   ======================================== */

/* Player Header - reduce from 18px to 14px */
.player-title {
    font-size: 14px !important;
    font-weight: 600;
}

.player-icon {
    font-size: 20px !important;
}

.player-meta {
    font-size: 11px !important;
}

.player-duration {
    font-size: 11px !important;
}

/* Event Display - reduce sizes */
.event-name-large {
    font-size: 16px !important;
}

.event-time-large {
    font-size: 13px !important;
}

.event-confidence {
    font-size: 12px !important;
}

/* Control buttons */
.time-display {
    font-size: 12px !important;
}

.control-btn span {
    font-size: 14px !important;
}

/* Storyboard Header - reduce from 18px to 14px */
.storyboard-title {
    font-size: 14px !important;
    font-weight: 600;
}

.storyboard-icon {
    font-size: 20px !important;
}

.storyboard-count {
    font-size: 11px !important;
}

/* Storyboard Cards */
.card-type {
    font-size: 12px !important;
}

.card-confidence {
    font-size: 11px !important;
}

.card-time,
.card-player {
    font-size: 11px !important;
}

.card-icon {
    font-size: 16px !important;
}

/* Player Focus Section */
.label-text {
    font-size: 13px !important;
}

.label-subtitle {
    font-size: 10px !important;
}

.label-icon {
    font-size: 18px !important;
}

.avatar-name {
    font-size: 11px !important;
}

.avatar-badge {
    font-size: 10px !important;
}

/* Style Magic Section */
.style-name {
    font-size: 12px !important;
}

.style-desc {
    font-size: 10px !important;
}

.style-icon {
    font-size: 18px !important;
}

/* Output Section */
.output-label {
    font-size: 12px !important;
}

.ratio-text {
    font-size: 11px !important;
}

.platform-logo {
    width: 18px !important;
    height: 18px !important;
}

.stat-label {
    font-size: 11px !important;
}

.stat-value {
    font-size: 14px !important;
}

/* Generate Button - styles removed, no longer needed */
/*
.btn-text-large {
    font-size: 16px !important;
}

.btn-subtitle {
    font-size: 11px !important;
}

.btn-icon-large {
    font-size: 28px !important;
}
*/

.btn-arrow {
    font-size: 20px !important;
}

/* Tooltip adjustments */
.tooltip-event-type {
    font-size: 14px !important;
}

.tooltip-event-time {
    font-size: 11px !important;
}

.tooltip-section-label {
    font-size: 10px !important;
}

.tooltip-section-content {
    font-size: 12px !important;
}

.tooltip-player-tag {
    font-size: 11px !important;
}

.buffer-label {
    font-size: 9px !important;
}

.buffer-value {
    font-size: 14px !important;
}

.confidence-text {
    font-size: 11px !important;
}

.insights-text {
    font-size: 11px !important;
}

.tooltip-icon {
    font-size: 28px !important;
}

/* ========================================
   🔤 Smart Storyboard Font Consistency Fix
   确保字体粗细与其他section一致
   ======================================== */

/* 确保继承全局字体 */
.storyboard-version * {
    font-family: 'Inter', 'SF Pro', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* 标题字体粗细 - 与workspace保持一致 */
.player-title,
.storyboard-title {
    font-weight: 600 !important; /* workspace用的是600 */
}

/* 卡片标题 - 与workspace persona-card-name一致 */
.card-type {
    font-weight: 700 !important; /* 与persona-card-name一致 */
}

/* 普通文字 - 正常粗细 */
.player-meta,
.storyboard-count,
.card-time,
.card-player,
.label-text,
.avatar-name,
.style-name,
.output-label {
    font-weight: 500 !important; /* 正常粗细 */
}

/* 小文字 - 稍细 */
.card-confidence,
.label-subtitle,
.style-desc,
.stat-label {
    font-weight: 400 !important; /* 更细 */
}

/* 数字和重要信息 - 加粗 */
.stat-value,
.buffer-value,
.confidence-value {
    font-weight: 700 !important; /* 加粗 */
}

/* 徽章 */
.avatar-badge {
    font-weight: 700 !important;
}

/* Tooltip字体 */
.tooltip-event-type {
    font-weight: 700 !important;
}

.tooltip-section-label {
    font-weight: 600 !important;
    text-transform: uppercase;
}

.tooltip-section-content,
.tooltip-player-tag {
    font-weight: 400 !important;
}

/* 移除可能导致字体看起来怪异的属性 */
.storyboard-version {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* 确保按钮字体正常 */
.control-btn,
.style-btn,
.ratio-btn {
    font-family: inherit;
    -webkit-font-smoothing: antialiased;
}

/* Removed - using generate-btn-compact now */
/*
.generate-btn-large {
    font-family: inherit;
    -webkit-font-smoothing: antialiased;
}
*/

/* ========================================
   ⚡ Quick Presets Section
   ======================================== */

.highlight-presets-section {
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(232, 232, 232, 0.2);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
}

.preset-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.preset-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(232, 232, 232, 0.05);
    border: 1px solid rgba(232, 232, 232, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.preset-btn:hover {
    background: rgba(232, 232, 232, 0.1);
    border-color: rgba(232, 232, 232, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(232, 232, 232, 0.15);
}

.preset-btn.active {
    background: rgba(232, 232, 232, 0.15);
    border-color: #E8E8E8;
    box-shadow: 0 0 20px rgba(232, 232, 232, 0.3);
}

.preset-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    flex: 1;
}

.preset-icon {
    font-size: 32px;
}

.preset-name {
    font-size: 13px;
    font-weight: 700;
    color: #E8E8E8;
}

.preset-desc {
    font-size: 10px;
    color: rgba(232, 232, 232, 0.6);
}

.preset-stats {
    font-size: 11px;
    font-weight: 600;
    color: #E8E8E8;
    white-space: nowrap;
    padding: 4px 8px;
    background: rgba(232, 232, 232, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(232, 232, 232, 0.2);
}

/* ========================================
   📋 Event Type Legend
   ======================================== */

.event-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(232, 232, 232, 0.03);
    border-bottom: 1px solid rgba(232, 232, 232, 0.1);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(232, 232, 232, 0.05);
    border: 1px solid rgba(232, 232, 232, 0.15);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.legend-item:hover {
    background: rgba(232, 232, 232, 0.1);
    border-color: rgba(232, 232, 232, 0.3);
    transform: scale(1.05);
}

.legend-item.active {
    background: rgba(232, 232, 232, 0.15);
    border-color: #E8E8E8;
    box-shadow: 0 0 10px rgba(232, 232, 232, 0.2);
}

.legend-marker {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-marker.goal { background: #E8E8E8; box-shadow: 0 0 8px rgba(232, 232, 232, 0.4); }
.legend-marker.save { background: #60A5FA; box-shadow: 0 0 8px rgba(96, 165, 250, 0.4); }
.legend-marker.assist { background: #34D399; box-shadow: 0 0 8px rgba(52, 211, 153, 0.4); }
.legend-marker.shot { background: #F87171; box-shadow: 0 0 8px rgba(248, 113, 113, 0.4); }
.legend-marker.tackle { background: #A78BFA; box-shadow: 0 0 8px rgba(167, 139, 250, 0.4); }
.legend-marker.pass { background: #8B5CF6; box-shadow: 0 0 8px rgba(139, 92, 246, 0.4); }
.legend-marker.card { background: #F5F5F5; box-shadow: 0 0 8px rgba(252, 211, 77, 0.4); }
.legend-marker.sub { background: #4ADE80; box-shadow: 0 0 8px rgba(74, 222, 128, 0.4); }
.legend-marker.foul { background: #FB923C; box-shadow: 0 0 8px rgba(251, 146, 60, 0.4); }
.legend-marker.corner { background: #818CF8; box-shadow: 0 0 8px rgba(129, 140, 248, 0.4); }
.legend-marker.offside { background: #F472B6; box-shadow: 0 0 8px rgba(244, 114, 182, 0.4); }

.legend-icon {
    font-size: 16px;
}

.legend-label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(232, 232, 232, 0.8);
    flex: 1;
}

.legend-count {
    font-size: 10px;
    font-weight: 700;
    color: #E8E8E8;
    background: rgba(232, 232, 232, 0.1);
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

/* ========================================
   🎮 Enhanced Player Controls
   ======================================== */

.control-btn-large {
    width: 48px !important;
    height: 48px !important;
    font-size: 20px !important;
    background: rgba(232, 232, 232, 0.15) !important;
    border: 2px solid rgba(232, 232, 232, 0.3) !important;
}

.control-btn-large:hover {
    background: rgba(232, 232, 232, 0.25) !important;
    border-color: #E8E8E8 !important;
    transform: scale(1.1) !important;
}

/* Previous/Next event buttons */
#prevEventBtn,
#nextEventBtn {
    background: rgba(232, 232, 232, 0.08);
}

#prevEventBtn:hover,
#nextEventBtn:hover {
    background: rgba(232, 232, 232, 0.15);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .preset-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .poker-card {
        width: 100px;
        height: 120px;
    }
    
    .poker-cards-row-stacked .poker-card:not(:first-child) {
        margin-left: -75px; /* 平板：更紧密避免滚动条 */
    }
    
    .poker-cards-row-flat .poker-card:not(:first-child) {
        margin-left: -22px; /* 平板尺寸：稍微紧密一些 */
    }
    
    .poker-card-thumbnail {
        height: 70px;
    }
}

@media (max-width: 768px) {
    .preset-buttons {
        grid-template-columns: 1fr;
    }
    
    .event-legend {
        justify-content: center;
    }
    
    .control-btn-large {
        width: 44px !important;
        height: 44px !important;
    }
    
    .poker-cards-row-flat,
    .poker-cards-row-stacked {
        min-height: 120px;
    }
    
    .poker-card {
        width: 90px;
        height: 110px;
    }
    
    .poker-cards-row-stacked .poker-card:not(:first-child) {
        margin-left: -70px; /* 移动端：更紧密避免滚动条 */
    }
    
    .poker-cards-row-flat .poker-card:not(:first-child) {
        margin-left: -20px; /* 移动设备：更紧密以适应小屏幕 */
    }
    
    .poker-card-thumbnail {
        height: 62px;
    }
}

/* ========================================
   🎨 Emoji Reduction - Style Adjustments
   ======================================== */

/* Avatar Letter Styling */
.avatar-letter {
    font-size: 18px;
    font-weight: 700;
    color: #E8E8E8;
    letter-spacing: -0.5px;
}

.avatar-circle .avatar-letter {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Adjust avatar circle for text */
.player-avatar .avatar-circle {
    background: linear-gradient(135deg, rgba(232, 232, 232, 0.15), rgba(232, 232, 232, 0.08));
}

.player-avatar.active .avatar-circle {
    background: linear-gradient(135deg, rgba(232, 232, 232, 0.25), rgba(232, 232, 232, 0.15));
}

/* Remove icon wrapper spacing for style buttons */
.style-btn .style-info {
    width: 100%;
}

/* Preset button layout is now handled above with preset-content and preset-stats */

.preset-desc {
    font-size: 10px !important;
}

/* Adjust section labels without icons */
.section-label {
    gap: 8px;
}

.section-label .label-text {
    font-size: 14px !important;
    font-weight: 700 !important;
}

/* Generate button styles removed - now using .generate-btn-compact */
/*
.generate-btn-large {
    padding: 20px 40px !important;
    justify-content: space-between !important;
}

.generate-btn-large .btn-content {
    flex: 1;
    text-align: left;
}
*/

/* Player title without icon */
.player-title-group {
    gap: 0 !important;
}

.player-title {
    font-size: 15px !important;
    font-weight: 700 !important;
}

/* Storyboard title without icon */
.storyboard-title-group {
    gap: 0 !important;
}

.storyboard-title {
    font-size: 15px !important;
    font-weight: 700 !important;
}

/* Style buttons - full width text */
.style-btn {
    padding: 14px 16px !important;
}

.style-name {
    font-size: 13px !important;
    font-weight: 700 !important;
}

.style-desc {
    font-size: 10px !important;
}

/* ========================================
   🎛️ Generation Mode Switch (in Highlights)
   ======================================== */

.generation-mode-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mode-switch-highlights {
    display: flex;
    gap: 12px;
}

.mode-option-highlights {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(232, 232, 232, 0.05);
    border: 1px solid rgba(232, 232, 232, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-option-highlights:hover {
    background: rgba(232, 232, 232, 0.1);
    border-color: rgba(232, 232, 232, 0.3);
}

.mode-option-highlights.active {
    background: rgba(232, 232, 232, 0.15);
    border-color: #E8E8E8;
    box-shadow: 0 0 15px rgba(232, 232, 232, 0.2);
}

.mode-radio {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(232, 232, 232, 0.4);
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.mode-radio.active {
    border-color: #E8E8E8;
}

.mode-radio.active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #E8E8E8;
    border-radius: 50%;
}

.mode-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mode-name {
    font-size: 11px;
    font-weight: 600;
    color: #E8E8E8;
}

.mode-accuracy {
    font-size: 9px;
    color: rgba(232, 232, 232, 0.6);
}

/* Responsive */
@media (max-width: 1200px) {
    .output-settings-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .generation-mode-group {
        width: 100%;
    }
    
    .mode-switch-highlights {
        width: 100%;
        justify-content: space-between;
    }
    
    .mode-option-highlights {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .mode-switch-highlights {
        flex-direction: column;
    }
}

/* ========================================
   🎬 Video Preview Players
   ======================================== */

.video-preview-player {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    background: #000;
}

.video-player-compact {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

.video-placeholder.hidden {
    display: none !important;
}

#customVideo {
    display: none;
}

#customVideo.active {
    display: block;
}


/* ========================================
   📝 Video Description
   ======================================== */

.video-description {
    font-size: 11px;
    color: rgba(232, 232, 232, 0.6);
    margin: 8px 0 12px 0;
    line-height: 1.4;
    font-weight: 400;
}



/* ========================================
   🏆 Match Timeline Styles
   ======================================== */

.match-timeline-layout {
    width: 100%;
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(232, 232, 232, 0.08);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(20px);
}

/* Match Header */
.match-header {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.match-title-group {
    flex-shrink: 0;
}

.match-title {
    font-size: 26px;
    font-weight: 700;
    color: #E8E8E8;
    letter-spacing: -0.02em;
}

.match-meta {
    display: flex;
    gap: 16px;
    align-items: center;
    font-size: 13px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.match-date {
    color: rgba(232, 232, 232, 0.6);
    white-space: nowrap;
}

.match-result {
    color: rgba(232, 232, 232, 0.95);
    font-weight: 600;
    padding: 4px 10px;
    background: rgba(232, 232, 232, 0.08);
    border-radius: 6px;
    border: 1px solid rgba(232, 232, 232, 0.25);
    white-space: nowrap;
}

/* Match Timeline Container */
.match-timeline-container {
    position: relative;
    margin-bottom: 0;
    padding: 16px 0;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

/* Timeline Track */
.timeline-track {
    display: flex;
    width: 100%;
    height: 80px;
    position: relative;
    gap: 16px; /* Add gap for spacing between segments */
}

.timeline-segment {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    border-right: 1px solid rgba(232, 232, 232, 0.1);
    padding: 8px;
    transition: background 0.3s ease;
}

.timeline-segment:last-child {
    border-right: none;
}

.timeline-segment.first-half,
.timeline-segment.second-half {
    flex: 2.7;
    background: linear-gradient(180deg, rgba(76, 175, 80, 0.1), rgba(76, 175, 80, 0.05));
}

.timeline-segment.extra-first,
.timeline-segment.extra-second {
    flex: 0.9;
    background: linear-gradient(180deg, rgba(255, 152, 0, 0.15), rgba(255, 152, 0, 0.08));
}

.timeline-segment.penalties {
    flex: 0.3;
    background: linear-gradient(180deg, rgba(244, 67, 54, 0.2), rgba(244, 67, 54, 0.1));
}

.timeline-segment.halftime,
.timeline-segment.extra-time-break,
.timeline-segment.extra-halftime {
    flex: 0.2;
    background: rgba(232, 232, 232, 0.05);
    border-left: 2px dashed rgba(232, 232, 232, 0.2);
    border-right: 2px dashed rgba(232, 232, 232, 0.2);
}

.segment-label {
    font-size: 12px;
    font-weight: 700;
    color: #E8E8E8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.segment-time {
    font-size: 10px;
    color: rgba(232, 232, 232, 0.5);
    font-weight: 500;
}

/* Score Markers */
.timeline-scores {
    position: absolute;
    top: 24px; /* 对齐到timeline-track的顶部（考虑container的padding） */
    left: 0;
    width: 100%;
    height: 80px; /* 与timeline-track高度相同 */
    pointer-events: none;
}

.score-marker {
    position: absolute;
    top: 50%; /* 相对于timeline-track的50%（中心线） */
    left: 0; /* 在HTML中通过style设置具体的left值 */
    transform: translateX(-50%); /* 水平居中 */
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: all;
    cursor: pointer;
    z-index: 1;
    transition: z-index 0s, transform 0.2s ease;
}

/* Hover时提升到最上层，避免被遮挡 */
.score-marker:hover {
    z-index: 100;
    transform: translateX(-50%) translateY(-2px);
}

.score-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 3px solid #E8E8E8;
    box-shadow: 0 0 12px rgba(232, 232, 232, 0.4);
    animation: scorePulse 2s ease-in-out infinite;
    /* dot 现在完美对齐时间轴中心线 */
    transform: translateY(-50%); /* 让 dot 中心对齐 marker 的 top 位置 */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.score-dot.argentina {
    background: linear-gradient(135deg, #5B9CDA, #4A8BC2);
    border-color: #5B9CDA;
}

.score-dot.france {
    background: linear-gradient(135deg, #002395, #ED2939);
    border-color: #002395;
}

.score-text {
    font-size: 13px;
    font-weight: 700;
    color: #FFD700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    background: rgba(20, 20, 20, 0.9);
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    white-space: nowrap;
    margin-top: 12px; /* 与dot的间距 */
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.score-marker:hover .score-dot {
    transform: translateY(-50%) scale(1.2);
    box-shadow: 0 0 20px rgba(232, 232, 232, 0.8), 0 0 40px rgba(232, 232, 232, 0.4);
}

.score-marker:hover .score-text {
    background: rgba(20, 20, 20, 1);
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.8);
}

@keyframes scorePulse {
    0%, 100% {
        transform: translateY(-50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translateY(-50%) scale(1.2);
        opacity: 0.8;
    }
}

/* Timeline Player Filter */
.timeline-player-filter {
    margin-bottom: 24px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid rgba(232, 232, 232, 0.06);
}

.timeline-player-filter .section-label-compact {
    margin-bottom: 16px;
}

/* Timeline Legend */
.timeline-legend {
    margin-bottom: 8px;
    padding: 18px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid rgba(232, 232, 232, 0.06);
}

.legend-title {
    font-size: 12px;
    font-weight: 700;
    color: rgba(232, 232, 232, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

/* Events Timeline Container */
.events-timeline-container {
    margin-top: 8px;
    margin-bottom: 16px;
}

/* Unified Filter Panel */
.unified-filter-panel {
    margin-top: 16px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border: 1px solid rgba(232, 232, 232, 0.06);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.filter-section {
    flex: 1;
}

/* 🎨 优化：Event Types 和 Players 左右排列 */
.filters-top-row {
    display: flex;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(232, 232, 232, 0.1);
}

/* Event Types 占50% */
.event-types-section {
    flex: 1;
    min-width: 0; /* 允许flex子项收缩 */
}

/* Players 占50% */
.players-section {
    flex: 1;
    min-width: 0;
}

/* Quick Presets 独占一行 */
.quick-presets-section {
    width: 100%;
}

/* 球队快速切换按钮 */
.team-quick-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.team-filter-btn {
    flex: 1;
    padding: 8px 12px;
    background: rgba(232, 232, 232, 0.05);
    border: 1px solid rgba(232, 232, 232, 0.1);
    border-radius: 6px;
    color: rgba(232, 232, 232, 0.7);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.team-filter-btn:hover {
    background: rgba(232, 232, 232, 0.1);
    border-color: rgba(232, 232, 232, 0.3);
    color: #E8E8E8;
}

.team-filter-btn.active {
    background: linear-gradient(135deg, rgba(232, 232, 232, 0.2), rgba(232, 232, 232, 0.1));
    border-color: rgba(232, 232, 232, 0.5);
    color: rgba(232, 232, 232, 0.95);
}

/* Player Filters Group */
.player-filters-group {
    margin-bottom: 12px;
}

.player-group-label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(232, 232, 232, 0.6);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 折叠按钮 */
.player-group-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(232, 232, 232, 0.03);
    border: 1px solid rgba(232, 232, 232, 0.08);
    border-radius: 6px;
    color: rgba(232, 232, 232, 0.7);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 8px;
}

.player-group-toggle:hover {
    background: rgba(232, 232, 232, 0.08);
    border-color: rgba(232, 232, 232, 0.15);
    color: #E8E8E8;
}

.toggle-icon {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.player-group-toggle.expanded .toggle-icon {
    transform: rotate(180deg);
}

/* 折叠状态 */
.player-filters.collapsed {
    display: none;
}

.player-filters:not(.collapsed) {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

.filter-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    gap: 10px;
}

/* 批量操作按钮组 */
.filter-actions {
    display: flex;
    gap: 4px;
}

.filter-action-btn {
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    color: rgba(232, 232, 232, 0.6);
    background: rgba(232, 232, 232, 0.05);
    border: 1px solid rgba(232, 232, 232, 0.1);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.filter-action-btn:hover {
    color: rgba(232, 232, 232, 0.9);
    background: rgba(232, 232, 232, 0.1);
    border-color: rgba(232, 232, 232, 0.3);
}

.filter-action-btn:active {
    transform: scale(0.95);
}

.filter-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #E8E8E8;
}

.filter-section-count {
    font-size: 12px;
    font-weight: 600;
    color: rgba(232, 232, 232, 0.8);
    padding: 2px 8px;
    background: rgba(232, 232, 232, 0.1);
    border-radius: 4px;
}

.player-filters,
.event-type-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* 🔗 联动禁用状态 */
.filter-chip.disabled {
    opacity: 0.3;
    pointer-events: none;
    cursor: not-allowed;
}

.filter-chip.disabled .filter-chip-count {
    opacity: 0.5;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(232, 232, 232, 0.05);
    border: 1.5px solid rgba(232, 232, 232, 0.15);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.filter-chip:hover {
    background: rgba(232, 232, 232, 0.1);
    border-color: rgba(232, 232, 232, 0.3);
    transform: translateY(-2px);
}

.filter-chip.active {
    background: rgba(232, 232, 232, 0.15);
    border-color: rgba(232, 232, 232, 0.5);
    box-shadow: 0 0 12px rgba(232, 232, 232, 0.2);
}

.filter-chip-label {
    font-size: 13px;
    font-weight: 600;
    color: #E8E8E8;
}

.filter-chip-count {
    font-size: 11px;
    font-weight: 700;
    color: rgba(232, 232, 232, 0.9);
    background: rgba(232, 232, 232, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    min-width: 20px;
    text-align: center;
}

.filter-marker {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.filter-marker.goal {
    background: linear-gradient(135deg, #4CAF50, #388E3C);
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.5);
}

.filter-marker.save {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    box-shadow: 0 0 8px rgba(33, 150, 243, 0.5);
}

.filter-marker.assist {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    box-shadow: 0 0 8px rgba(255, 152, 0, 0.5);
}

.filter-marker.shot {
    background: linear-gradient(135deg, #9C27B0, #7B1FA2);
    box-shadow: 0 0 8px rgba(156, 39, 176, 0.5);
}

.filter-marker.pass {
    background: linear-gradient(135deg, #00BCD4, #0097A7);
    box-shadow: 0 0 8px rgba(0, 188, 212, 0.5);
}

/* Quick Presets Section */
.quick-presets-section {
    flex: 1 1 100%;
    margin-top: 0;
    padding-top: 12px;
    /* border-top 已移除，使用 filters-top-row 的 border-bottom 作为分割线 */
}

.filter-section-subtitle {
    font-size: 11px;
    color: rgba(232, 232, 232, 0.5);
    font-weight: 500;
}

.quick-presets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 8px;
}

.preset-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    background: rgba(232, 232, 232, 0.04);
    border: 1.5px solid rgba(232, 232, 232, 0.12);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.preset-chip:hover {
    background: rgba(232, 232, 232, 0.08);
    border-color: rgba(232, 232, 232, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(232, 232, 232, 0.15);
}

.preset-chip:active {
    transform: translateY(0);
}

.preset-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    text-align: center;
}

.preset-name {
    font-size: 12px;
    font-weight: 700;
    color: #E8E8E8;
    line-height: 1.2;
}

.preset-desc {
    font-size: 10px;
    font-weight: 500;
    color: rgba(232, 232, 232, 0.5);
    line-height: 1.2;
}

/* ========================================
   🎨 Presets Category Styles
   ======================================== */

.presets-category {
    margin-bottom: 12px;
}

.presets-category:last-child {
    margin-bottom: 0;
}

.presets-category-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(232, 232, 232, 0.4);
    margin-bottom: 10px;
}

/* AI Badge / Prompt Badge */
.ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.15));
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    color: rgba(167, 243, 208, 0.9);
    text-transform: none;
    letter-spacing: 0.3px;
    text-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
}

/* Prompt Preset Chip */
.preset-chip.preset-ai {
    border-color: rgba(16, 185, 129, 0.2);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(5, 150, 105, 0.05));
}

.preset-chip.preset-ai:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(5, 150, 105, 0.12));
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.2);
}

.preset-chip.preset-ai .preset-name {
    color: rgba(167, 243, 208, 0.95);
}

.preset-chip.preset-ai .preset-desc {
    color: rgba(167, 243, 208, 0.5);
}

/* ========================================
   📊 Output Statistics & Clip Length
   ======================================== */

.output-statistics {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(232, 232, 232, 0.05);
    border: 1px solid rgba(232, 232, 232, 0.15);
    border-radius: 10px;
}

.output-stats-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(232, 232, 232, 0.08);
}

.output-stats-title {
    font-size: 13px;
    font-weight: 700;
    color: rgba(232, 232, 232, 0.9);
    letter-spacing: 0.3px;
}

.output-stats-hint {
    font-size: 10px;
    font-weight: 500;
    color: rgba(232, 232, 232, 0.4);
    font-style: italic;
}

.stats-row {
    display: grid;
    grid-template-columns: 280px 1fr auto;
    align-items: end;
    gap: 24px;
}

.stats-info {
    display: flex;
    gap: 24px;
    min-width: 280px;
    align-items: flex-end;
    padding-bottom: 6px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(232, 232, 232, 0.5);
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: rgba(232, 232, 232, 0.95);
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
}

.clip-length-selector {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    padding-left: 20px;
    max-width: 420px;
}

.clip-length-header {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.clip-length-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(232, 232, 232, 0.5);
}

.clip-length-hint {
    font-size: 9px;
    font-weight: 500;
    color: rgba(232, 232, 232, 0.35);
}

.clip-length-options {
    display: flex;
    gap: 6px;
}

.clip-length-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: transparent;
    border: 1px solid rgba(232, 232, 232, 0.15);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: fit-content;
    height: 32px;
}

.clip-length-btn:hover {
    background: rgba(232, 232, 232, 0.05);
    border-color: rgba(232, 232, 232, 0.3);
}

.clip-length-btn.active {
    background: rgba(232, 232, 232, 0.08);
    border-color: rgba(232, 232, 232, 0.5);
}

.length-name {
    font-size: 10px;
    font-weight: 600;
    color: rgba(232, 232, 232, 0.7);
}

.clip-length-btn.active .length-name {
    color: rgba(232, 232, 232, 0.95);
}

.length-time {
    font-size: 9px;
    font-weight: 500;
    color: rgba(232, 232, 232, 0.4);
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
}

.clip-length-btn.active .length-time {
    color: rgba(232, 232, 232, 0.7);
}

.length-desc {
    font-size: 8px;
    font-weight: 500;
    color: rgba(232, 232, 232, 0.3);
    padding-left: 6px;
    border-left: 1px solid rgba(232, 232, 232, 0.15);
}

.clip-length-btn.active .length-desc {
    color: rgba(232, 232, 232, 0.5);
    border-left-color: rgba(232, 232, 232, 0.3);
}

/* Generate Highlight Reel Button - Primary with Gold Accent */
.generate-highlight-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: linear-gradient(135deg, 
        rgba(232, 232, 232, 0.15) 0%, 
        rgba(251, 191, 36, 0.08) 50%,
        rgba(232, 232, 232, 0.15) 100%);
    border: 1.5px solid rgba(251, 191, 36, 0.4);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 44px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(232, 232, 232, 0.12),
                0 0 20px rgba(251, 191, 36, 0.15),
                inset 0 1px 0 rgba(251, 191, 36, 0.1);
    position: relative;
}

.generate-highlight-btn:hover {
    background: linear-gradient(135deg, 
        rgba(232, 232, 232, 0.2) 0%, 
        rgba(251, 191, 36, 0.12) 50%,
        rgba(232, 232, 232, 0.2) 100%);
    border-color: rgba(251, 191, 36, 0.6);
    box-shadow: 0 4px 16px rgba(232, 232, 232, 0.15),
                0 0 30px rgba(251, 191, 36, 0.25),
                inset 0 1px 0 rgba(251, 191, 36, 0.2);
    transform: translateY(-1px);
}

.generate-btn-title {
    font-size: 12px;
    font-weight: 700;
    color: rgba(232, 232, 232, 1);
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

.generate-btn-subtitle {
    font-size: 9px;
    font-weight: 500;
    color: rgba(251, 191, 36, 0.7);
    padding-left: 8px;
    border-left: 1px solid rgba(251, 191, 36, 0.3);
}

.generate-highlight-btn:hover .generate-btn-subtitle {
    color: rgba(251, 191, 36, 0.9);
}

.btn-arrow {
    font-size: 16px;
    color: rgba(251, 191, 36, 0.8);
    transition: all 0.3s ease;
    line-height: 1;
    margin-left: auto;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
}

.generate-highlight-btn:hover .btn-arrow {
    transform: translateX(4px);
    color: rgba(251, 191, 36, 1);
    text-shadow: 0 0 15px rgba(251, 191, 36, 0.6);
}

@media (max-width: 1024px) {
    .match-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .match-meta {
        font-size: 12px;
        gap: 12px;
    }
    
    .quick-presets-grid {
        grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    }
    
    .stats-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .clip-length-options {
        flex-wrap: wrap;
        width: 100%;
    }
    
    .clip-length-btn {
        flex: 1;
        min-width: 140px;
    }
    
    .generate-highlight-btn {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 768px) {
    .unified-filter-panel {
        gap: 20px;
        padding: 16px;
    }
    
    /* 移动端：Event Types 和 Players 堆叠 */
    .filters-top-row {
        flex-direction: column;
        gap: 16px;
    }
    
    .event-types-section,
    .players-section {
        flex: 1 1 100%;
    }
    
    .quick-presets-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .team-quick-filters {
        flex-direction: column;
    }
    
    .team-filter-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .quick-presets-grid {
        grid-template-columns: 1fr;
    }
}

.events-timeline-header {
    display: none;
}

.events-timeline-title {
    font-size: 18px;
    font-weight: 700;
    color: #E8E8E8;
}

.events-timeline-count {
    font-size: 14px;
    color: rgba(232, 232, 232, 0.6);
}

/* Events Timeline Scroll */
.events-timeline-scroll {
    position: relative;
    width: 100%;
    height: 90px;
    margin-top: 0;
    overflow: visible;
}

/* Poker cards in timeline - positioned below timeline segments */
.events-timeline-scroll .poker-card {
    position: absolute;
    bottom: 0;
    width: 60px;
    height: 80px;
    transform: translateX(-50%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    z-index: 1;
}

.events-timeline-scroll .poker-card:hover {
    transform: translateX(-50%) translateY(-8px) scale(1.15);
    z-index: 100;
}

/* Smaller card elements for timeline positioning */
.events-timeline-scroll .poker-card-inner {
    border-radius: 8px;
    border-width: 1.5px;
}

.events-timeline-scroll .poker-card-thumbnail {
    height: 45px;
}

.events-timeline-scroll .thumbnail-gif-placeholder span {
    font-size: 18px !important;
}

.events-timeline-scroll .poker-card-info {
    padding: 4px;
    gap: 2px;
}

.events-timeline-scroll .poker-card-type {
    font-size: 9px;
    letter-spacing: 0.2px;
}

.events-timeline-scroll .poker-card-time {
    font-size: 10px;
}

.events-timeline-scroll .poker-card-time.injury-time {
    padding: 1px 4px;
    font-size: 9px;
}

/* Penalty Winning Goal (Special Styling) */
.score-marker.penalty-winning .score-dot {
    width: 20px;
    height: 20px;
    border-width: 4px;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 0 40px rgba(255, 215, 0, 0.4);
    animation: scorePulse 1.5s ease-in-out infinite, winningGlow 2s ease-in-out infinite;
}

.score-marker.penalty-winning .score-text {
    font-size: 14px;
    font-weight: 800;
    color: #FFD700;
    background: rgba(20, 20, 20, 0.95);
    border: 2px solid rgba(255, 215, 0, 0.8);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.5), 0 0 20px rgba(255, 215, 0, 0.3);
}

@keyframes winningGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 0 40px rgba(255, 215, 0, 0.4);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 215, 0, 1), 0 0 60px rgba(255, 215, 0, 0.6);
    }
}

