.alert-viewport {
    position: relative;
    width: 1000px;
    height: 400px;
    transform: scale(0.6);
    display: flex;
    justify-content: center;
    font-family: 'Teko', sans-serif;
    text-transform: uppercase;
    margin-top: -50px;
    animation: flicker 0.15s infinite; /* CRT Flicker activated */
}

.trapezoid,
.score-block,
.alert-script {
    opacity: 0;
    /* Hidden by default for sequenced entry */
}

/* 1. Player 1 Entry (Right to Left) */
@keyframes p1Entry {
    from {
        opacity: 0;
        transform: translateX(300px) skewX(-15deg);
    }

    to {
        opacity: 1;
        transform: translateX(0) skewX(-15deg);
    }
}

/* 2. Player 2 Entry (Left to Right) */
@keyframes p2Entry {
    from {
        opacity: 0;
        transform: translateX(-300px) skewX(-15deg);
    }

    to {
        opacity: 1;
        transform: translateX(0) skewX(-15deg);
    }
}

/* 3. Score & Action Pop */
@keyframes scorePop {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes actionPop {
    from {
        opacity: 0;
        transform: translateY(20px) skewX(-15deg);
    }

    to {
        opacity: 1;
        transform: translateY(0) skewX(-15deg);
    }
}

.trapezoid {
    position: absolute;
    background: #000;
    border: 1px solid #333;
    transform: skewX(-15deg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Prevent glitch lines from overflowing */
}

.trap-content {
    transform: skewX(15deg);
    white-space: nowrap;
}

/* 1. Header Block */
.header-block {
    top: -10px;
    left: 20%;
    /* Center it so it grows symmetrically */
    transform: translateX(-110%) skewX(-15deg);
    /* Adjusted for the overall layout shift */
    width: auto;
    min-width: 200px;
    padding: 0 25px;
    height: 40px;
    background: #000;
    border-bottom: 2px solid var(--accent);
    z-index: 10;
}

.header-block .trap-content {
    font-size: 20px;
    letter-spacing: 3px;
    color: white;
    font-weight: 700;
}

/* 2. Player 1 Block */
.player1-block {
    top: 30px;
    left: 170px;
    height: 100px;
    width: 440px;
    background: #111;
    border-left: 10px solid var(--accent);
    box-shadow: -10px 0 20px rgba(0, 0, 0, 0.5);
    justify-content: flex-start;
    padding-left: 60px;
    z-index: 5;
}

.player1-block .trap-content {
    font-size: 36px;
    line-height: 0.9;
    font-weight: 700;
    text-align: center;
}

/* 3. Status Tag (Flexible) - Placed below Player 2 */
.status-tag {
    position: absolute;
    top: 105px;
    /* Below P2 */
    left: 720px;
    /* Aligned with P2's end or center? Let's try 560px */
    transform: skewX(-15deg);
    background: #f59e0b;
    color: #000;
    padding: 2px 15px;
    z-index: 25;
    font-weight: 900;
    font-size: 16px;
    letter-spacing: 1px;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    border-left: 3px solid #fff;
    opacity: 0;
}

@keyframes statusPop {
    from {
        opacity: 0;
        transform: translateY(10px) skewX(-15deg) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) skewX(-15deg) scale(1);
    }
}

/* 4. Score Block (Chamfered Corners with Border) */
.score-block {
    top: 60px;
    left: 410px;
    height: 120px;
    width: 200px;
    background: #fff;
    z-index: 20;
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    clip-path: polygon(30px 0, 100% 0, 100% calc(100% - 30px), calc(100% - 30px) 100%, 0 100%, 0 30px);
    box-shadow: 0 0 50px var(--accent-glow);
    padding: 3px;
}

.score-block-inner {
    width: 100%;
    height: 100%;
    background: var(--accent);
    display: flex;
    clip-path: polygon(28px 0, 100% 0, 100% calc(100% - 28px), calc(100% - 28px) 100%, 0 100%, 0 28px);
    justify-content: center;
    position: relative;
    overflow: hidden; /* Clip glitch inside score */
}

.score-block .trap-content {
    font-size: 82px;
    font-weight: 900;
    color: #000;
    letter-spacing: -2px;
    transform: none;
}

/* 5. Player 2 Block */
.player2-block {
    top: 125px;
    left: 410px;
    height: 100px;
    width: 442px;
    background: #09090b;
    border-right: 4px solid var(--accent);
    box-shadow: 10px 0 20px rgba(0, 0, 0, 0.5);
    justify-content: flex-end;
    padding-right: 30px;
    z-index: 5;
}

.player2-block .trap-content {
    font-size: 36px;
    line-height: 0.9;
    color: #71717a;
    font-weight: 700;
    text-align: center;
}

/* 8. Eliminated Tag */
.eliminated-tag {
    display: inline-block;
    background: #ef4444;
    color: white;
    font-size: 10px;
    padding: 1px 6px;
    vertical-align: middle;
    margin-left: 8px;
    border-radius: 2px;
    font-weight: 900;
    letter-spacing: 0.5px;
    transform: skewX(15deg);
    /* Counter-skew because it's inside a skewed container */
}

/* 6. Footer Block */
.footer-block {
    top: 225px;
    left: 545px;
    width: 240px;
    height: 40px;
    border-top: 2px solid var(--accent);
    background: linear-gradient(180deg, #18181b 0%, #000 100%);
    z-index: 10;
}

.footer-block .trap-content {
    font-size: 20px;
    letter-spacing: 5px;
    color: var(--accent);
    font-weight: 700;
}

/* Fighting Champions Script */
.alert-script {
    top: 40px;
    transform: translateX(-50%) rotate(-2deg);
    font-family: 'Permanent Marker', cursive;
    font-size: 20px;
    color: white;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
    letter-spacing: 1px;
    z-index: 30;
}

/* Extra Decorator Sparks */
.spark {
    position: absolute;
    background: var(--accent);
    width: 6px;
    height: 6px;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.s1 {
    top: 10%;
    right: -20px;
    transform: rotate(45deg);
}

.s2 {
    bottom: 20%;
    left: -30px;
    transform: rotate(-30deg);
}

.acc-top {
    top: -10px;
    left: 0;
}

/* Animation Assignments with inverted sequence */
.score-block {
    animation: scorePop 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.2s;
}

.player1-block {
    animation: p1Entry 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.8s;
}

.player2-block {
    animation: p2Entry 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.8s;
}

.status-tag {
    animation: statusPop 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 1.4s;
}

.header-block,
.footer-block {
    animation: scorePop 0.5s ease forwards;
    animation-delay: 1.8s;
}

/* 10. Interference Sweep Effect */
.alert-content {
    position: absolute;
    inset: 0;
}

.glitch-layer {
    z-index: 110;
    pointer-events: none;
    opacity: 0.8;
    /* Subtle distortion */
    transform: translateX(8px) skewX(1.5deg);
    filter: brightness(1.8) contrast(1.2);
    /* The sweep animation */
    clip-path: inset(0 0 100% 0); /* Hidden by default */
    animation: interferenceSweep 5s infinite linear;
}

@keyframes interferenceSweep {
    0% { clip-path: inset(0 0 100% 0); }
    10% { clip-path: inset(5% 0 92% 0); }
    20% { clip-path: inset(15% 0 82% 0); }
    30% { clip-path: inset(25% 0 72% 0); }
    40% { clip-path: inset(35% 0 62% 0); }
    50% { clip-path: inset(45% 0 52% 0); }
    60% { clip-path: inset(55% 0 42% 0); }
    70% { clip-path: inset(65% 0 32% 0); }
    80% { clip-path: inset(75% 0 22% 0); }
    90% { clip-path: inset(85% 0 12% 0); }
    100% { clip-path: inset(95% 0 0% 0); }
}

.scanlines, .glitch-line {
    display: none;
}

@keyframes flicker {
    0% { opacity: 0.99; }
    50% { opacity: 1; }
    100% { opacity: 0.99; }
}

/* Undulation Effect for Shattered Edges */
@keyframes shatterWobble {

    0%,
    100% {
        clip-path: polygon(11% 0, 100% 0, 92% 93%, 80% 89%, 72% 100%, 54% 88%, 40% 99%, 27% 90%, 0 100%, 6% 59%, 0 50%, 9% 19%);
    }

    33% {
        clip-path: polygon(12% 2%, 98% 0, 90% 90%, 82% 92%, 70% 98%, 56% 90%, 42% 97%, 25% 92%, 2% 98%, 8% 62%, 2% 48%, 10% 22%);
    }

    66% {
        clip-path: polygon(10% 0, 100% 2%, 94% 95%, 78% 87%, 74% 100%, 52% 86%, 38% 100%, 29% 88%, 0 100%, 4% 56%, 0 52%, 8% 16%);
    }
}