/* Video Template Styles */
/* Template Wrapper - Apply the Dark Theme HERE only */
.artplayer-video-page {
    width: 100%;
    background-color: #f8fafc;
    color: #1f2937;
    overflow-x: hidden;
    min-height: 80vh;
    padding-top: 0;
}

.artplayer-video-page .artplayer-template-wrapper {
    width: 100%;
    background-color: var(--color-bg, #f8fafc);
    color: var(--color-text, #1f2937);
    overflow-x: hidden;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
}

.artplayer-video-page .artplayer-video-page-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 20px 60px;
    box-sizing: border-box;
}

/* 1. Hero Section (Full Width Player) */
.artplayer-video-page .artplayer-template-hero {
    width: 100%;
    background: var(--color-bg, #ffffff);
    position: relative;
    display: block;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

/* Force the player container output by Shortcode to fill the Hero */
.artplayer-video-page .artplayer-template-hero .artplayer-wrapper {
    margin: 0;
}

.artplayer-video-page .artplayer-template-hero .artplayerbox {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    min-height: clamp(240px, 56.25vw, 80vh);
    display: block;
}

.artplayer-video-page .artplayer-template-hero[data-hero-height="1"] .artplayerbox {
    height: var(--artplayer-hero-height) !important;
    min-height: 0;
    aspect-ratio: auto;
}

.artplayer-video-page .artplayer-template-hero .artplayer-app {
    width: 100% !important;
    height: 100% !important;
}

/* 2. Content Section */
.artplayer-video-page .artplayer-template-content {
    width: 100%;
    position: relative;
}

/* Info Card */
.artplayer-video-page .artplayer-video-info-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.artplayer-video-page .artplayer-video-info {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-start;
}

.artplayer-video-page .artplayer-video-poster {
    flex: 0 0 260px;
    max-width: 260px;
}

.artplayer-video-page .artplayer-video-poster img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
    display: block;
}

.artplayer-video-page .artplayer-video-details {
    flex: 1;
    min-width: 0;
}

/* Header Info */
.artplayer-video-page .artplayer-video-header {
    border-bottom: 1px solid var(--color-border, #e5e7eb);
    padding-bottom: 30px;
    margin-bottom: 30px;
}

.artplayer-video-page .artplayer-video-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
}

.artplayer-video-page .artplayer-video-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.2;
}

.artplayer-video-page .artplayer-video-rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #fb7185 0%, #e11d48 100%);
    color: #fff;
    border: none;
    font-weight: 700;
    font-size: 1rem;
    white-space: nowrap;
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.25);
}

.artplayer-video-page .artplayer-video-rating-badge .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.artplayer-video-page .artplayer-rating-value {
    font-size: 1.05rem;
    letter-spacing: 0.2px;
}

.artplayer-video-page .artplayer-video-update-date {
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 18px;
}

/* Meta Row */
.artplayer-video-page .artplayer-video-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    font-size: 1rem;
    color: #64748b;
}

.artplayer-video-page .artplayer-video-rating {
    color: #f5c518;
    font-weight: 900;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-right: 15px;
}

.artplayer-video-page .artplayer-video-rating .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.artplayer-video-page .artplayer-tag {
    background: var(--color-bg-light, #f1f5f9);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #64748b;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

/* Person List */
.artplayer-video-page .artplayer-person-list {
    margin-bottom: 10px;
    font-size: 1.05rem;
}

.artplayer-video-page .artplayer-person-label {
    color: #64748b;
    margin-right: 10px;
    font-weight: 500;
}

.artplayer-video-page .artplayer-person-value {
    color: #1f2937;
}

.artplayer-video-page .artplayer-person-value a {
    color: inherit;
    text-decoration: none;
}

.artplayer-video-page .artplayer-person-value a:hover {
    color: var(--color-primary, #2563eb);
}

/* Description / Content */
.artplayer-video-page .artplayer-section-title {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #0f172a;
    border-left: 4px solid var(--color-primary, #2563eb);
    padding-left: 12px;
}

.artplayer-video-page .artplayer-video-desc {
    color: #64748b;
    font-size: 1.05rem;
    line-height: 1.8;
}

.artplayer-video-page .artplayer-download-section {
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border, #e5e7eb);
}

.artplayer-video-page .artplayer-download-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.artplayer-video-page .artplayer-download-item {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--color-border, #e5e7eb);
    background: var(--color-bg-light, #f1f5f9);
    border-radius: 10px;
}

.artplayer-video-page .artplayer-download-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--color-primary, #2563eb);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
}

.artplayer-video-page .artplayer-download-size {
    color: #64748b;
    font-size: 0.9rem;
}

.artplayer-video-page .artplayer-download-actions {
    margin-left: auto;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.artplayer-video-page .artplayer-download-copy,
.artplayer-video-page .artplayer-download-open {
    border: 1px solid var(--color-border, #e5e7eb);
    background: #ffffff;
    color: var(--color-text, #1f2937);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.artplayer-video-page .artplayer-download-open {
    background: var(--color-primary, #2563eb);
    border-color: var(--color-primary, #2563eb);
    color: #fff;
}

.artplayer-video-page .artplayer-download-copy:hover {
    border-color: var(--color-primary, #2563eb);
    color: var(--color-primary, #2563eb);
}

.artplayer-video-page .artplayer-download-open:hover {
    background: var(--color-primary-dark, #1d4ed8);
    border-color: var(--color-primary-dark, #1d4ed8);
}

.artplayer-video-page .artplayer-download-toast {
    position: fixed;
    left: 50%;
    bottom: 40px;
    transform: translateX(-50%) translateY(8px);
    background: rgba(15, 23, 42, 0.9);
    color: #ffffff;
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 0.9rem;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    z-index: 9999;
}

.artplayer-video-page .artplayer-download-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

html.dark-mode .artplayer-video-page,
html.dark-mode .artplayer-video-page .artplayer-template-wrapper,
[data-theme="dark"] .artplayer-video-page,
[data-theme="dark"] .artplayer-video-page .artplayer-template-wrapper {
    background-color: var(--dm-bg, #0f172a);
    color: var(--dm-text, #e2e8f0);
}

html.dark-mode .artplayer-video-page .artplayer-template-hero,
[data-theme="dark"] .artplayer-video-page .artplayer-template-hero {
    background: var(--dm-bg, #0f172a);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

html.dark-mode .artplayer-video-page .artplayer-video-info-card,
[data-theme="dark"] .artplayer-video-page .artplayer-video-info-card {
    background: var(--dm-bg-card, #111827);
    border-color: var(--dm-border, #1f2937);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

html.dark-mode .artplayer-video-page .artplayer-video-title,
html.dark-mode .artplayer-video-page .artplayer-section-title,
html.dark-mode .artplayer-video-page .artplayer-person-value,
[data-theme="dark"] .artplayer-video-page .artplayer-video-title,
[data-theme="dark"] .artplayer-video-page .artplayer-section-title,
[data-theme="dark"] .artplayer-video-page .artplayer-person-value {
    color: var(--dm-text, #e2e8f0);
}

html.dark-mode .artplayer-video-page .artplayer-video-rating-badge,
[data-theme="dark"] .artplayer-video-page .artplayer-video-rating-badge {
    background: linear-gradient(135deg, #fb7185 0%, #e11d48 100%);
    color: #fff;
    box-shadow: 0 6px 14px rgba(225, 29, 72, 0.35);
}

html.dark-mode .artplayer-video-page .artplayer-video-meta-row,
html.dark-mode .artplayer-video-page .artplayer-video-desc,
html.dark-mode .artplayer-video-page .artplayer-tag,
html.dark-mode .artplayer-video-page .artplayer-person-label,
[data-theme="dark"] .artplayer-video-page .artplayer-video-meta-row,
[data-theme="dark"] .artplayer-video-page .artplayer-video-desc,
[data-theme="dark"] .artplayer-video-page .artplayer-tag,
[data-theme="dark"] .artplayer-video-page .artplayer-person-label {
    color: var(--dm-text-muted, #94a3b8);
}

html.dark-mode .artplayer-video-page .artplayer-video-update-date,
[data-theme="dark"] .artplayer-video-page .artplayer-video-update-date {
    color: var(--dm-text-muted, #94a3b8);
}

html.dark-mode .artplayer-video-page .artplayer-video-header,
[data-theme="dark"] .artplayer-video-page .artplayer-video-header {
    border-bottom-color: var(--dm-border, #1f2937);
}

html.dark-mode .artplayer-video-page .artplayer-download-section,
[data-theme="dark"] .artplayer-video-page .artplayer-download-section {
    border-top-color: var(--dm-border, #1f2937);
}

html.dark-mode .artplayer-video-page .artplayer-download-item,
[data-theme="dark"] .artplayer-video-page .artplayer-download-item {
    background: var(--dm-bg-card, #111827);
    border-color: var(--dm-border, #1f2937);
}

html.dark-mode .artplayer-video-page .artplayer-download-size,
[data-theme="dark"] .artplayer-video-page .artplayer-download-size {
    color: var(--dm-text-muted, #94a3b8);
}

html.dark-mode .artplayer-video-page .artplayer-download-copy,
[data-theme="dark"] .artplayer-video-page .artplayer-download-copy {
    background: rgba(15, 23, 42, 0.6);
    color: var(--dm-text, #e2e8f0);
    border-color: var(--dm-border, #1f2937);
}

html.dark-mode .artplayer-video-page .artplayer-download-open,
[data-theme="dark"] .artplayer-video-page .artplayer-download-open {
    background: var(--color-primary, #2563eb);
    border-color: var(--color-primary, #2563eb);
    color: #fff;
}

html.dark-mode .artplayer-video-page .artplayer-download-toast,
[data-theme="dark"] .artplayer-video-page .artplayer-download-toast {
    background: rgba(15, 23, 42, 0.95);
}

.artplayer-video-page .artplayer-video-desc p {
    margin-bottom: 1.5em;
}

/* Responsive */
@media (max-width: 768px) {
    .artplayer-video-page .artplayer-video-page-inner {
        padding: 12px 16px 32px;
    }

    .artplayer-video-page .artplayer-video-info-card {
        padding: 25px;
    }

    .artplayer-video-page .artplayer-video-info {
        flex-direction: column;
        gap: 20px;
    }

    .artplayer-video-page .artplayer-video-poster {
        flex: 0 0 auto;
        max-width: 180px;
        margin: 0 auto;
    }

    .artplayer-video-page .artplayer-video-title {
        font-size: 1.8rem;
    }

    .artplayer-video-page .artplayer-video-title-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
    }

    .artplayer-video-page .artplayer-video-update-date {
        text-align: center;
    }

    .artplayer-video-page .artplayer-download-actions {
        margin-left: 0;
        width: 100%;
    }
}

/* ========================================
   HD Badge & Interaction Buttons
   ======================================== */

.artplayer-actions-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* HD Badge */
.artplayer-video-page .artplayer-hd-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 800;
    line-height: 1;
    padding: 6px 10px;
    border-radius: 6px;
    /* margin-right: 8px; Removed to use gap */
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Interaction Buttons */
.artplayer-video-page .artplayer-btn-interaction {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #334155;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    /* margin-left: 10px; Removed to use gap */
    vertical-align: middle;
    outline: none;
    line-height: 1.2;
}

.artplayer-video-page .artplayer-btn-interaction:hover {
    background: var(--color-border, #e2e8f0);
    transform: translateY(-1px);
    color: var(--color-primary, #2563eb);
}

.artplayer-video-page .artplayer-btn-interaction:active {
    transform: translateY(0);
}

.artplayer-video-page .artplayer-btn-interaction svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    stroke-width: 2px;
}

/* Active State (Liked/Favorited) */
.artplayer-video-page .artplayer-btn-interaction.is-active {
    background: rgba(239, 68, 68, 0.1);
    /* Red tint */
    color: #ef4444;
    /* Red color */
    border-color: rgba(239, 68, 68, 0.2);
}

.artplayer-video-page .artplayer-btn-interaction.is-active[data-type="like"] {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
}

.artplayer-video-page .artplayer-btn-interaction.is-active[data-type="favorite"] {
    background: rgba(245, 158, 11, 0.1);
    /* Amber tint */
    color: #f59e0b;
    /* Amber */
    border-color: rgba(245, 158, 11, 0.2);
}

.artplayer-video-page .artplayer-btn-interaction.is-active svg {
    transform: scale(1.15);
    fill: currentColor;
}

/* Interaction Count */
.artplayer-video-page .ds-interaction-count {
    font-size: 0.85rem;
    font-weight: 500;
}

/* Dark Mode Support */
html.dark-mode .artplayer-video-page .artplayer-btn-interaction,
[data-theme="dark"] .artplayer-video-page .artplayer-btn-interaction {
    background: rgba(255, 255, 255, 0.05);
    /* Slightly lighter than dark bg */
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--dm-text, #e2e8f0);
}

html.dark-mode .artplayer-video-page .artplayer-btn-interaction:hover,
[data-theme="dark"] .artplayer-video-page .artplayer-btn-interaction:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

html.dark-mode .artplayer-video-page .artplayer-btn-interaction.is-active[data-type="like"],
[data-theme="dark"] .artplayer-video-page .artplayer-btn-interaction.is-active[data-type="like"] {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}

html.dark-mode .artplayer-video-page .artplayer-btn-interaction.is-active[data-type="favorite"],
[data-theme="dark"] .artplayer-video-page .artplayer-btn-interaction.is-active[data-type="favorite"] {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .artplayer-video-page .artplayer-btn-interaction {
        margin-left: 6px;
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    .artplayer-video-page .artplayer-hd-badge {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
}
