/* Inherit from portal-style mostly, adding specific reel styles */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background: #000;
    overflow: hidden;
    font-family: 'Outfit', sans-serif;
    color: white;
}

.kr-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent);
    z-index: 2000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    pointer-events: auto;
}

.back-btn {
    text-decoration: none;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.8);
}

.kr-title {
    font-weight: 800;
    letter-spacing: 1px;
    font-size: 1.1rem;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.8);
}

/* Category Tabs */
.tabs-container {
    position: fixed;
    top: 55px; /* Sits just under the header */
    left: 0;
    width: 100%;
    z-index: 1500;
    display: flex;
    overflow-x: auto;
    padding: 10px 15px;
    gap: 10px;
    /* Optional slight gradient backdrop */
    background: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent);
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

.tabs-container::-webkit-scrollbar { 
    display: none; 
}

.tab-btn {
    padding: 8px 18px;
    border-radius: 25px;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(40,40,45,0.6);
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: capitalize;
    backdrop-filter: blur(5px);
}

.tab-btn.active {
    background: #4facfe;
    border-color: #4facfe;
    color: #fff;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
    transform: scale(1.05);
}

/* Reels Container */
.reels-container {
    position: absolute;
    top: 110px; /* Exact height to clear header + tabs */
    bottom: 60px; /* Locks exactly above the 60px ad space */
    left: 0;
    width: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    background: #000;
}

.reels-container::-webkit-scrollbar {
    display: none;
}

.reel {
    width: 100%;
    height: 100%; /* Now perfectly scales to the fixed container */
    scroll-snap-align: start;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #000;
}

/* Container locking the YouTube iframe to Shorts dimensions */
.yt-container {
    width: 100%;
    flex: 1; /* Take up available vertical space */
    max-width: 500px;
    position: relative;
}

/* Optional wrapper overlay to handle scrolling on top of iframe */
.scroll-overlay {
    position: absolute;
    top: 15%;
    bottom: 25%;
    left: 0;
    right: 0;
    z-index: 100;
    /* Keep the center clear for Play/Pause touches on the iFrame, but catch edge swipes */
    /* Many users prefer direct iframe interaction, so we use pointer-events cautiously or transparent masks */
    pointer-events: none; 
}

.yt-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: auto; /* Allows user to interact with standard YT controls */
}


.swipe-hint {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    z-index: 1000;
    opacity: 0.9;
    text-shadow: 0 2px 10px rgba(0,0,0,1);
    pointer-events: none;
    animation: pmgBounce 2.5s infinite ease-in-out;
}

.swipe-hint span {
    font-weight: 800;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

@keyframes pmgBounce {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, -15px); }
}

.swipe-arrow {
    font-size: 2rem;
    margin-top: -5px;
}

/* Meta Data Formatting */
.reel-meta {
    width: 100%;
    max-width: 500px;
    padding: 12px 15px;
    background: #0a0a0c;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-sizing: border-box;
    text-align: left;
}

.reel-title {
    margin: 0 0 4px 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.reel-date {
    font-size: 0.75rem;
    color: #888;
    font-weight: 600;
}
