/* Inherit from portal-style mostly, adding specific reel styles */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    /* Premium UEFA Night Match style background */
    background: radial-gradient(circle at top left, #1a2a47 0%, #0d1524 50%, #05080e 100%);
    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(13, 21, 36, 0.9), transparent);
    z-index: 2000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    box-sizing: border-box;
    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);
}

/* Tabs UI Container */
.tab-content {
    width: 100%;
    height: 100%;
}

/* Native iOS Dark Mode Tab Bar */
.bottom-tab-bar {
    position: fixed;
    bottom: 60px; /* Sits above the 60px external ad banner space */
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 500px;
    height: 55px; /* iOS standard height */
    background: rgba(28, 28, 30, 0.85); /* iOS Dark Mode overlay color */
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 2000;
    border-top: 0.5px solid rgba(255, 255, 255, 0.15); /* iOS ultra-thin top border */
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.b-tab {
    background: none;
    border: none;
    color: #8E8E93; /* iOS system gray for inactive state */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
    font-size: 10px; /* Standard iOS nav text sizing */
    font-weight: 500;
    width: 50%;
    height: 100%;
    position: relative;
    padding-top: 4px;
    transition: none; /* No color fade delays on iOS */
}

/* We remove the divider because iOS does not use dividers between tabs */
.b-tab:first-child {
    border-right: none;
}

.b-tab .icon {
    font-size: 1.6rem;
    margin-bottom: 2px;
    filter: grayscale(100%) opacity(0.6); /* Desaturates emojis to look like inactive gray iOS icons */
}

.b-tab.active {
    color: #0A84FF; /* iOS Dark Mode Blue active state */
}

.b-tab.active .icon {
    filter: grayscale(0%) opacity(1); /* Brings back full vibrance to emoji for active state */
}

/* Remove bottom indicators, iOS strictly relies on color */
.b-tab::after {
    display: none;
}

/* Tab 1 Articles Layout Controller */
#tab-articles {
    position: absolute;
    top: 60px !important;
    bottom: 115px !important; /* Forces bounding box to end right before Tab Bar (60 ad + 55 tab bar) */
    left: 0;
    width: 100%;
    height: auto !important; /* Denies external script sizing */
    overflow-y: scroll;
    background: transparent;
}

/* Reels Container */
.reels-container {
    position: absolute;
    top: 60px !important; /* Just below header */
    bottom: 115px !important; /* Absolutely force it to end above tab bar (115px) */
    left: 0;
    width: 100%;
    height: auto !important; /* Ignore JS global resizers */
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    background: transparent;
}

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

.reel {
    width: 100%;
    height: 100%; 
    scroll-snap-align: start;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Force video and text to the absolute bottom against the tab bar */
    align-items: center;
    background: transparent;
}

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

.yt-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: auto;
}

.swipe-hint {
    position: fixed;
    bottom: 130px;
    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: rgba(13, 21, 36, 0.85); /* Semi-transparent blue */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    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;
}
