/* Global Container */
.video-parser-container {
    max-width: 800px;
    margin: 60px auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1f2937;
    padding: 0 20px;
}

/* Header */
.vp-header {
    text-align: center;
    margin-bottom: 40px;
}

.vp-header h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 12px;
    color: #111827;
    letter-spacing: -0.025em;
}

.vp-header p {
    color: #6b7280;
    font-size: 16px;
    line-height: 1.5;
}

/* Form Wrapper */
.vp-form-wrapper {
    background: #ffffff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 20px;
    border: 1px solid #f3f4f6;
}

/* Input Groups */
.vp-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.vp-input-icon {
    position: absolute;
    left: 18px;
    color: #9ca3af;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.vp-input-group input {
    width: 100%;
    padding: 16px 16px 16px 50px;
    border: 1px solid #e5e7eb;
    background-color: #f9fafb;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.2s ease;
    outline: none;
    box-sizing: border-box;
    color: #1f2937;
}

.vp-input-group input::placeholder {
    color: #9ca3af;
}

.vp-input-group input:focus {
    border-color: #4f46e5;
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

/* Submit Button */
#vp-submit {
    padding: 16px 30px;
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 56px;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2), 0 2px 4px -1px rgba(79, 70, 229, 0.1);
}

#vp-submit:hover {
    background: #4338ca;
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3), 0 4px 6px -2px rgba(79, 70, 229, 0.15);
}

#vp-submit:active {
    transform: translateY(0);
}

/* Loading Spinner */
.vp-spinner {
    animation: rotate 2s linear infinite;
    width: 24px;
    height: 24px;
}

.vp-spinner .path {
    stroke: #fff;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

@keyframes dash {
    0% { stroke-dasharray: 1, 150; stroke-dashoffset: 0; }
    50% { stroke-dasharray: 90, 150; stroke-dashoffset: -35; }
    100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; }
}

/* Messages */
.vp-message {
    padding: 16px;
    border-radius: 12px;
    margin-top: 25px;
    font-size: 15px;
    display: none;
    line-height: 1.5;
}

.vp-error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fee2e2;
}

/* Result Card */
.vp-result-container {
    margin-top: 40px;
    animation: fadeIn 0.5s ease;
}

.vp-result-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    border: 1px solid #f3f4f6;
}

@media (min-width: 600px) {
    .vp-result-card {
        flex-direction: row;
    }
}

.vp-media-preview {
    position: relative;
    width: 100%;
    height: 250px;
    background: #f3f4f6;
    flex-shrink: 0;
}

@media (min-width: 600px) {
    .vp-media-preview {
        width: 320px;
        height: auto;
        min-height: 240px;
    }
}

.vp-media-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #000;
}

.vp-type-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(4px);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.vp-media-info {
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

#vp-title {
    font-size: 20px;
    line-height: 1.4;
    margin: 0 0 15px 0;
    color: #111827;
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vp-meta-row {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    color: #6b7280;
    font-size: 14px;
}

.vp-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

/* Action Buttons */
.vp-action-buttons {
    margin-top: auto;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.vp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
    flex: 1;
    min-width: 120px;
}

.vp-btn-primary {
    background-color: #10b981;
    color: white;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.2), 0 2px 4px -1px rgba(16, 185, 129, 0.1);
}

.vp-btn-primary:hover {
    background-color: #059669;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.3), 0 4px 6px -2px rgba(16, 185, 129, 0.15);
}

.vp-btn-secondary {
    background-color: #3b82f6;
    color: white;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.2), 0 2px 4px -1px rgba(59, 130, 246, 0.1);
}

.vp-btn-secondary:hover {
    background-color: #2563eb;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3), 0 4px 6px -2px rgba(59, 130, 246, 0.15);
}

/* Image Gallery */
.vp-image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    margin-top: 30px;
}

.vp-image-gallery img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.vp-image-gallery img:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* 批量下载控制栏 */
.vp-image-controls {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.vp-select-label {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    user-select: none;
}

.vp-btn-sm {
    padding: 8px 16px !important;
    min-height: auto !important;
    min-width: auto !important;
    font-size: 14px !important;
}

#vp-zip-progress {
    color: #6b7280;
    font-size: 14px;
    display: none;
}

/* 图片网格调整 */
.vp-image-grid-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
}

.vp-image-item-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

/* 自定义复选框样式 */
.vp-image-checkbox-label {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
    cursor: pointer;
}

.vp-img-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* 图片样式 */
.vp-image-item-wrapper img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    transition: transform 0.2s;
}

.vp-image-item-wrapper:hover img {
    transform: scale(1.02);
}

/* Batch Result List */
.vp-batch-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.vp-batch-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #f3f4f6;
    transition: transform 0.2s;
}

.vp-batch-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.vp-batch-thumb {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: #f3f4f6;
}

.vp-batch-info {
    padding: 15px;
}

.vp-batch-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 40px;
}

.vp-batch-btn {
    display: block;
    width: 100%;
    padding: 8px;
    text-align: center;
    background: #10b981;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
}

.vp-batch-btn:hover {
    background: #059669;
}

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