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

body {
    background-color: #0a0a0a;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    min-height: 100vh;
    position: relative;
}

/* Subtle grain texture overlay - FIXED: removed opacity to prevent black iframe bug */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    /* Use opacity in SVG data URI instead of CSS opacity to avoid stacking context */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    isolation: isolate;
}

.container {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

header {
    text-align: center;
    margin-bottom: 60px;
    padding: 40px 20px;
}

.title {
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    color: #ff4444;
    text-shadow: 0 0 20px rgba(255, 68, 68, 0.3);
    margin-bottom: 20px;
}

.subtitle {
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: #888888;
    font-weight: 300;
    font-style: italic;
    letter-spacing: 0.02em;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(325px, 400px));
    gap: 40px;
    padding: 20px;
    justify-items: center;
    justify-content: center;
}

.video-embed {
    width: 100%;
    display: flex;
    justify-content: center;
    position: relative;
    min-height: 740px;
}

/* Loading skeleton - FIXED: moved behind iframe with z-index -1 */
.video-embed::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 325px;
    height: 740px;
    background: linear-gradient(90deg, #1a1a1a 25%, #252525 50%, #1a1a1a 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
    z-index: -1; /* FIXED: moved behind iframe so it doesn't cover content */
    pointer-events: none;
}

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

.tiktok-embed {
    max-width: 400px !important;
    min-width: 325px !important;
    position: relative;
    z-index: 1;
    /* FIXED: Start with visibility hidden instead of opacity 0 to prevent black iframe */
    animation: fadeIn 0.6s ease-in forwards;
    animation-delay: 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0.01; /* FIXED: avoid opacity:0 which can cause black iframe during animation */
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 20px 10px;
    }

    header {
        margin-bottom: 40px;
        padding: 20px 10px;
    }

    .video-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 10px;
    }
}
