/* ===== 基础重置 ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-card: rgba(26, 26, 46, 0.8);
    --bg-input: rgba(15, 15, 26, 0.6);
    --text-primary: #e4e4ef;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --accent-primary: #6366f1;
    --accent-secondary: #a855f7;
    --accent-gradient: linear-gradient(135deg, #6366f1, #a855f7);
    --border-color: rgba(99, 102, 241, 0.15);
    --border-hover: rgba(99, 102, 241, 0.4);
    --error-bg: rgba(239, 68, 68, 0.1);
    --error-border: rgba(239, 68, 68, 0.3);
    --error-text: #f87171;
    --success: #10b981;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    background-image:
        radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(168, 85, 247, 0.08) 0%, transparent 50%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.app {
    width: 100%;
    max-width: 680px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ===== 头部 ===== */
.header {
    text-align: center;
    padding: 8px 0 4px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.logo h1 {
    font-size: 1.75rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 400;
}

/* ===== 平台展示 ===== */
.platforms-section {
    display: flex;
    justify-content: center;
}

.platform-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition);
}

.platform-badge:hover {
    border-color: var(--brand);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.platform-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand);
    flex-shrink: 0;
    box-shadow: 0 0 6px var(--brand);
}

.platform-more {
    background: transparent;
    border-style: dashed;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.platform-more:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-1px);
}

/* ===== 卡片 ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
}

/* ===== 输入区域 ===== */
.input-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.input-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0 16px;
    transition: border-color var(--transition);
}

.input-row:focus-within {
    border-color: var(--border-hover);
}

.cookie-row {
    border-style: dashed;
}

.input-icon {
    color: var(--text-muted);
    flex-shrink: 0;
}

.input-row input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    padding: 14px 0;
}

.input-row input::placeholder {
    color: var(--text-muted);
}

/* ===== 按钮 ===== */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: var(--radius-sm);
    padding: 14px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition);
    user-select: none;
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.4);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-download {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 20px;
    font-size: 0.875rem;
}

.btn-download:hover:not(:disabled) {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary);
}

.btn-download.downloading {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.05);
}

/* 播放按钮 */
.btn-play {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
    padding: 10px 20px;
    font-size: 0.875rem;
}

.btn-play:hover:not(:disabled) {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.15);
}

.btn-play.playing {
    border-color: #10b981;
    color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

/* 投屏按钮 */
.btn-cast {
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: #a855f7;
    padding: 10px 20px;
    font-size: 0.875rem;
}

.btn-cast:hover:not(:disabled) {
    border-color: #a855f7;
    background: rgba(168, 85, 247, 0.15);
}

.btn-cast.casting {
    border-color: #a855f7;
    color: #a855f7;
    background: rgba(168, 85, 247, 0.05);
}

/* 按钮组容器 */
.stream-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* ===== 加载动画 ===== */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== 错误提示 ===== */
.error-msg {
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    color: var(--error-text);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.error-msg::before {
    content: "!";
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--error-text);
    color: var(--bg-primary);
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
}

/* ===== 视频信息 ===== */
.video-info {
    animation: fadeInUp 0.4s ease;
}

.info-header {
    margin-bottom: 20px;
}

.info-meta {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-primary);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.badge-type {
    background: rgba(168, 85, 247, 0.15);
    color: var(--accent-secondary);
    border-color: rgba(168, 85, 247, 0.2);
}

#video-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    word-break: break-word;
}

/* ===== 画质列表 ===== */
.section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.streams-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stream-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.stream-item:hover {
    border-color: var(--border-hover);
    background: rgba(99, 102, 241, 0.05);
}

.stream-info-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.stream-quality-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
}

.stream-details {
    min-width: 0;
}

.stream-quality {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.stream-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    gap: 8px;
}

.stream-meta span::before {
    content: "·";
    margin-right: 8px;
}

.stream-meta span:first-child::before {
    content: "";
    margin: 0;
}

/* ===== 下载进度 ===== */
.download-section {
    animation: fadeInUp 0.4s ease;
}

.download-status {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.download-icon {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.pulse-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--accent-primary);
    animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

.download-text {
    flex: 1;
}

.download-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.download-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background: var(--bg-input);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--accent-gradient);
    border-radius: 3px;
    transition: width 0.5s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 传输阶段图标变绿 */
.download-icon.phase-transfer {
    background: linear-gradient(135deg, #10b981, #059669);
}

/* ===== 视频播放器 ===== */
.player-section {
    animation: fadeInUp 0.4s ease;
}

.player-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-cast {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    cursor: pointer;
    transition: all var(--transition);
    padding: 0;
}

.btn-cast:hover {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.15);
}

.player-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.btn-close-player {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    padding: 0;
}

.btn-close-player:hover {
    border-color: var(--error-text);
    color: var(--error-text);
}

#video-player {
    width: 100%;
    max-height: 480px;
    border-radius: var(--radius-sm);
    background: #000;
    display: block;
}

#image-viewer {
    width: 100%;
    max-height: 600px;
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

/* ===== 投屏进度视图 ===== */
.cast-progress-view {
    padding: 32px 24px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    text-align: center;
}

.cast-progress-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.cast-progress-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.cast-progress-text {
    text-align: left;
}

.cast-status-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.cast-device-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.cast-status-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
    min-height: 1em;
}

.cast-progress-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.btn-cast-pause {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--accent-gradient);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s, transform 0.15s;
}

.btn-cast-pause:hover:not(:disabled) {
    opacity: 0.85;
    transform: scale(1.08);
}

.btn-cast-pause:active:not(:disabled) {
    transform: scale(0.95);
}

.btn-cast-pause:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.cast-progress-bar-container {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.cast-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--accent-gradient);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.cast-progress-time {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.btn-cast-stop-inline {
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    color: var(--error-text);
    padding: 10px 24px;
    font-size: 0.875rem;
}

.btn-cast-stop-inline:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.15);
}

/* ===== DLNA 投屏弹窗 ===== */
.cast-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.cast-dialog {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.25s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.cast-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.cast-dialog-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.btn-close-cast {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    padding: 0;
}

.btn-close-cast:hover {
    border-color: var(--error-text);
    color: var(--error-text);
}

.cast-device-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 320px;
    overflow-y: auto;
}

.cast-searching {
    text-align: center;
    color: var(--text-muted);
    padding: 24px 0;
    font-size: 0.9rem;
}

.cast-searching::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

.cast-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 24px 0;
    font-size: 0.85rem;
    line-height: 1.6;
}

.cast-error {
    text-align: center;
    color: var(--error-text);
    padding: 16px 0;
    font-size: 0.9rem;
}

.cast-success {
    text-align: center;
    color: var(--success);
    padding: 8px 0 4px;
    font-size: 1rem;
    font-weight: 600;
}

.cast-hint {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding-bottom: 8px;
}

.cast-device-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
}

.cast-device-item:hover {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
}

.cast-device-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(99, 102, 241, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.cast-device-info {
    flex: 1;
}

.cast-device-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}

.cast-device-actions {
    margin-top: 16px;
    text-align: center;
}

.btn-cast-stop {
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    color: var(--error-text);
    padding: 10px 24px;
    font-size: 0.875rem;
}

.btn-cast-stop:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.15);
}

/* ===== 页脚 ===== */
.footer {
    text-align: center;
    padding: 16px 0 8px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.protocol-info {
    margin-top: 6px;
    line-height: 1.8;
}

.protocol-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    margin: 0 2px;
}

.protocol-h3 {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.protocol-https {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.protocol-http {
    background: rgba(156, 163, 175, 0.15);
    color: #9ca3af;
    border: 1px solid rgba(156, 163, 175, 0.3);
}

/* ===== 顶部工具栏（APP 下载 + 语言选择） ===== */
.top-bar {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.app-download-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    white-space: nowrap;
}

.app-download-btn:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.app-download-btn:active {
    transform: scale(0.97);
}

/* ===== 语言选择器 ===== */
.lang-selector {
    position: relative;
    top: auto;
    right: auto;
    z-index: auto;
}

.lang-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.lang-trigger:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.lang-flag {
    font-size: 1.1rem;
    line-height: 1;
}

.lang-arrow {
    transition: transform var(--transition);
    flex-shrink: 0;
}

.lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 6px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: none;
    flex-direction: column;
    gap: 2px;
    animation: slideUp 0.2s ease;
}

.lang-menu.show {
    display: flex;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.lang-option:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--text-primary);
}

.lang-option.active {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-primary);
}

.lang-option .lang-flag {
    flex-shrink: 0;
}

.lang-option .lang-name {
    flex: 1;
}

.lang-check {
    color: var(--accent-primary);
    flex-shrink: 0;
}

/* ===== 工具类 ===== */
.hidden {
    display: none !important;
}

/* ===== 动画 ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== 响应式 ===== */
@media (max-width: 640px) {
    .app {
        gap: 16px;
    }
    .card {
        padding: 18px;
    }
    .logo h1 {
        font-size: 1.4rem;
    }
    .subtitle {
        font-size: 0.8rem;
    }
    .stream-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .stream-actions {
        width: 100%;
    }
    .stream-actions .btn-download,
    .stream-actions .btn-play,
    .stream-actions .btn-cast {
        flex: 1;
    }
    .top-bar {
        top: 12px;
        right: 12px;
        gap: 6px;
    }
    .app-download-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    .lang-trigger {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    .lang-trigger .lang-name {
        display: none;
    }
}
