        /* ---------- 全局重置与配色 ---------- */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        body {
            font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
            background: #f0f4f8;
            min-height: 100vh;
            display: flex;
            justify-content: center;
            padding: 30px 20px;
        }
        .app {
            max-width: 820px;
            width: 100%;
            background: #ffffff;
            border-radius: 24px;
            box-shadow: 0 20px 60px rgba(0, 20, 40, 0.12);
            padding: 32px 36px 42px;
            transition: box-shadow 0.2s;
        }
        @media (max-width: 600px) {
            .app {
                padding: 20px 16px 28px;
                border-radius: 16px;
            }
        }

        /* ---------- 头部 ---------- */
        .header {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 28px;
            flex-wrap: wrap;
        }
        .header h1 {
            font-size: 26px;
            font-weight: 700;
            color: #0b1e33;
            letter-spacing: -0.3px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .header h1 small {
            font-size: 14px;
            font-weight: 400;
            color: #6b7a8f;
            letter-spacing: 0;
            margin-left: 4px;
        }
        .badge {
            background: #eef3fc;
            color: #1f5f8f;
            padding: 4px 14px;
            border-radius: 40px;
            font-size: 13px;
            font-weight: 500;
            margin-left: auto;
            white-space: nowrap;
        }

        /* ---------- 输入区域 ---------- */
        .input-row {
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
            margin-bottom: 18px;
        }
        .input-row input {
            flex: 1;
            min-width: 200px;
            padding: 14px 18px;
            border: 1.5px solid #dce4ec;
            border-radius: 14px;
            font-size: 15px;
            background: #f9fbfd;
            transition: border-color 0.2s, box-shadow 0.2s;
            outline: none;
        }
        .input-row input:focus {
            border-color: #2d7fc1;
            box-shadow: 0 0 0 4px rgba(45, 127, 193, 0.12);
            background: #ffffff;
        }
        .input-row input::placeholder {
            color: #a8b8cc;
        }
        .btn {
            padding: 14px 30px;
            border: none;
            border-radius: 14px;
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            white-space: nowrap;
            background: #e8edf4;
            color: #1f3a57;
        }
        .btn-primary {
            background: #1a6fb5;
            color: #fff;
        }
        .btn-primary:hover:not(:disabled) {
            background: #155d99;
            transform: translateY(-1px);
            box-shadow: 0 6px 18px rgba(26, 111, 181, 0.30);
        }
        .btn-primary:disabled {
            opacity: 0.55;
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }
        .btn-success {
            background: #1d8f5c;
            color: #fff;
        }
        .btn-success:hover:not(:disabled) {
            background: #16754b;
            transform: translateY(-1px);
            box-shadow: 0 6px 18px rgba(29, 143, 92, 0.30);
        }
        .btn-success:disabled {
            opacity: 0.55;
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }
        .btn-danger {
            background: #c73b3b;
            color: #fff;
        }
        .btn-danger:hover:not(:disabled) {
            background: #a82f2f;
            transform: translateY(-1px);
            box-shadow: 0 6px 18px rgba(199, 59, 59, 0.28);
        }
        .btn-outline {
            background: transparent;
            border: 1.5px solid #d0dae8;
        }
        .btn-outline:hover:not(:disabled) {
            background: #f2f6fc;
            border-color: #b0c0d4;
        }
        .btn-sm {
            padding: 8px 16px;
            font-size: 13px;
            border-radius: 10px;
        }
        .btn-play {
            background: #b87c1a;
            color: #fff;
        }
        .btn-play:hover:not(:disabled) {
            background: #9e6916;
            transform: translateY(-1px);
            box-shadow: 0 6px 18px rgba(184, 124, 26, 0.30);
        }
        .btn-play:disabled {
            opacity: 0.55;
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }

        /* ---------- 状态与信息 ---------- */
        .info-panel {
            background: #f7faff;
            border-radius: 16px;
            padding: 16px 20px;
            margin: 16px 0 20px;
            border: 1px solid #e8eef6;
            display: none;
            flex-wrap: wrap;
            gap: 10px 28px;
            font-size: 14px;
            color: #1c334b;
        }
        .info-panel.visible {
            display: flex;
        }
        .info-panel .item {
            display: flex;
            align-items: baseline;
            gap: 6px;
        }
        .info-panel .label {
            color: #6b7f99;
            font-weight: 450;
        }
        .info-panel .value {
            font-weight: 600;
            color: #0b1e33;
        }
        .info-panel .value.highlight {
            color: #1a6fb5;
        }

        /* ---------- 进度 ---------- */
        .progress-wrap {
            margin: 12px 0 18px;
            display: none;
        }
        .progress-wrap.visible {
            display: block;
        }
        .progress-bar-bg {
            width: 100%;
            height: 8px;
            background: #e6edf6;
            border-radius: 20px;
            overflow: hidden;
        }
        .progress-bar-fill {
            height: 100%;
            width: 0%;
            background: linear-gradient(90deg, #2d7fc1, #4ba3e0);
            border-radius: 20px;
            transition: width 0.25s ease;
        }
        .progress-text {
            display: flex;
            justify-content: space-between;
            font-size: 13px;
            color: #3d5777;
            margin-top: 6px;
            font-weight: 450;
        }
        .progress-text .percent {
            font-weight: 600;
            color: #0b1e33;
        }

        /* ---------- 日志 ---------- */
        .log-area {
            background: #f2f6fc;
            border-radius: 14px;
            padding: 14px 18px;
            max-height: 220px;
            overflow-y: auto;
            font-family: 'SF Mono', 'JetBrains Mono', 'Cascadia Code', monospace;
            font-size: 13px;
            line-height: 1.6;
            color: #1c334b;
            border: 1px solid #e4ecf5;
            margin-top: 12px;
            display: none;
            scroll-behavior: smooth;
        }
        .log-area.visible {
            display: block;
        }
        .log-area .log-entry {
            padding: 2px 0;
            border-bottom: 1px solid rgba(0, 0, 0, 0.04);
            display: flex;
            gap: 10px;
        }
        .log-area .log-entry:last-child {
            border-bottom: none;
        }
        .log-area .log-time {
            color: #7a8fa8;
            font-weight: 450;
            white-space: nowrap;
            min-width: 68px;
        }
        .log-area .log-msg {
            word-break: break-all;
        }
        .log-area .log-msg.error {
            color: #c73b3b;
        }
        .log-area .log-msg.success {
            color: #1d8f5c;
        }
        .log-area .log-msg.warn {
            color: #b47d2e;
        }

        /* ---------- 子播放列表选择 ---------- */
        .variant-list {
            margin: 14px 0 16px;
            display: none;
            flex-wrap: wrap;
            gap: 10px;
        }
        .variant-list.visible {
            display: flex;
        }
        .variant-item {
            background: #f2f6fc;
            border: 1.5px solid #dce4ec;
            border-radius: 12px;
            padding: 12px 18px;
            cursor: pointer;
            transition: all 0.18s;
            font-size: 14px;
            flex: 1 1 160px;
            min-width: 140px;
        }
        .variant-item:hover {
            border-color: #2d7fc1;
            background: #eaf2fb;
            transform: translateY(-1px);
        }
        .variant-item.active {
            border-color: #1a6fb5;
            background: #e1edfa;
            box-shadow: 0 0 0 3px rgba(26, 111, 181, 0.15);
        }
        .variant-item .v-res {
            font-weight: 600;
            color: #0b1e33;
        }
        .variant-item .v-bandwidth {
            font-size: 13px;
            color: #4d6a8a;
        }
        .variant-item .v-url {
            font-size: 11px;
            color: #7a8fa8;
            word-break: break-all;
            margin-top: 4px;
            font-family: monospace;
        }

        /* ---------- 操作按钮 ---------- */
        .action-row {
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
            margin-top: 18px;
            align-items: center;
        }
        .action-row .btn {
            flex: 0 1 auto;
        }

        /* ---------- 空状态 ---------- */
        .empty-hint {
            color: #8ba0b8;
            font-size: 14px;
            text-align: center;
            padding: 30px 10px;
        }

        /* ---------- 播放器模态框 ---------- */
        .modal-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.7);
            z-index: 9999;
            justify-content: center;
            align-items: center;
            padding: 20px;
            backdrop-filter: blur(4px);
        }
        .modal-overlay.active {
            display: flex;
        }
        .modal-content {
            background: #0a0f16;
            border-radius: 20px;
            max-width: 900px;
            width: 100%;
            position: relative;
            box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
            overflow: hidden;
        }
        .modal-close {
            position: absolute;
            top: 12px;
            right: 16px;
            z-index: 10;
            background: rgba(255, 255, 255, 0.2);
            border: none;
            color: #fff;
            font-size: 28px;
            line-height: 1;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            cursor: pointer;
            transition: background 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 300;
        }
        .modal-close:hover {
            background: rgba(255, 255, 255, 0.35);
        }
        .modal-video {
            width: 100%;
            display: block;
            background: #000;
            aspect-ratio: 16 / 9;
            background-color: #111;
        }
        .modal-video video {
            width: 100%;
            height: 100%;
            display: block;
        }
        .modal-error {
            color: #ffa07a;
            padding: 20px;
            text-align: center;
            font-size: 16px;
            background: #1a1a2e;
        }

        /* ---------- 响应式微调 ---------- */
        @media (max-width: 480px) {
            .header h1 {
                font-size: 20px;
            }
            .badge {
                font-size: 11px;
                padding: 2px 12px;
            }
            .input-row input {
                font-size: 14px;
                padding: 12px 14px;
            }
            .btn {
                font-size: 14px;
                padding: 12px 20px;
            }
            .info-panel {
                font-size: 13px;
                padding: 12px 16px;
                gap: 6px 16px;
            }
            .modal-close {
                top: 8px;
                right: 10px;
                width: 32px;
                height: 32px;
                font-size: 22px;
            }
        }

        /* 滚动条美化 */
        .log-area::-webkit-scrollbar {
            width: 5px;
        }
        .log-area::-webkit-scrollbar-track {
            background: transparent;
        }
        .log-area::-webkit-scrollbar-thumb {
            background: #c6d4e4;
            border-radius: 10px;
        }
        .log-area::-webkit-scrollbar-thumb:hover {
            background: #a8bcd2;
        }

        /* 工具类 */
        .hidden {
            display: none !important;
        }
        .flex-center {
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .gap-8 {
            gap: 8px;
        }
        .mt-8 {
            margin-top: 8px;
        }
        .text-muted {
            color: #7a8fa8;
            font-size: 13px;
        }
        .ml-auto {
            margin-left: auto;
        }
    