/* --- 1. CORE VARIABLES --- */
:root {
    --myg-accent: #0073aa;    /* Main brand color */
    --myg-sub: #ff0000;       /* YouTube red */
    --myg-bg: #ffffff;        /* Pure white background */
    --myg-text: #0f0f0f;      /* Near-black text */
    --myg-text-light: #606060;/* Gray text for metadata */
    --myg-border: #efefef;    /* Subtle flat borders */
    --myg-radius: 12px;       /* Modern rounded corners */
}

.myg-master-wrapper { 
    width: 100%; 
    background: var(--myg-bg);
    font-family: "Roboto", "Inter", -apple-system, sans-serif;
    color: var(--myg-text);
}

/* --- 2. HEADER & NAVIGATION (Minimalist Underline Style) --- */
.myg-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--myg-border);
    margin-bottom: 32px;
    padding-bottom: 0;
}

.myg-nav { 
    display: flex; 
    gap: 24px; 
}

.myg-nav a {
    text-decoration: none;
    padding: 16px 4px;
    color: var(--myg-text-light);
    font-weight: 600;
    font-size: 14px;
    position: relative;
    transition: color 0.2s ease;
    background: transparent !important; /* Flat look: no boxes */
}

.myg-nav a:hover {
    color: var(--myg-text);
}

.myg-nav a.is-active {
    color: var(--myg-accent);
}

/* The Active Indicator Line */
.myg-nav a.is-active::after {
    content: '';
    position: absolute;
    bottom: -1px; 
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--myg-accent);
    border-radius: 3px 3px 0 0;
}

/* Subscribe Button (Flat & Bold) */
.myg-sub-btn {
    text-decoration: none; 
    padding: 10px 20px; 
    background: var(--myg-sub);
    color: #fff !important; 
    font-weight: 700; 
    border-radius: 40px; /* Pill shape */
    font-size: 13px;
    letter-spacing: 0.5px;
    transition: transform 0.2s, background 0.2s;
}

.myg-sub-btn:hover {
    background: #cc0000;
    transform: scale(1.03);
}

/* --- 3. GRID & CARDS --- */
.myg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.myg-card { 
    background: transparent;
    transition: transform 0.3s ease;
}

/* The Thumbnail Container (Facade) */
.myg-facade { 
    position: relative; 
    aspect-ratio: 16/9; 
    cursor: pointer; 
    background: #000; 
    border-radius: var(--myg-radius);
    overflow: hidden; /* Clips the zoom effect */
}

.is-short .myg-facade { 
    aspect-ratio: 9/16; 
    max-width: 260px;
    margin: 0 auto;
}

.myg-facade img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover Zoom Effect */
.myg-card:hover .myg-facade img {
    transform: scale(1.08);
}

/* Play Button (Clean Minimal) */
.myg-play-btn {
    position: absolute; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%);
    width: 48px; 
    height: 48px; 
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.myg-card:hover .myg-play-btn {
    opacity: 1;
}

.myg-play-btn::after {
    content: ''; 
    position: absolute; 
    top: 50%; 
    left: 55%; 
    transform: translate(-50%, -50%);
    border-style: solid; 
    border-width: 7px 0 7px 12px; 
    border-color: transparent transparent transparent #fff;
}

/* Info Section */
.myg-info { padding: 12px 0; }

.myg-info h3 { 
    margin: 0; 
    font-size: 16px; 
    line-height: 1.4; 
    color: var(--myg-text); 
    font-weight: 600;
    display: -webkit-box; 
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical; 
    overflow: hidden; 
}

/* --- 4. LIGHTBOX & PAGINATION --- */
.myg-pagination { 
    display: flex; 
    justify-content: center; 
    gap: 12px; 
    margin-top: 48px; 
}

.myg-nav-item {
    text-decoration: none; 
    padding: 10px 24px; 
    border: 1px solid var(--myg-border);
    color: var(--myg-text);
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.2s;
}

.myg-nav-item:hover { background: var(--myg-border); }

/* Fullscreen Lightbox */
.myg-lb { 
    position: fixed; inset: 0; 
    background: rgba(255,255,255,0.98); /* White lightbox for flat look */
    z-index: 999999; 
    display: none; 
    align-items: center; 
    justify-content: center; 
    padding: 40px; 
}

.myg-lb.active { display: flex; }

.myg-lb-content { width: 100%; max-width: 1200px; }

.myg-vid-box { 
    position: relative; 
    padding-bottom: 56.25%; 
    height: 0; 
    box-shadow: 0 30px 60px rgba(0,0,0,0.15);
    background: #000;
}

.myg-vid-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 8px; }

.myg-close { 
    position: absolute; top: 24px; right: 32px; 
    color: var(--myg-text); font-size: 40px; 
    cursor: pointer; font-weight: 200;
}

/* --- 5. RESPONSIVE --- */
@media (max-width: 768px) {
    .myg-header-row { flex-direction: column; align-items: flex-start; padding-bottom: 15px; }
    .myg-sub-btn { order: -1; align-self: flex-end; margin-bottom: 10px; }
    .myg-nav { width: 100%; justify-content: space-between; gap: 0; }
    .myg-nav a { padding: 12px 10px; font-size: 13px; }
}

/* --- 6. SKELETON LOADING STATE (OPTIONAL) --- */
.myg-skeleton {
    background: #f0f0f0;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: myg-shimmer 1.5s infinite;
}

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