/* ==================== Dubbing Page Styles ==================== */

.dubbing-container {
    display: none;
    padding: 0 20px 40px;
    max-width: 100%;
    margin: 0;
}

.dubbing-container.active {
    display: block;
}

/* ==================== Header Section ==================== */
.dubbing-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 48px;
    padding-top: 8px;
}

.dubbing-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.dubbing-header p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Primary Action Button - Purple Gradient (统一风格) */
.create-dub-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 24px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.create-dub-btn:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.create-dub-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

/* ==================== Section Titles ==================== */
.dubbing-section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

/* ==================== Learn Cards ==================== */
.dubbing-learn-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 48px;
}

.learn-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.learn-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.03) 0%, rgba(99, 102, 241, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.learn-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.12);
    transform: translateY(-4px);
}

.learn-card:hover::before {
    opacity: 1;
}

/* Learn Card Icon - Colorful Style */
.learn-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

/* First card - Purple theme */
.learn-card:nth-child(1) .learn-icon-wrapper {
    background: linear-gradient(135deg, #f3e8ff 0%, #e0e7ff 100%);
    color: #7c3aed;
}

/* Second card - Blue theme */
.learn-card:nth-child(2) .learn-icon-wrapper {
    background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
    color: #0ea5e9;
}

.learn-icon-wrapper .icon {
    width: 22px;
    height: 22px;
}

.learn-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.learn-content h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.4;
}

.learn-content p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* Arrow indicator on hover */
.learn-card::after {
    content: '→';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%) translateX(-8px);
    font-size: 18px;
    color: var(--primary-color);
    opacity: 0;
    transition: all 0.25s ease;
}

.learn-card:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* ==================== Recent Dubs List ==================== */
.recent-dubs-list {
    width: 100%;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
}

.dubs-header-row {
    display: flex;
    padding: 16px 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--panel-bg);
    border-bottom: 1px solid var(--border-color);
}

.dub-item {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
    cursor: pointer;
}

.dub-item:last-child {
    border-bottom: none;
}

.dub-item:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.04) 0%, rgba(99, 102, 241, 0.02) 100%);
}

.col-name {
    flex: 2;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Project icon - now using actual element instead of ::before */
.project-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
}

.col-lang {
    flex: 1;
    color: var(--text-secondary);
    font-size: 13px;
}

.col-date {
    flex: 1;
    color: var(--text-secondary);
    font-size: 13px;
}

.col-action {
    width: 48px;
    text-align: right;
}

/* Action Button */
.action-btn {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    opacity: 0;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dub-item:hover .action-btn {
    opacity: 1;
}

.action-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* ==================== Empty State ==================== */
.dubs-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 24px;
    text-align: center;
}

.dubs-empty-state .empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: linear-gradient(135deg, #f3e8ff 0%, #e0e7ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.dubs-empty-state .empty-icon svg {
    width: 36px;
    height: 36px;
    color: #7c3aed;
}

.dubs-empty-state h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.dubs-empty-state p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    max-width: 320px;
    line-height: 1.6;
}

.dubs-empty-state .create-btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dubs-empty-state .create-btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

/* ==================== Page Decorations ==================== */
.dubbing-container::before {
    content: '';
    position: fixed;
    top: 0;
    right: 0;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.04) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* ==================== Create Dubbing Modal ==================== */
.create-dubbing-modal {
    max-width: 480px;
}

.create-dubbing-modal .form-group {
    margin-bottom: 20px;
}

.create-dubbing-modal .form-group:last-child {
    margin-bottom: 0;
}

.create-dubbing-modal .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.create-dubbing-modal .form-input,
.create-dubbing-modal .form-select,
.create-dubbing-modal .form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.create-dubbing-modal .form-input:focus,
.create-dubbing-modal .form-select:focus,
.create-dubbing-modal .form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.create-dubbing-modal .form-input::placeholder,
.create-dubbing-modal .form-textarea::placeholder {
    color: var(--text-secondary);
}

.create-dubbing-modal .form-textarea {
    resize: vertical;
    min-height: 80px;
}

.create-dubbing-modal .modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.create-dubbing-modal .btn-secondary {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.create-dubbing-modal .btn-secondary:hover {
    background: var(--hover-bg);
}

.create-dubbing-modal .btn-primary {
    padding: 10px 20px;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.create-dubbing-modal .btn-primary:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
    .dubbing-header {
        flex-direction: column;
        gap: 20px;
    }
    
    .create-dub-btn {
        width: 100%;
        justify-content: center;
    }
    
    .dubbing-learn-cards {
        grid-template-columns: 1fr;
    }
    
    .dubs-header-row,
    .dub-item {
        padding: 12px 16px;
    }
    
    .col-lang,
    .col-date {
        display: none;
    }
    
    .col-name {
        flex: 1;
    }
}
