:root {
    --primary-color: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.4);
    --bg-overlay: rgba(15, 23, 42, 0.7);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #22d3ee;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Outfit', sans-serif;
    background: #0f172a;
    color: var(--text-main);
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 0;
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('bg.png') center/cover no-repeat;
    filter: brightness(0.4) blur(0px);
    z-index: -1;
    transition: filter 0.5s ease;
}

.app-container {
    width: 100%;
    max-width: 1100px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 600;
    font-size: 1.4rem;
    letter-spacing: 1px;
    color: var(--text-main);
}

.logo-icon {
    color: var(--primary-color);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.pulse {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.3; }
    100% { transform: scale(1); opacity: 1; }
}

.player-wrapper {
    width: 100%;
    position: relative;
}

.glass-container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.glass-container:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.video-section {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
}

#main-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Custom Controls */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    pointer-events: none;
    visibility: hidden;
}

.video-section:hover .video-overlay,
.video-section.is-paused .video-overlay {
    opacity: 1;
    visibility: visible;
}

.big-play-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    flex-direction: column;
    gap: 0.5rem;
    cursor: pointer;
    transform: scale(0.9);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: auto;
    position: relative;
}

.big-play-btn::after {
    content: "点击播放";
    position: absolute;
    bottom: -35px;
    font-size: 0.95rem;
    font-weight: 500;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    white-space: nowrap;
    opacity: 1;
}

.video-section.is-playing .big-play-btn::after {
    display: none;
}

.big-play-btn:hover {
    transform: scale(1);
    box-shadow: 0 0 30px var(--primary-glow);
}

.custom-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    display: flex;
    flex-direction: column;
    gap: 1rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-section:hover .custom-controls,
.video-section.is-paused .custom-controls {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.progress-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    overflow: visible;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--primary-color);
    border-radius: 4px;
    position: relative;
    transition: width 0.1s linear;
}

.progress-handle {
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    right: -7px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    transition: transform 0.2s ease;
}

.progress-container:hover .progress-handle {
    transform: translateY(-50%) scale(1);
}

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

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

.control-btn {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.time-display {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-muted);
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-slider-wrapper {
    width: 0;
    overflow: hidden;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
}

.volume-container:hover .volume-slider-wrapper {
    width: 80px;
}

#volume-slider {
    width: 100%;
    accent-color: var(--primary-color);
    cursor: pointer;
}
/* Unmute Hint */
.unmute-hint {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--primary-color);
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s ease;
    cursor: pointer;
    box-shadow: 0 10px 20px var(--primary-glow);
    z-index: 100;
}

.video-section.is-muted .unmute-hint {
    opacity: 1;
    transform: translateY(0);
}

/* Info Section */
.video-info {
    padding: 2rem;
    background: rgba(0, 0, 0, 0.2);
}

.video-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    background: linear-gradient(135deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.video-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.tag {
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
}

.date {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.video-desc {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 1rem;
    max-width: 800px;
}

footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Animations */
.animate-fade-in {
    animation: fadeIn 1s ease forwards;
}

.animate-slide-up {
    animation: slideUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

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

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

/* Responsive */
@media (max-width: 768px) {
    .app-container {
        padding: 0.75rem;
        gap: 1rem;
    }
    
    header {
        padding: 0 0.5rem;
    }

    .logo {
        font-size: 1.1rem;
    }

    .status-indicator {
        font-size: 0.75rem;
    }

    .glass-container {
        border-radius: 16px;
    }

    .video-info {
        padding: 1.25rem;
    }

    .video-title {
        font-size: 1.3rem;
        margin-bottom: 0.5rem;
    }
    
    .video-meta {
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .video-desc {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .big-play-btn {
        width: 65px;
        height: 65px;
    }
    
    .big-play-btn::after {
        font-size: 0.85rem;
        bottom: -30px;
    }

    .custom-controls {
        padding: 1rem;
    }

    .time-display {
        font-size: 0.8rem;
    }

    .volume-slider-wrapper {
        display: none;
    }

    .unmute-hint {
        top: 10px;
        right: 10px;
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 0.95rem;
        gap: 0.5rem;
    }
    
    .status-indicator {
        font-size: 0.7rem;
    }
    
    .video-title {
        font-size: 1.15rem;
    }
    
    .video-desc {
        font-size: 0.85rem;
    }
}
