:root {
    --netflix-red: #E50914;
    --witch-purple: #2D0B5A;
    --glitch-color-1: #ff00ff;
    --glitch-color-2: #00ffff;
}

body {
    font-family: 'Noto Sans TC', 'Inter', sans-serif;
    background-color: #050505;
    color: white;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

/* --- Animations & Effects --- */

.glitch-text {
    position: relative;
    animation: glitch 3s infinite;
}

@keyframes glitch {
    0% {
        text-shadow: 2px 0 var(--glitch-color-1), -2px 0 var(--glitch-color-2);
    }

    5% {
        text-shadow: -2px 0 var(--glitch-color-1), 2px 0 var(--glitch-color-2);
    }

    10% {
        text-shadow: 2px 0 var(--glitch-color-1), -2px 0 var(--glitch-color-2);
    }

    15% {
        text-shadow: 0 0 white;
    }

    100% {
        text-shadow: 0 0 white;
    }
}

.scanline {
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    position: absolute;
    top: 0;
    left: 0;
    z-index: 50;
    pointer-events: none;
    animation: scanline 4s linear infinite;
}

@keyframes scanline {
    0% {
        top: 0;
    }

    100% {
        top: 100%;
    }
}

.noise-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://www.transparenttextures.com/patterns/carbon-fibre.png');
    opacity: 0.05;
    pointer-events: none;
    z-index: 100;
}

.glass-panel {
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
}

/* --- Live Stream / Cyberpunk UI --- */
.live-badge {
    background-color: #E50914;
    color: white;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 2px;
    font-size: 10px;
    letter-spacing: 1px;
    animation: pulse-red 2s infinite;
}

.ui-mono {
    font-family: 'Courier New', Courier, monospace;
    letter-spacing: 1px;
}

@keyframes pulse-red {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

.grid-bg {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* --- Opening Credit / Cinema Frame Effect --- */
.cinema-frame {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.8) 0%, rgba(10, 10, 10, 0.95) 100%);
    padding: 2rem;
}

.cinema-frame::before,
.cinema-frame::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: var(--netflix-red);
    border-style: solid;
    opacity: 0.8;
}

.cinema-frame::before {
    top: -1px;
    left: -1px;
    border-width: 3px 0 0 3px;
}

.cinema-frame::after {
    bottom: -1px;
    right: -1px;
    border-width: 0 3px 3px 0;
}

.bg-blur-deep {
    backdrop-filter: blur(40px) brightness(0.3);
    -webkit-backdrop-filter: blur(40px) brightness(0.3);
}

.tt-font {
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 900;
}

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-netflix {
    background-color: var(--netflix-red);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-netflix:active {
    transform: scale(0.95);
    filter: brightness(0.8);
}

/* --- Layout specific --- */
.safe-area-bottom {
    padding-bottom: env(safe-area-inset-bottom);
}

#error-popup {
    backdrop-filter: blur(20px) brightness(0.5);
    -webkit-backdrop-filter: blur(20px) brightness(0.5);
}

/* UI Overrides for Mobile */
@media (max-width: 767px) {
    .mobile-full-height {
        height: 100vh;
        height: -webkit-fill-available;
    }
}

/* --- Redesigned Error Popup --- */
.shape-rect {
    position: absolute;
    border-radius: 12px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.shape-blue {
    background: linear-gradient(135deg, rgba(20, 30, 100, 0.6), rgba(10, 20, 80, 0.2));
    box-shadow: 0 0 40px rgba(20, 30, 100, 0.3);
}

.shape-red {
    background: linear-gradient(135deg, rgba(220, 20, 20, 0.5), rgba(150, 10, 10, 0.1));
    box-shadow: 0 0 40px rgba(220, 20, 20, 0.3);
}

@keyframes float-slow {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(2deg);
    }
}

@keyframes float-reverse {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(15px) rotate(-2deg);
    }
}

.animate-float {
    animation: float-slow 6s ease-in-out infinite;
}

.animate-float-slow {
    animation: float-slow 8s ease-in-out infinite;
}

.animate-float-reverse {
    animation: float-reverse 7s ease-in-out infinite;
}

@keyframes blink-random {

    0%,
    100% {
        opacity: 1;
    }

    10% {
        opacity: 0.2;
    }

    20% {
        opacity: 1;
    }

    30% {
        opacity: 0.2;
    }

    40% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }

    60% {
        opacity: 1;
    }

    70% {
        opacity: 0;
    }

    80% {
        opacity: 1;
    }
}

.animate-blink {
    animation: blink-random 2s steps(1, end) infinite;
}

/* --- Mobile Landing Page Redesign --- */

/* Layer 1 & 2: Background & Atmosphere */
.bg-cover-center {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.fx-vignette {
    /* More dramatic vignette for atmosphere */
    background: radial-gradient(circle at center, transparent 20%, rgba(0, 0, 0, 0.5) 70%, rgba(0, 0, 0, 0.9) 100%);
}

.fx-noise {
    position: relative;
    overflow: hidden;
}

.fx-noise::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    right: -50%;
    bottom: -50%;
    width: 200%;
    height: 200%;
    background: url('https://raw.githubusercontent.com/iceable/bayer-matrix-dithering/master/transparent-noise.png') repeat;
    background-size: 250px 250px;
    animation: noise-move 0.2s infinite steps(2);
    opacity: 0.1;
    pointer-events: none;
}

@keyframes noise-move {
    0% {
        transform: translate(0, 0);
    }

    10% {
        transform: translate(-5px, -5px);
    }

    20% {
        transform: translate(-10px, 5px);
    }

    30% {
        transform: translate(5px, -10px);
    }

    40% {
        transform: translate(-5px, 15px);
    }

    50% {
        transform: translate(-10px, 5px);
    }

    60% {
        transform: translate(15px, 0);
    }

    70% {
        transform: translate(0, 10px);
    }

    80% {
        transform: translate(-15px, 0);
    }

    90% {
        transform: translate(10px, 5px);
    }

    100% {
        transform: translate(5px, 0);
    }
}

.fx-scanlines {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.3));
    background-size: 100% 4px;
    animation: scanline-scroll 30s linear infinite;
    opacity: 0.12;
    pointer-events: none;
}

@keyframes scanline-scroll {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 0 100%;
    }
}

/* Layer 3: Glitch Title */
.title-glitch {
    position: relative;
    display: inline-block;
    color: white;
}

.title-glitch::before,
.title-glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
}

.title-glitch::before {
    left: 2px;
    text-shadow: -2px 0 #E50914;
    /* Red shift */
    clip-path: inset(44% 0 61% 0);
    animation: glitch-anim-1 2s infinite linear alternate-reverse;
}

.title-glitch::after {
    left: -2px;
    text-shadow: -2px 0 #00ffff;
    /* Cyan shift */
    clip-path: inset(50% 0 30% 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
    0% {
        clip-path: inset(80% 0 10% 0);
        transform: translate(2px, -3px);
    }

    20% {
        clip-path: inset(10% 0 70% 0);
        transform: translate(-2px, 3px);
    }

    40% {
        clip-path: inset(40% 0 40% 0);
        transform: translate(2px, 2px);
    }

    60% {
        clip-path: inset(70% 0 10% 0);
        transform: translate(-2px, -2px);
    }

    80% {
        clip-path: inset(20% 0 80% 0);
        transform: translate(2px, 3px);
    }

    100% {
        clip-path: inset(50% 0 30% 0);
        transform: translate(-2px, 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip-path: inset(15% 0 85% 0);
        transform: translate(-2px, 2px);
    }

    20% {
        clip-path: inset(85% 0 15% 0);
        transform: translate(2px, -2px);
    }

    40% {
        clip-path: inset(30% 0 60% 0);
        transform: translate(-2px, 0);
    }

    60% {
        clip-path: inset(60% 0 30% 0);
        transform: translate(2px, 2px);
    }

    80% {
        clip-path: inset(45% 0 45% 0);
        transform: translate(-2px, -3px);
    }

    100% {
        clip-path: inset(10% 0 80% 0);
        transform: translate(2px, -2px);
    }
}

.fx-flicker {
    animation: flicker 4s infinite;
}

@keyframes flicker {

    0%,
    18%,
    22%,
    25%,
    53%,
    57%,
    100% {
        opacity: 1;
    }

    20%,
    24%,
    55% {
        opacity: 0.8;
    }
}

/* Layer 4: Breathing Text */
.fx-breathing {
    animation: breathing 5s ease-in-out infinite;
}

@keyframes breathing {

    0%,
    100% {
        opacity: 0.85;
    }

    50% {
        opacity: 1;
    }
}

/* Bottom Black Area with Gradient - Smoother transition */
.bottom-area-gradient {
    background: linear-gradient(to top,
            rgba(0, 0, 0, 1) 0%,
            rgba(0, 0, 0, 0.98) 40%,
            rgba(0, 0, 0, 0.85) 60%,
            rgba(0, 0, 0, 0.4) 80%,
            transparent 100%);
}

/* CTA Button Refinement */
.btn-cta {
    background: white;
    color: black;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-cta:active {
    transform: scale(0.96);
    filter: brightness(0.9);
}

/* Decoration lines for CTA */
.decor-line {
    height: 1px;
    background: white;
    opacity: 0.6;
}

/* Responsive constraints for the landing content */
.landing-container {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-top: max(40px, env(safe-area-inset-top));
    padding-bottom: max(40px, env(safe-area-inset-bottom));
}

/* No FX State */
body.no-fx * {
    animation: none !important;
    text-shadow: none !important;
}

body.no-fx .fx-noise::before,
body.no-fx .fx-scanlines {
    display: none;
}

/* Vertical Stripe Pattern for shapes */
.pattern-lines {
    background-image: repeating-linear-gradient(90deg,
            rgba(255, 255, 255, 0.1) 0px,
            rgba(255, 255, 255, 0.1) 1px,
            transparent 1px,
            transparent 4px);
}

.shape-rect {
    position: absolute;
    border-radius: 12px;
    backdrop-filter: blur(4px);
    /* Reduced blur for clearer edges */
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Darker, flatter shapes like in the reference */
.shape-blue {
    background: rgba(10, 20, 80, 0.8);
    box-shadow: 0 0 20px rgba(10, 20, 80, 0.5);
}

.shape-red {
    background: rgba(180, 20, 20, 0.7);
    box-shadow: 0 0 20px rgba(180, 20, 20, 0.5);
}

/* Gradient block in reference (top right blue, bottom right blue, etc) */
.shape-gradient-blue {
    background: linear-gradient(180deg, rgba(10, 20, 60, 0.9) 0%, rgba(10, 30, 150, 0.5) 100%);
}

.shape-gradient-red {
    background: linear-gradient(180deg, rgba(150, 20, 20, 0.8) 0%, rgba(200, 50, 50, 0.4) 100%);
}

/* --- Redesigned Quiz UI --- */

.shadow-red-glow {
    text-shadow: 0 0 20px rgba(229, 9, 20, 0.6);
}

.quiz-glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    /* Double border effect using box-shadow and border */
    border: 1px solid rgba(255, 255, 255, 0.53);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.05),
        /* Inner faint border */
        0 0 30px rgba(0, 0, 0, 0.5);
    /* Outer shadow */
}

.shadow-glow {
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

/* Option Button Specifics */
.option-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: bold;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.option-btn:active {
    transform: scale(0.97);
}

/* 選中時的流光背景 (Before) */
.option-btn.selected::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.15),
            transparent);
    animation: flow-shine 3s infinite;
    z-index: 1;
}

/* 選中時的外部邊框呼吸發光 (After) */
.option-btn.selected::after {
    content: '';
    position: absolute;
    inset: -2px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 9999px;
    animation: border-pulse 2s ease-in-out infinite;
    pointer-events: none;
    z-index: 2;
}

@keyframes flow-shine {
    0% {
        transform: translateX(-100%) skewX(-20deg);
    }

    50% {
        transform: translateX(100%) skewX(-20deg);
    }

    100% {
        transform: translateX(100%) skewX(-20deg);
    }
}

@keyframes border-pulse {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

/* RESULT PAGE v2 */
.result-btn-v2 {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 60px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #E50914;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    position: relative;
    text-decoration: none;
}

.result-btn-v2:active {
    transform: scale(0.95);
    background: rgba(229, 9, 20, 0.1);
}

.result-btn-v2:hover {
    box-shadow: 0 0 25px rgba(229, 9, 20, 0.4);
    border-color: #ff1f2d;
}

/* Corner Decorations */
.corner-tl,
.corner-tr,
.corner-bl,
.corner-br {
    position: absolute;
    width: 8px;
    height: 8px;
    border-color: #E50914;
    border-style: solid;
    transition: all 0.3s ease;
    pointer-events: none;
}

.corner-tl {
    top: -1px;
    left: -1px;
    border-width: 3px 0 0 3px;
}

.corner-tr {
    top: -1px;
    right: -1px;
    border-width: 3px 3px 0 0;
}

.corner-bl {
    bottom: -1px;
    left: -1px;
    border-width: 0 0 3px 3px;
}

.corner-br {
    bottom: -1px;
    right: -1px;
    border-width: 0 3px 3px 0;
}

.result-btn-v2:hover .corner-tl {
    transform: translate(-2px, -2px);
}

.result-btn-v2:hover .corner-tr {
    transform: translate(2px, -2px);
}

.result-btn-v2:hover .corner-bl {
    transform: translate(-2px, 2px);
}

.result-btn-v2:hover .corner-br {
    transform: translate(2px, 2px);
}

@import url('pc_landing_styles.css');
/* =========================================
   PC Landing Page Styles (New)
   ========================================= */

/* Main Container Layout */
.pc-landing {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background-color: #000;
    overflow: hidden;
    /* Flex layout handled by Tailwind classes in HTML: hidden md:flex */
    display: none;
    /* Default hidden */
    flex-direction: row;
}

@media (min-width: 768px) {
    .pc-landing {
        display: flex;
    }
}

/* --- Left Column --- */
.pc-left {
    flex: 0 0 45%;
    min-width: 500px;
    background-color: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    z-index: 10;
    position: relative;
}

.pc-logo {
    height: 55px;
    object-fit: contain;
    margin-bottom: 1.5rem;
}

.pc-title {
    width: 80%;
    max-width: 400px;
    height: auto;
    margin-bottom: 1rem;
}

.pc-subtitle {
    font-size: 1.25rem;
    color: #E50914;
    font-weight: 700;
    letter-spacing: 0.15em;
    margin-bottom: 3rem;
}

/* --- Right Column --- */
.pc-right {
    flex: 1;
    position: relative;
    height: 100vh;
}

.pc-right-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}




/* --- QR Code Card (Cyberpunk/Netflix Style) --- */
.pc-qr-card {
    position: relative;
    width: 320px;
    padding: 30px 20px 20px 20px;
    /* Top padding for SCAN_TARGET label */
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid rgba(229, 9, 20, 0.4);
    /* Faint red border */
    box-shadow: 0 0 20px rgba(229, 9, 20, 0.15);
    /* Red glow */
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.pc-qr-card:hover {
    transform: scale(1.02);
    box-shadow: 0 0 30px rgba(229, 9, 20, 0.3);
}

/* Noise Overlay (Using SVG Filter for White Noise) */
.pc-qr-noise {
    position: absolute;
    inset: 0;
    opacity: 0.3;
    /* Adjusted for visibility */
    background: #000;
    filter: url(#pc-white-noise);
    pointer-events: none;
    z-index: 1;
}

/* Previous pc-noise keyframes removed as animation is now handled by SVG seed */

/* Scanline Animation */
.pc-qr-scanline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(229, 9, 20, 0.6);
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.8);
    opacity: 0.6;
    animation: pc-scan 3s linear infinite;
    z-index: 2;
    pointer-events: none;
}

@keyframes pc-scan {
    0% {
        top: -5%;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        top: 105%;
        opacity: 0;
    }
}

/* Corner Decorations (L-shapes) */
.pc-corner {
    position: absolute;
    width: 15px;
    height: 15px;
    border-color: #E50914;
    border-style: solid;
    z-index: 3;
    pointer-events: none;
}

.pc-corner-tl {
    top: 3px;
    left: 3px;
    border-width: 3px 0 0 3px;
}

.pc-corner-tr {
    top: 3px;
    right: 3px;
    border-width: 3px 3px 0 0;
}

.pc-corner-bl {
    bottom: 3px;
    left: 3px;
    border-width: 0 0 3px 3px;
}

.pc-corner-br {
    bottom: 3px;
    right: 3px;
    border-width: 0 3px 3px 0;
}

/* Labels */
.pc-qr-label {
    position: absolute;
    font-family: 'Courier New', monospace;
    font-size: 10px;
    letter-spacing: 1px;
    z-index: 3;
}

.pc-qr-label-top {
    top: 10px;
    right: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.pc-qr-label-bottom {
    bottom: 5px;
    left: 12px;
    color: rgba(229, 9, 20, 0.8);
}

/* White QR Container */
.pc-qr-white {
    background: #fff;
    padding: 10px;
    border-radius: 4px;
    /* Box shadow to lift it slightly from dark bg */
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    z-index: 5;
    margin-bottom: 10px;
    margin-top: 10px;
}

/* Make sure the qrcodejs container fits */
#qrcode-container {
    width: 200px;
    height: 200px;
}

#qrcode-container img,
#qrcode-container canvas {
    width: 100% !important;
    height: auto !important;
    display: block;
}

/* Bottom Hint Text */
.pc-qr-hint {
    text-align: center;
    z-index: 5;
}

.pc-qr-hint p {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    line-height: 1.4;
}