.b2vd-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
}

.b2vd-header {
    text-align: center;
    margin-bottom: 30px;
}

.b2vd-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    color: #fff;
    margin-bottom: 16px;
}

.b2vd-header-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #1a1a2e;
}

.b2vd-header-desc {
    font-size: 14px;
    color: #888;
    margin: 0;
}

.b2vd-input-section {
    margin-bottom: 24px;
}

.b2vd-input-wrapper {
    display: flex;
    align-items: center;
    background: #fff;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    padding: 4px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.b2vd-input-wrapper:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.b2vd-input-icon {
    display: flex;
    align-items: center;
    padding: 0 12px;
    color: #bbb;
    flex-shrink: 0;
}

.b2vd-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    padding: 12px 0;
    background: transparent;
    color: #333;
    min-width: 0;
}

.b2vd-input::placeholder {
    color: #bbb;
}

.b2vd-parse-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    white-space: nowrap;
    flex-shrink: 0;
}

.b2vd-parse-btn:hover {
    opacity: 0.9;
}

.b2vd-parse-btn:active {
    transform: scale(0.97);
}

.b2vd-parse-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.b2vd-btn-loading {
    display: flex;
    align-items: center;
    gap: 6px;
}

.b2vd-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: b2vd-spin 0.6s linear infinite;
}

@keyframes b2vd-spin {
    to {
        transform: rotate(360deg);
    }
}

.b2vd-platform-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding: 0 4px;
}

.b2vd-platform-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #888;
    background: #f5f5f5;
    padding: 4px 10px;
    border-radius: 20px;
    cursor: default;
    transition: background 0.2s;
}

.b2vd-platform-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.b2vd-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: b2vd-fadeIn 0.3s ease;
}

.b2vd-message.b2vd-error {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    color: #cf1322;
}

.b2vd-message.b2vd-success {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #389e0d;
}

.b2vd-message.b2vd-warning {
    background: #fffbe6;
    border: 1px solid #ffe58f;
    color: #d48806;
}

@keyframes b2vd-fadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.b2vd-result {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e8e8e8;
    overflow: hidden;
    margin-bottom: 24px;
    animation: b2vd-fadeIn 0.4s ease;
}

.b2vd-result-header {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.b2vd-result-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.b2vd-platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    background: #f0f0f0;
    color: #555;
    width: fit-content;
}

.b2vd-video-title {
    font-size: 16px;
    font-weight: 600;
    margin: 4px 0 0;
    color: #1a1a2e;
    line-height: 1.5;
}

.b2vd-video-author {
    font-size: 13px;
    color: #888;
    margin: 0;
}

.b2vd-result-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.b2vd-preview-section {
    padding: 20px;
    border-right: 1px solid #f0f0f0;
}

.b2vd-preview-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    aspect-ratio: 9 / 16;
    max-height: 400px;
}

.b2vd-video-cover {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.b2vd-video-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.b2vd-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    padding: 0;
}

.b2vd-play-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translate(-50%, -50%) scale(1.05);
}

.b2vd-video-player {
    position: relative;
    width: 100%;
    height: 100%;
}

.b2vd-video-player video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.b2vd-close-player {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s;
}

.b2vd-close-player:hover {
    background: rgba(0, 0, 0, 0.8);
}

.b2vd-download-section {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.b2vd-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    color: #1a1a2e;
}

.b2vd-video-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.b2vd-video-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: #f9f9fb;
    border-radius: 8px;
    border: 1px solid #eee;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.b2vd-video-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.b2vd-video-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.b2vd-video-item-quality {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.b2vd-video-item-meta {
    font-size: 12px;
    color: #999;
}

.b2vd-video-item-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.b2vd-download-btn,
.b2vd-preview-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: opacity 0.2s;
    text-decoration: none;
}

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

.b2vd-download-btn:hover {
    opacity: 0.9;
    color: #fff;
    text-decoration: none;
}

.b2vd-preview-link {
    background: #f0f0f0;
    color: #555;
}

.b2vd-preview-link:hover {
    background: #e5e5e5;
    color: #333;
    text-decoration: none;
}

.b2vd-watermark-section {
    text-align: center;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
}

.b2vd-watermark-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}

.b2vd-watermark-btn:hover {
    opacity: 0.9;
}

.b2vd-watermark-btn:active {
    transform: scale(0.97);
}

.b2vd-watermark-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.b2vd-watermark-hint {
    font-size: 12px;
    color: #999;
    margin: 6px 0 0;
}

.b2vd-copyright-notice {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 10px 12px;
    background: #fffbe6;
    border-radius: 6px;
    font-size: 12px;
    color: #d48806;
    line-height: 1.6;
}

.b2vd-copyright-notice svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.b2vd-history {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e8e8e8;
    padding: 20px;
    margin-bottom: 24px;
}

.b2vd-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.b2vd-clear-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

.b2vd-clear-btn:hover {
    color: #cf1322;
    background: #fff2f0;
}

.b2vd-history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.b2vd-history-empty {
    text-align: center;
    padding: 24px;
    color: #bbb;
    font-size: 14px;
}

.b2vd-history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #f9f9fb;
    border-radius: 8px;
    transition: background 0.2s;
}

.b2vd-history-item:hover {
    background: #f0f0f5;
}

.b2vd-history-cover {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: #e8e8e8;
}

.b2vd-history-info {
    flex: 1;
    min-width: 0;
}

.b2vd-history-title {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0 0 2px;
}

.b2vd-history-meta {
    font-size: 12px;
    color: #999;
}

.b2vd-history-reparse {
    padding: 4px 12px;
    background: #f0f0f0;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    color: #555;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.b2vd-history-reparse:hover {
    background: #e0e0e0;
}

.b2vd-steps {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e8e8e8;
    padding: 24px;
}

.b2vd-steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 16px;
}

.b2vd-step {
    text-align: center;
}

.b2vd-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 50%;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
}

.b2vd-step-content h5 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px;
    color: #333;
}

.b2vd-step-content p {
    font-size: 12px;
    color: #888;
    margin: 0;
}

@media (max-width: 768px) {
    .b2vd-container {
        padding: 12px;
    }

    .b2vd-input-wrapper {
        flex-direction: column;
        padding: 12px;
        gap: 10px;
    }

    .b2vd-input-icon {
        display: none;
    }

    .b2vd-input {
        width: 100%;
        padding: 10px 0;
    }

    .b2vd-parse-btn {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }

    .b2vd-result-body {
        grid-template-columns: 1fr;
    }

    .b2vd-preview-section {
        border-right: none;
        border-bottom: 1px solid #f0f0f0;
    }

    .b2vd-preview-card {
        max-height: 300px;
        aspect-ratio: auto;
    }

    .b2vd-steps-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .b2vd-step {
        display: flex;
        align-items: center;
        gap: 12px;
        text-align: left;
    }

    .b2vd-step-number {
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .b2vd-platform-tags {
        justify-content: center;
    }

    .b2vd-header-title {
        font-size: 20px;
    }

    .b2vd-video-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .b2vd-video-item-actions {
        width: 100%;
    }

    .b2vd-download-btn,
    .b2vd-preview-link {
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .b2vd-header-icon {
        width: 48px;
        height: 48px;
    }

    .b2vd-header-icon svg {
        width: 24px;
        height: 24px;
    }

    .b2vd-header-title {
        font-size: 18px;
    }

    .b2vd-platform-tags {
        gap: 6px;
    }

    .b2vd-platform-tag {
        font-size: 11px;
        padding: 3px 8px;
    }
}
