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

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

.container {
    position: relative;
    width: 100%;
    max-width: 100%;
    background: #fff;
    overflow: hidden;
}

/* 灯笼容器 */
.lanterns-container {
    position: fixed;
    bottom: 80px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 100;
}

/* 灯笼基础样式 */
.lantern {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: swing 3s ease-in-out infinite;
    transform: scale(0.6);
    opacity: 0.7;
}

.lantern:hover {
    transform: scale(0.7);
    animation: swing-fast 1s ease-in-out infinite;
    opacity: 1;
}

.lantern.active {
    opacity: 1;
    animation: swing-fast 1s ease-in-out infinite;
}

/* 灯笼绳子 */
.lantern-string {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 30px;
    background: linear-gradient(to bottom, rgba(139, 69, 19, 0.8), rgba(139, 69, 19, 0.3));
}

/* 灯笼顶部 */
.lantern-top {
    width: 28px;
    height: 10px;
    background: #8B4513;
    border-radius: 50% 50% 0 0;
    margin: 0 auto;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* 灯笼主体 */
.lantern-body {
    position: relative;
    width: 35px;
    height: 50px;
    border-radius: 45% 45% 50% 50%;
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* 灯笼底部 */
.lantern-bottom {
    width: 28px;
    height: 10px;
    background: #8B4513;
    border-radius: 0 0 50% 50%;
    margin: 0 auto;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* 灯笼装饰线条 */
.lantern-decoration {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 215, 0, 0.5);
    transform: translateY(-50%);
}

.lantern-decoration::before,
.lantern-decoration::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 215, 0, 0.3);
}

.lantern-decoration::before {
    top: -15px;
}

.lantern-decoration::after {
    bottom: -15px;
}

/* 灯笼发光效果 */
.lantern-light {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

/* 红灯笼 */
.lantern-red .lantern-body {
    background: linear-gradient(135deg, #DC143C 0%, #8B0000 100%);
}

.lantern-red .lantern-light {
    background: radial-gradient(circle, rgba(255, 0, 0, 0.6) 0%, transparent 70%);
}

.lantern-red.active .lantern-body {
    background: linear-gradient(135deg, #FF1744 0%, #DC143C 100%);
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.8), 0 8px 20px rgba(0, 0, 0, 0.4);
}

.lantern-red.active .lantern-light {
    opacity: 0.8;
    animation: glow-red 2s ease-in-out infinite;
}

/* 黄灯笼 */
.lantern-yellow .lantern-body {
    background: linear-gradient(135deg, #B8860B 0%, #8B6508 100%);
}

.lantern-yellow .lantern-light {
    background: radial-gradient(circle, rgba(255, 215, 0, 0.6) 0%, transparent 70%);
}

.lantern-yellow.active .lantern-body {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.8), 0 8px 20px rgba(0, 0, 0, 0.4);
}

.lantern-yellow.active .lantern-light {
    opacity: 0.8;
    animation: glow-yellow 2s ease-in-out infinite;
}

/* 蓝灯笼 */
.lantern-blue .lantern-body {
    background: linear-gradient(135deg, #4169E1 0%, #191970 100%);
}

.lantern-blue .lantern-light {
    background: radial-gradient(circle, rgba(0, 191, 255, 0.6) 0%, transparent 70%);
}

.lantern-blue.active .lantern-body {
    background: linear-gradient(135deg, #1E90FF 0%, #4169E1 100%);
    box-shadow: 0 0 30px rgba(30, 144, 255, 0.8), 0 8px 20px rgba(0, 0, 0, 0.4);
}

.lantern-blue.active .lantern-light {
    opacity: 0.8;
    animation: glow-blue 2s ease-in-out infinite;
}

/* 摇晃动画 */
@keyframes swing {
    0%, 100% {
        transform: rotate(-3deg);
    }
    50% {
        transform: rotate(3deg);
    }
}

@keyframes swing-fast {
    0%, 100% {
        transform: rotate(-5deg) scale(1.1);
    }
    50% {
        transform: rotate(5deg) scale(1.1);
    }
}

/* 发光动画 */
@keyframes glow-red {
    0%, 100% {
        opacity: 0.8;
        filter: brightness(1);
    }
    50% {
        opacity: 1;
        filter: brightness(1.3);
    }
}

@keyframes glow-yellow {
    0%, 100% {
        opacity: 0.8;
        filter: brightness(1);
    }
    50% {
        opacity: 1;
        filter: brightness(1.3);
    }
}

@keyframes glow-blue {
    0%, 100% {
        opacity: 0.8;
        filter: brightness(1);
    }
    50% {
        opacity: 1;
        filter: brightness(1.3);
    }
}

.video-player {
    width: 100%;
    height: 85vh;
    display: block;
    background: #000;
    object-fit: contain;
}

.control-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(248, 249, 250, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(224, 224, 224, 0.5);
    transition: all 0.3s ease;
    cursor: pointer;
    z-index: 50;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.control-panel.collapsed {
    padding: 12px 20px;
}

.control-panel.collapsed:hover {
    background: rgba(248, 249, 250, 0.85);
}

.control-panel.expanded {
    padding: 20px;
    background: rgba(248, 249, 250, 0.95);
    cursor: default;
}

.control-panel.collapsed .controls,
.control-panel.collapsed .volume-display,
.control-panel.collapsed .settings {
    display: none;
}

.control-panel.collapsed .status-indicator {
    margin-bottom: 0;
    justify-content: space-between;
}

.control-panel.collapsed::after {
    content: '▲ 点击展开';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: #667eea;
    opacity: 0.8;
    font-weight: 600;
    animation: pulse-hint 2s ease-in-out infinite;
}

@keyframes pulse-hint {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

.control-panel.expanded::after {
    content: '▼ 收起';
    position: absolute;
    left: 20px;
    top: 12px;
    font-size: 11px;
    color: #667eea;
    opacity: 0.8;
    font-weight: 600;
    cursor: pointer;
}

.control-panel.expanded::after:hover {
    opacity: 1;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    flex-wrap: wrap;
}

.control-panel.collapsed .status-indicator {
    font-size: 13px;
}

.current-video {
    margin-left: auto;
    padding: 6px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
    font-size: 13px;
}

.control-panel.collapsed .current-video {
    padding: 4px 12px;
    font-size: 12px;
}

.status-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-dot.inactive {
    background: #6c757d;
    animation: none;
}

.status-dot.listening {
    background: #28a745;
}

.status-dot.playing {
    background: #007bff;
}

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

.controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.control-panel.expanded .controls {
    display: flex;
}

.btn {
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

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

.volume-display {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    font-size: 13px;
}

.control-panel.expanded .volume-display {
    display: flex;
}

.volume-display label {
    font-weight: 500;
    min-width: 70px;
}

.volume-bar-container {
    flex: 1;
    height: 16px;
    background: #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.volume-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #28a745 0%, #20c997 50%, #ffc107 100%);
    transition: width 0.1s ease;
    border-radius: 8px;
}

#volumeValue {
    font-weight: 600;
    min-width: 40px;
    color: #667eea;
}

.settings {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}

.control-panel.expanded .settings {
    display: flex;
}

.settings label {
    font-weight: 500;
}

.settings input[type="range"] {
    flex: 1;
    max-width: 250px;
    height: 6px;
    border-radius: 3px;
    background: #e0e0e0;
    outline: none;
    cursor: pointer;
}

.settings input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
}

.settings input[type="range"]::-webkit-slider-thumb:hover {
    background: #764ba2;
    transform: scale(1.2);
}

.settings input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.settings input[type="range"]::-moz-range-thumb:hover {
    background: #764ba2;
    transform: scale(1.2);
}

#sensitivityValue {
    font-weight: 600;
    min-width: 30px;
    color: #667eea;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 200;
    transition: opacity 0.5s ease;
}

.overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.overlay-content {
    text-align: center;
    color: white;
    padding: 40px;
}

.overlay-content h1 {
    font-size: 3em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

.overlay-content p {
    font-size: 1.3em;
    margin-bottom: 10px;
    opacity: 0.9;
}

.overlay-content .hint {
    font-size: 1.1em;
    opacity: 0.7;
    font-style: italic;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        width: 95%;
    }

    .video-player {
        height: 80vh;
    }

    .lanterns-container {
        bottom: 80px;
        right: 15px;
        gap: 10px;
    }

    .lantern {
        transform: scale(0.5);
    }

    .lantern:hover {
        transform: scale(0.6);
    }

    .control-panel.collapsed {
        padding: 10px 15px;
    }

    .control-panel.expanded {
        padding: 15px;
    }

    .controls {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .overlay-content h1 {
        font-size: 2em;
    }

    .overlay-content p {
        font-size: 1.1em;
    }

    .volume-display,
    .settings {
        flex-wrap: wrap;
    }

    .current-video {
        margin-left: 0;
    }
}

