/* ============================================
   Pw_Ent_tv YouTube Widget - Dark Theme v3.1
   ============================================ */

.pwent-yt-widget,
.pwent-yt-widget *,
.pwent-yt-widget *::before,
.pwent-yt-widget *::after {
    box-sizing: border-box;
}

.pwent-yt-widget {
    font-family: 'Sarabun', 'Noto Sans Thai', 'Segoe UI', sans-serif;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    background: #111 !important;
    width: 100%;
    margin: 0;
    padding: 0;
}

.pwent-yt-widget p {
    margin: 0 !important;
    padding: 0 !important;
}

.pwent-yt-widget a::after,
.pwent-yt-widget a::before {
    content: '' !important;
    display: none !important;
}

/* ---------- Video Frame 16:9 ---------- */
.pwent-yt-frame-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    background: #000 !important;
    overflow: hidden;
}

.pwent-yt-frame-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* ---------- LIVE Badge ---------- */
.pwent-yt-live-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 5px;
    background: #FF0000;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 9px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255,0,0,0.5);
    animation: livePulse 2s ease-in-out infinite;
}

.pwent-yt-live-dot {
    width: 7px;
    height: 7px;
    background: #fff;
    border-radius: 50%;
    animation: liveDotBlink 1s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { box-shadow: 0 2px 8px rgba(255,0,0,0.5); }
    50%      { box-shadow: 0 2px 16px rgba(255,0,0,0.9); }
}

@keyframes liveDotBlink {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.3; }
}

/* ---------- Placeholder ---------- */
.pwent-yt-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #000 !important;
    color: #aaa;
    padding: 40px 24px;
    font-size: 13px;
    min-height: 180px;
}

.pwent-yt-placeholder svg {
    width: 48px;
    height: 48px;
    fill: #FF0000;
    opacity: 0.7;
    margin-bottom: 12px;
}

/* ---------- Info Section (Dark) ---------- */
.pwent-yt-info {
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a) !important;
    padding: 12px 14px 14px !important;
    position: relative;
    overflow: hidden;
}

.pwent-yt-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #FF0000, #ff6b6b, #FF0000);
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ---------- Channel Row ---------- */
.pwent-yt-channel-row {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 10px;
}

.pwent-yt-avatar {
    width: 32px;
    height: 32px;
    background: #FF0000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    animation: avatarPulse 3s ease-in-out infinite;
}

.pwent-yt-avatar svg {
    width: 16px;
    height: 16px;
    fill: #fff;
    display: block;
}

@keyframes avatarPulse {
    0%, 100% { box-shadow: 0 0 0 2px rgba(255,255,255,0.1), 0 0 0 4px rgba(255,0,0,0.3); }
    50%      { box-shadow: 0 0 0 2px rgba(255,255,255,0.15), 0 0 0 8px rgba(255,0,0,0); }
}

.pwent-yt-channel-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.pwent-yt-channel-name {
    font-weight: 700 !important;
    font-size: 13px !important;
    color: #fff !important;
    line-height: 1.2 !important;
}

.pwent-yt-channel-handle {
    font-size: 10px !important;
    color: #888 !important;
}

/* ---------- Tagline ---------- */
.pwent-yt-tagline {
    font-size: 11px !important;
    color: #aaa !important;
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    margin: 0 0 12px !important;
}

.pwent-yt-arrow {
    font-size: 8px;
    color: #FF0000;
    flex-shrink: 0;
    display: inline-block;
}

/* ---------- Subscribe Button ---------- */
.pwent-yt-subscribe {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    width: 100% !important;
    padding: 9px 10px !important;
    background: linear-gradient(135deg, #FF0000, #cc0000) !important;
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    border-radius: 6px !important;
    position: relative !important;
    overflow: hidden !important;
    transition: transform 0.12s, box-shadow 0.12s !important;
    animation: btnGlow 2.5s ease-in-out infinite;
    border: 0 !important;
    box-sizing: border-box !important;
}

@keyframes btnGlow {
    0%, 100% { box-shadow: 0 3px 10px rgba(255,0,0,0.35); }
    50%      { box-shadow: 0 3px 18px rgba(255,0,0,0.65); }
}

.pwent-yt-subscribe::before {
    content: '' !important;
    position: absolute !important;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    animation: shine 2.5s ease-in-out infinite;
    pointer-events: none;
    display: block !important;
}

@keyframes shine {
    0%        { left: -75%; }
    60%, 100% { left: 125%; }
}

.pwent-yt-subscribe:hover {
    transform: translateY(-1px) !important;
    color: #fff !important;
    text-decoration: none !important;
}

.pwent-yt-subscribe:active {
    transform: scale(0.96) !important;
}

.pwent-yt-bell {
    display: inline-block;
    animation: bellRing 3s ease-in-out infinite;
    transform-origin: top center;
    font-size: 14px;
}

@keyframes bellRing {
    0%, 100%   { transform: rotate(0); }
    10%, 30%   { transform: rotate(12deg); }
    20%, 40%   { transform: rotate(-12deg); }
    50%        { transform: rotate(0); }
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
    .pwent-yt-info { padding: 10px 12px 12px !important; }
    .pwent-yt-channel-name { font-size: 12px !important; }
    .pwent-yt-subscribe { font-size: 12px !important; padding: 8px 10px !important; }
}
