/* ============================================================
   IPTV Manager Pro — Flash Sale CSS  v3.7
   - Fixed top bar at very top of browser window
   - Transparent full-page particle canvas
   - NO modal, NO dark background overlay
   ============================================================ */

/* ── Screen shake keyframe ─────────────────────────────────── */
@keyframes iptv-shake {
    0%,100% { transform: translate(0,0) rotate(0deg); }
    10%      { transform: translate(-4px, -3px) rotate(-0.4deg); }
    20%      { transform: translate(4px,  3px) rotate(0.4deg); }
    30%      { transform: translate(-5px, 2px) rotate(-0.3deg); }
    40%      { transform: translate(5px, -2px) rotate(0.3deg); }
    50%      { transform: translate(-3px, 4px) rotate(-0.2deg); }
    60%      { transform: translate(3px, -4px) rotate(0.2deg); }
    70%      { transform: translate(-4px, 1px) rotate(-0.1deg); }
    80%      { transform: translate(4px, -1px) rotate(0.1deg); }
    90%      { transform: translate(-2px, 2px) rotate(0deg); }
}
body.iptv-shake {
    animation: iptv-shake 0.65s cubic-bezier(.36,.07,.19,.97) both;
}

/* ── Body offset when bar is visible ──────────────────────── */
:root { --iptv-topbar-h: 64px; }
body.iptv-topbar-active {
    padding-top: var(--iptv-topbar-h) !important;
    transition: padding-top 0.3s ease;
}

/* ── Full-page transparent particle canvas ────────────────── */
.iptv-topbar-canvas {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    pointer-events: none !important;   /* clicks pass through */
    z-index: 999998 !important;
    display: none;
}

/* ── Flash Sale Top Bar ────────────────────────────────────── */
.iptv-topbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 999999 !important;
    background: linear-gradient(90deg, #1a0000 0%, #3d0000 30%, #7a0000 50%, #3d0000 70%, #1a0000 100%);
    border-bottom: 2px solid #ff2d2d;
    box-shadow: 0 0 30px rgba(255,45,45,0.6), 0 4px 20px rgba(0,0,0,0.8);
    display: none;
    animation: iptv-topbar-slide-in 0.5s cubic-bezier(0.22,1,0.36,1) forwards;
    overflow: hidden;
}

@keyframes iptv-topbar-slide-in {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}

/* Animated red glow line at bottom of bar */
.iptv-topbar::after {
    content: '';
    position: absolute;
    bottom: 0; left: -100%;
    width: 300%; height: 2px;
    background: linear-gradient(90deg, transparent, #ff2d2d, #ff9900, #ffe066, #ff9900, #ff2d2d, transparent);
    animation: iptv-bar-line 2.5s linear infinite;
}
@keyframes iptv-bar-line {
    from { left: -100%; }
    to   { left: 100%; }
}

/* ── Bar inner layout ─────────────────────────────────────── */
.iptv-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    max-width: 100%;
    gap: 12px;
    position: relative;
    z-index: 1;
}

/* ── Left: FLASH SALE text + lightning bolts ──────────────── */
.iptv-topbar-left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.iptv-tb-bolt {
    font-size: 28px;
    color: #ffe066;
    text-shadow: 0 0 12px #ffcc00, 0 0 24px #ff9900;
    animation: iptv-bolt-pulse 0.8s ease-in-out infinite alternate;
    line-height: 1;
}
.iptv-tb-bolt-l { animation-delay: 0s; }
.iptv-tb-bolt-r { animation-delay: 0.4s; }

@keyframes iptv-bolt-pulse {
    from { transform: scale(1);    opacity: 0.8; }
    to   { transform: scale(1.25); opacity: 1;   }
}

.iptv-tb-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}
.iptv-tb-flash {
    font-size: 18px;
    font-weight: 900;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(255,255,255,0.6);
}
.iptv-tb-sale {
    font-size: 22px;
    font-weight: 900;
    color: #ffe066;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 14px #ffcc00, 0 0 28px #ff9900;
    animation: iptv-sale-glow 1.2s ease-in-out infinite alternate;
}
@keyframes iptv-sale-glow {
    from { text-shadow: 0 0 10px #ffcc00, 0 0 20px #ff9900; }
    to   { text-shadow: 0 0 20px #ffe066, 0 0 40px #ffcc00, 0 0 60px #ff4400; }
}

.iptv-tb-drop-banner {
    background: #dc2626;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 3px;
    white-space: nowrap;
    box-shadow: 0 0 10px rgba(220,38,38,0.7);
    margin-left: 4px;
}

/* ── Center: headline + CTA ───────────────────────────────── */
.iptv-topbar-center {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    justify-content: center;
    min-width: 0;
}

.iptv-tb-fire {
    font-size: 24px;
    animation: iptv-fire-shake 0.5s ease-in-out infinite alternate;
    flex-shrink: 0;
}
@keyframes iptv-fire-shake {
    from { transform: rotate(-8deg) scale(1); }
    to   { transform: rotate(8deg)  scale(1.15); }
}

.iptv-tb-headline {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

.iptv-tb-cta {
    background: linear-gradient(135deg, #ff4400, #ff9900);
    color: #fff;
    border: none;
    border-radius: 24px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.5px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 0 16px rgba(255,100,0,0.7);
    animation: iptv-cta-pulse 1.5s ease-in-out infinite;
    transition: transform 0.15s ease;
}
.iptv-tb-cta:hover { transform: scale(1.06); }
@keyframes iptv-cta-pulse {
    0%,100% { box-shadow: 0 0 12px rgba(255,100,0,0.6); }
    50%      { box-shadow: 0 0 28px rgba(255,150,0,1), 0 0 50px rgba(255,60,0,0.5); }
}

/* ── Right: countdown ─────────────────────────────────────── */
.iptv-topbar-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.iptv-tb-timer-label {
    font-size: 9px;
    font-weight: 700;
    color: #ff9900;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.iptv-tb-timer {
    display: flex;
    align-items: center;
    gap: 4px;
}

.iptv-tb-td {
    background: rgba(0,0,0,0.6);
    border: 1px solid #ff2d2d;
    border-radius: 6px;
    padding: 4px 10px;
    text-align: center;
    min-width: 44px;
    box-shadow: 0 0 8px rgba(255,45,45,0.5);
}
.iptv-tb-td span {
    display: block;
    font-size: 22px;
    font-weight: 900;
    color: #ffffff;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 8px rgba(255,255,255,0.5);
}
.iptv-tb-td small {
    font-size: 9px;
    color: #ff9900;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.iptv-tb-tsep {
    font-size: 22px;
    font-weight: 900;
    color: #ff2d2d;
    animation: iptv-sep-blink 1s step-end infinite;
    text-shadow: 0 0 8px #ff2d2d;
}
@keyframes iptv-sep-blink {
    0%,100% { opacity: 1; }
    50%      { opacity: 0.2; }
}

/* ── Close button ─────────────────────────────────────────── */
.iptv-tb-close {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    border-radius: 50%;
    width: 28px; height: 28px;
    font-size: 13px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
    line-height: 1;
    padding: 0;
}
.iptv-tb-close:hover { background: rgba(255,45,45,0.5); }

/* ── Expired state ────────────────────────────────────────── */
.iptv-topbar.expired {
    background: linear-gradient(90deg, #111, #222);
    border-bottom-color: #555;
    box-shadow: none;
}

/* ════════════════════════════════════════════════════════════
   PRICING TABLE — FLASH STATE OVERRIDES
   (applied to .iptv-plan-box when flash sale is active)
   ════════════════════════════════════════════════════════════ */

/* Crossed-out original price */
.iptv-price-original {
    display: none;
    font-size: 14px;
    color: #aaa;
    text-decoration: line-through;
    text-align: center;
    margin-bottom: 2px;
}
.iptv-price-original .iptv-currency-orig {
    font-size: 11px;
    vertical-align: super;
}

/* Flash price glow */
.iptv-price.flash-active .iptv-price-val {
    color: #39ff14 !important;
    text-shadow: 0 0 20px #39ff14, 0 0 40px #00ff00 !important;
    animation: iptv-price-land 0.4s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes iptv-price-land {
    0%   { transform: scale(1.5); opacity: 0.5; }
    60%  { transform: scale(0.95); }
    100% { transform: scale(1); opacity: 1; }
}

/* FLASH PRICE badge */
.iptv-price-drop-badge {
    display: none;
    background: #dc2626;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 4px;
    margin: 4px auto 0;
    text-align: center;
    box-shadow: 0 0 10px rgba(220,38,38,0.8);
    animation: iptv-badge-pop 0.35s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes iptv-badge-pop {
    from { transform: scale(0); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

/* Card ignite glow */
.iptv-plan-box.flash-ignited {
    border-color: #ff4400 !important;
    box-shadow: 0 0 30px rgba(255,68,0,0.5), 0 0 60px rgba(255,68,0,0.2) !important;
    animation: iptv-card-ignite 0.5s ease both;
}
@keyframes iptv-card-ignite {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.03); }
    100% { transform: scale(1); }
}

/* Buy Now button flash state */
.iptv-subscribe-btn.flash-btn {
    background: linear-gradient(135deg, #ff4400, #ff9900) !important;
    box-shadow: 0 0 20px rgba(255,100,0,0.7) !important;
    animation: iptv-btn-pulse 1.5s ease-in-out infinite !important;
}
@keyframes iptv-btn-pulse {
    0%,100% { box-shadow: 0 0 12px rgba(255,100,0,0.5); }
    50%      { box-shadow: 0 0 30px rgba(255,150,0,1), 0 0 50px rgba(255,60,0,0.4); }
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
    .iptv-topbar-inner { flex-wrap: wrap; padding: 8px 12px; gap: 8px; }
    .iptv-tb-headline  { font-size: 12px; }
    .iptv-tb-flash     { font-size: 14px; }
    .iptv-tb-sale      { font-size: 17px; }
    .iptv-tb-cta       { padding: 6px 12px; font-size: 11px; }
    .iptv-tb-td span   { font-size: 18px; }
}
@media (max-width: 480px) {
    .iptv-topbar-center { display: none; }
    .iptv-topbar-inner  { justify-content: space-between; }
}
