* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html, body {
    width: 100%;
    min-height: 100%;
    background: linear-gradient(180deg, #282b35 0%, #0f172a 50%, #020617 100%);
    font-family: "Microsoft Yahei", system-ui, -apple-system, sans-serif;
    color: #e2e8f0;
    -webkit-font-smoothing: antialiased;
}
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(251, 114, 153, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}
.container {
    position: relative;
    z-index: 1;
    max-width: 1800px;
    margin: 0 auto;
    padding: 24px;
    min-height: 100vh;
}

.page-header {
    margin-bottom: 24px;
    animation: fadeInDown 0.6s ease;
}
.page-title {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.page-title::before {
    content: '▶';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #fb7299, #ff6b9d);
    border-radius: 10px;
    font-size: 14px;
    -webkit-text-fill-color: #fff;
    box-shadow: 0 4px 14px rgba(251, 114, 153, 0.35);
}
.page-subtitle {
    color: #64748b;
    font-size: 14px;
    margin-left: 48px;
}

.player-main-content {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    animation: fadeInUp 0.6s ease 0.1s both;
}
.player-section {
    min-width: 0;
}
.player-wrapper {
    background: linear-gradient(145deg, rgba(0,0,0,0.6) 0%, rgba(15, 23, 42, 0.8) 100%);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.1);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.03) inset;
    position: relative;
}
.player-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #fb7299, #40b0ff, #fb7299);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
    z-index: 10;
}
@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
.player-container {
    width: 100%;
    aspect-ratio: 16/9;
    max-height: 75vh;
    border: none;
    display: block;
}

.player-info {
    padding: 20px 24px;
    border-top: 1px solid rgba(148, 163, 184, 0.08);
    background: rgba(15, 23, 42, 0.5);
}
.video-title-bar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}
.current-video-title {
    font-size: 18px;
    font-weight: 600;
    color: #f1f5f9;
    line-height: 1.4;
    word-break: break-all;
    flex: 1;
    min-width: 0;
}
.current-video-title.empty {
    color: #64748b;
    font-weight: 400;
    font-style: italic;
}
.video-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    color: #64748b;
    font-size: 13px;
}
.video-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.video-meta .meta-item .icon {
    font-size: 14px;
}
.video-meta .status-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}
.status-badge.idle {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
}
.status-badge.playing {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.action-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}
.action-btn {
    padding: 8px 16px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    color: #cbd5e1;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}
.action-btn:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.15);
    color: #fff;
    transform: translateY(-1px);
}
.action-btn.primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-color: transparent;
    color: #fff;
}
.action-btn.primary:hover {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}
.action-btn.danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #f87171;
}
.action-btn.danger:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}
.side-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.8) 100%);
    border-radius: 14px;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.08);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}
.side-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.15), transparent);
}
.side-card h3 {
    color: #f1f5f9;
    font-size: 15px;
    margin-bottom: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.side-card h3 .emoji {
    font-size: 16px;
}

.url-input-card {
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.08) 0%, rgba(15, 23, 42, 0.9) 100%);
    border: 1px solid rgba(59, 130, 246, 0.15);
}
.url-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.input-group {
    position: relative;
}
.url-input {
    width: 100%;
    padding: 14px 42px 14px 14px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 10px;
    color: #e2e8f0;
    font-size: 13px;
    outline: none;
    transition: all 0.25s;
    font-family: inherit;
}
.url-input:focus {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: rgba(15, 23, 42, 0.8);
}
.url-input::placeholder {
    color: #475569;
}
.input-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.15);
    border: none;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    opacity: 0;
    transition: all 0.2s;
}
.input-group:hover .input-clear,
.url-input:focus ~ .input-clear {
    opacity: 1;
}
.input-clear:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.format-select {
    width: 100%;
    padding: 12px 14px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 10px;
    color: #e2e8f0;
    font-size: 13px;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 38px;
    transition: all 0.2s;
}
.format-select:hover {
    border-color: rgba(148, 163, 184, 0.25);
}
.format-select:focus {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.url-submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #ff6b9d, #c9487c);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(251, 114, 153, 0.25);
    position: relative;
    overflow: hidden;
}
.url-submit-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s;
}
.url-submit-btn:hover::after {
    left: 100%;
}
.url-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(251, 114, 153, 0.35);
}
.url-submit-btn:active {
    transform: translateY(0);
}

.quick-tips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}
.quick-tip-tag {
    padding: 4px 10px;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 6px;
    color: #64748b;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}
.quick-tip-tag:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.clear-history-btn {
    padding: 4px 10px;
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 6px;
    color: #64748b;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}
.clear-history-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 4px;
}
.history-list::-webkit-scrollbar {
    width: 4px;
}
.history-list::-webkit-scrollbar-track {
    background: transparent;
}
.history-list::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.2);
    border-radius: 4px;
}
.history-item {
    padding: 10px 12px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.06);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}
.history-item:hover {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.15);
    transform: translateX(2px);
}
.history-item-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(251, 114, 153, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}
.history-item-content {
    flex: 1;
    min-width: 0;
}
.history-item-title {
    font-size: 12px;
    color: #cbd5e1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}
.history-item-time {
    font-size: 10px;
    color: #475569;
}
.history-item-delete {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    background: transparent;
    border: none;
    color: #475569;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    opacity: 0;
    transition: all 0.2s;
    flex-shrink: 0;
}
.history-item:hover .history-item-delete {
    opacity: 1;
}
.history-item-delete:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}
.history-empty {
    padding: 24px 16px;
    text-align: center;
    color: #475569;
    font-size: 12px;
}
.history-empty .empty-icon {
    font-size: 28px;
    margin-bottom: 8px;
    opacity: 0.5;
}

.intro-text {
    color: #94a3b8;
    font-size: 13px;
    line-height: 1.7;
}
.feature-list {
    list-style: none;
    padding: 0;
}
.feature-list li {
    color: #94a3b8;
    font-size: 13px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.05);
    display: flex;
    align-items: center;
    gap: 8px;
}
.feature-list li::before {
    content: '✓';
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.1));
    color: #22c55e;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}
.feature-list li:last-child {
    border-bottom: none;
}

.app-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.app-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.06);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s;
    position: relative;
    overflow: hidden;
}
.app-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, #fb7299, #3b82f6);
    opacity: 0;
    transition: opacity 0.2s;
}
.app-item:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(148, 163, 184, 0.12);
    transform: translateX(2px);
}
.app-item:hover::before {
    opacity: 1;
}
.app-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(251,114,153,0.2), rgba(59, 130, 246, 0.15));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.app-info {
    flex: 1;
    min-width: 0;
}
.app-name {
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 2px;
}
.app-desc {
    color: #64748b;
    font-size: 11px;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1200px) {
    .player-main-content {
        grid-template-columns: 1fr;
    }
    .sidebar {
        order: -1;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .container {
        padding: 16px 12px;
    }
    .page-title {
        font-size: 22px;
    }
    .page-title::before {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    .page-subtitle {
        margin-left: 42px;
        font-size: 12px;
    }
    .sidebar {
        grid-template-columns: 1fr;
    }
    .player-container {
        max-height: 50vh;
    }
    .video-title-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    .action-buttons {
        width: 100%;
        flex-wrap: wrap;
    }
    .action-btn {
        flex: 1;
        min-width: 0;
        justify-content: center;
    }
    .player-info {
        padding: 16px;
    }
}

.toast-notification {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: rgba(15, 23, 42, 0.95);
    color: #fff;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    max-width: 90vw;
    text-align: center;
}
.toast-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.toast-notification.success {
    border-color: rgba(34, 197, 94, 0.3);
    background: rgba(22, 101, 52, 0.9);
}
.toast-notification.error {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(127, 29, 29, 0.9);
}
.toast-notification.info {
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(30, 64, 175, 0.9);
}

.input-paste-btn {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: rgba(59, 130, 246, 0.15);
    border: none;
    color: #60a5fa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    opacity: 0;
    transition: all 0.2s;
    font-weight: 600;
}
.input-group:hover .input-paste-btn,
.url-input:focus ~ .input-paste-btn {
    opacity: 1;
}
.input-paste-btn:hover {
    background: rgba(59, 130, 246, 0.25);
    color: #93c5fd;
}

.favorite-btn {
    background: rgba(250, 204, 21, 0.1);
    border-color: rgba(250, 204, 21, 0.2);
    color: #facc15;
}
.favorite-btn:hover {
    background: rgba(250, 204, 21, 0.2);
    color: #fde047;
}
.favorite-btn.active {
    background: linear-gradient(135deg, #facc15, #eab308);
    color: #000;
    border-color: transparent;
}

.shortcuts-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.shortcuts-modal.show {
    display: flex;
    animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.shortcuts-content {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
    border-radius: 16px;
    padding: 28px;
    max-width: 520px;
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.15);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 0.3s ease;
}
.shortcuts-title {
    font-size: 20px;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.shortcuts-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.shortcuts-close:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}
.shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.shortcut-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.06);
}
.shortcut-key {
    display: inline-flex;
    gap: 4px;
}
.key-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 26px;
    padding: 0 8px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    color: #e2e8f0;
    font-size: 11px;
    font-weight: 600;
    font-family: 'JetBrains Mono', Consolas, monospace;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
}
.shortcut-desc {
    color: #94a3b8;
    font-size: 13px;
}

.share-btn {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}
.share-btn:hover {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.shortcuts-help-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(37, 99, 235, 0.9));
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    z-index: 100;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}
.shortcuts-help-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 10px 28px rgba(59, 130, 246, 0.45);
}
@media (max-width: 768px) {
    .shortcuts-help-btn {
        bottom: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    .shortcuts-grid {
        grid-template-columns: 1fr;
    }
}