/* assets/style.css */
:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #38bdf8;
    --success: #22c55e;
    --disabled: #475569;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    padding: 40px 20px;
    display: flex;
    justify-content: center;
}

.container {
    max-width: 700px;
    width: 100%;
    background: var(--card-bg);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

h1 {
    font-size: 2rem;
    margin-bottom: 25px;
    letter-spacing: -0.5px;
}

.stats-bar {
    display: flex;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    font-size: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-bar strong {
    color: var(--primary);
}

.mission-box {
    text-align: left;
    margin-bottom: 25px;
}

.mission-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.mission-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.progress-container {
    background: #334155;
    border-radius: 9999px;
    height: 12px;
    width: 100%;
    margin: 15px 0 25px 0;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary), var(--success));
    height: 100%;
    width: 0%; /* Dynamic */
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn {
    width: 100%;
    background: var(--primary);
    color: #0f172a;
    border: none;
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.1s, background 0.2s;
}

.btn:hover:not(:disabled) {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn:active:not(:disabled) {
    transform: translateY(1px);
}

.btn:disabled {
    background: var(--disabled);
    color: var(--text-muted);
    cursor: not-allowed;
}

.video-box {
    margin-top: 35px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    background: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Video Grid Section Layout */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 40px;
    padding: 10px;
    text-align: left;
}

/* Individual Video Card Container */
.video-card {
    background: transparent;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Thumbnail wrapper with fixed 16:9 aspect ratio */
.thumbnail-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
}

.thumbnail-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card:hover .thumbnail-wrapper img {
    transform: scale(1.03);
}

/* Badges (Premium / Sponsored overlay tags) */
.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    z-index: 2;
    letter-spacing: 0.5px;
}

.badge.premium {
    background: #f59e0b; /* Amber yellow color */
    color: #000;
}

.badge.sponsored {
    background: #059669; /* Green emerald color */
    color: #fff;
}

/* Video Info Block (Avatar + Meta Details) */
.video-info {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

/* Platform platform indicators (YT, MP4 circle badges) */
.platform-avatar {
    width: 36px;
    height: 36px;
    background: #334155;
    color: #94a3b8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    flex-shrink: 0;
}

.meta-details {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.video-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #f8fafc;
    margin: 0 0 3px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-desc {
    font-size: 0.85rem;
    color: #94a3b8;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==========================================================================
   THEATER MODE POPUP MODAL STYLES (Pure CSS - No Tailwind Required)
   ========================================================================== */

/* Fullscreen overlay screen container */
.theater-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(12px); /* Beautiful glassy backdrop blur effect */
    -webkit-backdrop-filter: blur(12px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

/* Hidden utility helper rule */
.theater-overlay.hidden {
    display: none !important;
}

/* Modal Inner Card Layout Box */
.theater-content {
    position: relative;
    width: 100%;
    max-width: 896px; /* Roughly 4xl constraint limits */
    background-color: #121212;
    border: 1px solid #272727;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    margin: auto;
}

/* Close Circular Button Styling */
.theater-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 50;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #a1a1aa;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.theater-close-btn:hover {
    background-color: #27272a;
    color: #ffffff;
}

.theater-close-btn svg {
    width: 16px;
    height: 16px;
}

/* Dedicated Aspect-Ratio Video Screen Frame */
.theater-player-box {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Description Text Card Padding Block */
.theater-meta-block {
    padding: 24px;
    border-top: 1px solid #272727;
    text-align: left;
}

.badge-row {
    margin-bottom: 8px;
}

/* Dynamic Inner Modal Badge Adjustments */
#modalVideoBadge.premium-badge {
    display: inline-block !important;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(90deg, #f59e0b, #d97706);
    color: #000;
    padding: 3px 10px;
    border-radius: 6px;
}

#modalVideoBadge.sponsored-badge {
    display: inline-block !important;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(90deg, #10b981, #059669);
    color: #fff;
    padding: 3px 10px;
    border-radius: 6px;
}

/* Modal text headers typography */
.theater-modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    margin: 4px 0;
    line-height: 1.4;
}

.theater-modal-channel {
    font-size: 0.8rem;
    color: #71717a;
    margin: 0;
    font-weight: 500;
}