/* ================================
   CatAmMain - Video + Sky + Skyline
   ================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
    background: #000;
}

/* Protection */
body {
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

video { pointer-events: none; }

body.devtools-open .video-container,
body.devtools-open .sky-background,
body.screenshot-protection .video-container,
body.screenshot-protection .sky-background,
body.focus-protection .video-container,
body.focus-protection .sky-background {
    filter: blur(20px);
}

.protection-warning {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.warning-content {
    background: linear-gradient(145deg, #1a0a2e, #0a0a0f);
    border: 2px solid #d4af37;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
}

.warning-icon { font-size: 4rem; margin-bottom: 15px; }
.warning-content h3 { font-size: 1.8rem; color: #ff6b00; margin-bottom: 10px; }
.warning-content p { color: rgba(255,255,255,0.8); margin-bottom: 20px; }
.warning-content button {
    background: linear-gradient(145deg, #ff6b00, #ff3300);
    border: none;
    color: white;
    padding: 12px 30px;
    font-size: 1rem;
    border-radius: 25px;
    cursor: pointer;
}

.watermark-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    opacity: 0;
    display: flex;
    flex-wrap: wrap;
    transform: rotate(-30deg) scale(1.5);
}

.watermark-overlay span {
    color: rgba(255, 107, 0, 0.2);
    font-size: 2rem;
    padding: 30px;
}

body.screenshot-protection .watermark-overlay { opacity: 1; }

@media print { body * { display: none !important; } }

/* ================================
   Sky/Space Background - Dark Black + Red/Orange
   ================================ */
.sky-background {
    position: fixed;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(ellipse at 50% 15%, rgba(180, 50, 0, 0.3) 0%, transparent 40%),
        radial-gradient(ellipse at 30% 25%, rgba(255, 80, 0, 0.15) 0%, transparent 35%),
        radial-gradient(ellipse at 70% 20%, rgba(200, 60, 0, 0.15) 0%, transparent 35%),
        linear-gradient(180deg,
            #000000 0%,
            #050202 15%,
            #0a0303 30%,
            #080202 50%,
            #050101 70%,
            #030101 85%,
            #000000 100%);
}

/* Fire glow effect at top - Red/Orange */
.sky-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    height: 45%;
    background: radial-gradient(ellipse at center top,
        rgba(255, 60, 0, 0.25) 0%,
        rgba(255, 40, 0, 0.15) 25%,
        rgba(200, 30, 0, 0.08) 45%,
        transparent 65%);
    pointer-events: none;
}

/* Additional orange glow */
.sky-background::after {
    content: '';
    position: absolute;
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 35%;
    background: radial-gradient(ellipse,
        rgba(255, 100, 0, 0.12) 0%,
        rgba(255, 70, 0, 0.06) 40%,
        transparent 70%);
    pointer-events: none;
}

/* ================================
   Ember Particles
   ================================ */
.ember-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.ember {
    position: absolute;
    border-radius: 50%;
    animation: ember-rise linear infinite;
    opacity: 0;
}

@keyframes ember-rise {
    0% { opacity: 0; transform: translateY(0); }
    10% { opacity: 1; }
    90% { opacity: 0.3; }
    100% { opacity: 0; transform: translateY(-100vh); }
}

/* ================================
   Video Container - Centered
   ================================ */
.video-container {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 5;
}

.full-video {
    height: 75vh;
    width: auto;
    max-width: 100vw;
    object-fit: contain;
    -webkit-mask-image:
        linear-gradient(to right,
            transparent 0%,
            black 15%,
            black 85%,
            transparent 100%),
        linear-gradient(to bottom,
            black 0%,
            black 85%,
            transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image:
        linear-gradient(to right,
            transparent 0%,
            black 15%,
            black 85%,
            transparent 100%),
        linear-gradient(to bottom,
            black 0%,
            black 85%,
            transparent 100%);
    mask-composite: intersect;
}

/* ================================
   Animated Gaming Elements
   ================================ */
.gaming-elements {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 8;
    overflow: hidden;
}

.game-item {
    position: absolute;
    opacity: 0.7;
    filter: drop-shadow(0 0 10px rgba(255, 100, 0, 0.5));
}

/* Cards */
.card {
    font-size: 2.5rem;
    background: linear-gradient(145deg, #1a1a1a, #2a2a2a);
    padding: 8px 12px;
    border-radius: 8px;
    border: 2px solid rgba(255, 200, 100, 0.3);
    animation: float-card 4s ease-in-out infinite;
}

.card:nth-child(odd) { color: #000; animation-delay: 0s; }
.card:nth-child(even) { color: #ff3333; animation-delay: 0.5s; }
.card:nth-child(3n) { animation-delay: 1s; }
.card:nth-child(4n) { animation-delay: 1.5s; }
.card:nth-child(5n) { animation-delay: 2s; }

@keyframes float-card {
    0%, 100% {
        transform: translateY(0) rotate(-5deg);
    }
    50% {
        transform: translateY(-15px) rotate(5deg);
    }
}

/* Poker Chips */
.chip {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 3px dashed #fff;
    animation: spin-chip 3s linear infinite;
}

.chip-red { background: linear-gradient(145deg, #cc0000, #990000); }
.chip-black { background: linear-gradient(145deg, #222, #444); }
.chip-green { background: linear-gradient(145deg, #006600, #004400); }
.chip-gold { background: linear-gradient(145deg, #d4af37, #aa8800); }

.chip:nth-child(odd) { animation-delay: 0s; }
.chip:nth-child(even) { animation-delay: 0.5s; }
.chip:nth-child(3n) { animation-delay: 1s; }
.chip:nth-child(4n) { animation-delay: 1.5s; }

@keyframes spin-chip {
    0% {
        transform: rotateY(0deg) translateY(0);
    }
    25% {
        transform: rotateY(90deg) translateY(-5px);
    }
    50% {
        transform: rotateY(180deg) translateY(0);
    }
    75% {
        transform: rotateY(270deg) translateY(5px);
    }
    100% {
        transform: rotateY(360deg) translateY(0);
    }
}

/* Dice */
.dice {
    font-size: 2rem;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 100, 0, 0.8);
    animation: roll-dice 2s ease-in-out infinite;
}

.dice:nth-child(odd) { animation-delay: 0s; }
.dice:nth-child(even) { animation-delay: 0.5s; }
.dice:nth-child(3n) { animation-delay: 1s; }

@keyframes roll-dice {
    0%, 100% {
        transform: rotate(0deg) scale(1);
    }
    25% {
        transform: rotate(15deg) scale(1.1);
    }
    50% {
        transform: rotate(0deg) scale(1);
    }
    75% {
        transform: rotate(-15deg) scale(1.1);
    }
}

/* ================================
   City Skyline
   ================================ */
.skyline-container {
    position: fixed;
    bottom: 8%;
    left: 0;
    width: 100%;
    height: 12%;
    z-index: 10;
    pointer-events: none;
}

.city-svg {
    width: 100%;
    height: 100%;
}

.window {
    animation: window-flicker 3s ease-in-out infinite;
}

.window:nth-child(odd) { animation-delay: 0.5s; }
.window:nth-child(even) { animation-delay: 1.2s; }

.tower-light {
    animation: tower-glow 2s ease-in-out infinite;
}

@keyframes window-flicker {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

@keyframes tower-glow {
    0%, 100% { opacity: 0.7; fill: #ffcc00; }
    50% { opacity: 1; fill: #ffff66; }
}

/* ================================
   River Reflection
   ================================ */
.river-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 10%;
    z-index: 10;
    overflow: hidden;
}

.river-reflection {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(255, 120, 40, 0.2) 0%,
        rgba(255, 80, 20, 0.15) 30%,
        rgba(20, 30, 50, 0.5) 100%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0.9; }
}

.river-sparkles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.sparkle {
    position: absolute;
    border-radius: 50%;
    animation: sparkle-twinkle ease-in-out infinite;
}

@keyframes sparkle-twinkle {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* ================================
   Footer
   ================================ */
.footer {
    position: fixed;
    bottom: 3px;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 20;
}

.footer p {
    color: #ffffff;
    font-size: 0.75rem;
    font-family: Arial, sans-serif;
}

/* ================================
   Sound Toggle Button
   ================================ */
.sound-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid #ff6b00;
    background: linear-gradient(145deg, #cc0000, #990000);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    pointer-events: auto;
    box-shadow: 0 0 15px rgba(255, 107, 0, 0.6), 0 0 30px rgba(255, 50, 0, 0.3);
    animation: sound-pulse 1.5s ease-in-out infinite;
}

.sound-toggle:hover {
    transform: scale(1.15);
    box-shadow: 0 0 30px rgba(255, 107, 0, 0.8), 0 0 60px rgba(255, 50, 0, 0.5);
}

.sound-toggle.sound-on {
    background: linear-gradient(145deg, #ff6b00, #cc4400);
    animation: none;
}

@keyframes sound-pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 107, 0, 0.6), 0 0 40px rgba(255, 50, 0, 0.3);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 35px rgba(255, 107, 0, 0.9), 0 0 60px rgba(255, 50, 0, 0.5);
        transform: scale(1.05);
    }
}

/* Sound Guide Dialog */
.sound-guide {
    position: fixed;
    top: 68px;
    right: 12px;
    background: none;
    border: none;
    padding: 6px 10px;
    z-index: 101;
    display: flex;
    align-items: center;
    gap: 6px;
    animation: guide-bounce 1s ease-in-out infinite;
    cursor: pointer;
}

.sound-guide.hidden {
    display: none;
}

.guide-arrow {
    font-size: 1rem;
    animation: arrow-point 0.8s ease-in-out infinite;
}

.guide-text {
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 0.7rem;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 107, 0, 0.5);
}

@keyframes guide-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

@keyframes arrow-point {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

/* ================================
   Responsive
   ================================ */
@media (max-width: 768px) {
    .skyline-container {
        height: 10%;
        bottom: 6%;
    }
    .river-container {
        height: 8%;
    }
}
