﻿/* ===== Base / viewport ===== */
html, body {
    min-height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    font-family: Arial, sans-serif;
    background: #f0f0f0;
    color: #111;
}

/* ===== Headings & text ===== */
h1 {
    text-align: center;
}

p {
    margin: 0;
}

/* ===== Main viewport / slider ===== */
.viewport {
    width: 100vw;
    overflow-x: hidden;
    overflow-y: visible;
}

.page {
    width: 100vw;
    min-height: 100vh;
    flex-shrink: 0;
}

#homePage {
    background: lightblue;
}

/* ===== Dropdowns ===== */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background: white;
    border: 2px solid black;
    border-radius: 8px;
    min-width: 160px;
    z-index: 10;
}

    .dropdown-content a {
        padding: 10px;
        display: block;
        text-decoration: none;
        color: black;
    }

        .dropdown-content a:hover {
            background: #eee;
        }

.dropdown:hover .dropdown-content {
    display: block;
}

/* Button frame */
.button-frame {
    display: inline-block;
    padding: 10px 20px;
    font-size: 16px;
    border: 2px solid black;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    text-decoration: none;
    color: #111;
}

/* ===== Wrapper widths ===== */
.myDiv {
    max-width: 1500px;
    width: 90%;
    margin: 0 auto;
    box-sizing: border-box;
}

/* ===== Bio layout ===== */
.pageContent {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
}

.BioWrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
    box-sizing: border-box;
}

/* ✅ FIXED: was width: fit-content (this broke fbGrid) */
.container {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
}

.LeftSide {
    flex: 0 0 auto;
}

/* IMPORTANT: RightSide must be fluid */
.RightSide {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 1px; /* ✅ prevents rare flex collapse issues */
    box-sizing: border-box;
}

/* ===== Profile ===== */
.myProfilePicture {
    width: 250px !important;
    height: 250px !important;
    display: block;
    margin: 0 auto;
}

.BioLeftSide {
    width: 450px;
    max-width: 100%;
    text-align: center;
    margin: 0 auto;
}

    .BioLeftSide p {
        font-size: 15px;
    }

    .BioLeftSide h1 {
        font-size: 25px;
        font-weight: bold;
    }

/* ===== Midori block ===== */
.myMidori {
    width: 750px;
    height: 600px;
    background: #00ff00;
    overflow: hidden;
    margin: 20px auto;
}

    .myMidori img {
        height: 100%;
        width: auto;
        display: block;
        margin: 0 auto;
    }

/* ===== Carousel ===== */
.carousel {
    width: 100%;
    max-width: 1500px;
    height: 400px;
    margin: 40px auto;
    overflow: hidden;
    background: #444;
    border-radius: 10px;
}

/* When minimized, hide the player area (button still visible) */
#floatingPlayerWrapper.is-minimized #fpContent {
    display: none !important;
}

/* ===== Floating player ===== */
#floatingPlayerWrapper {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 2147483647; /* FIX: make it absolutely top */
    width: 780px;
    display: none;
    background: #111;
    padding: 4px;
    border-radius: 6px;
    isolation: isolate; /* FIX: forces a clean stacking context */
}

/* Player content sits BELOW the button */
#fpContent {
    width: 780px;
    height: 350px;
    position: relative;
    z-index: 0; /* FIX: ensure it's under the button */
}

    #fpContent iframe {
        width: 100%;
        height: 100%;
        display: block;
        position: relative;
        z-index: 0; /* FIX: keep iframe below button */
    }

/* Button sits ABOVE iframe and is clickable */
#fpMinMaxBtn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2147483647; /* FIX: above everything */
    pointer-events: auto;
    cursor: pointer;
    width: 34px;
    height: 34px;
    line-height: 34px;
}

/* ===== Mini video boxes ===== */
.video-container {
    width: 780px;
    max-width: 100%;
    margin: 12px auto;
}

.myVideo {
    width: 780px;
    max-width: 100%;
    height: 350px;
    background: #111;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
}

/* =======================================================================
   FACEBOOK-STYLE IMAGE GRID (13 images: 5 / 5 / 3)
   ======================================================================= */

.fbGrid {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* ✅ ensures the block has some size even if images are slow */
    min-height: 140px;
    /* DEBUG (optional): uncomment to see if fbGrid is present */
    /* outline: 3px solid red; */
}

.fbRow {
    width: 100%;
    display: grid;
    gap: 10px;
    /* ✅ forces consistent row height */
    grid-auto-rows: 140px;
}

.row5 {
    grid-template-columns: repeat(5, 1fr);
}

.row3 {
    grid-template-columns: repeat(3, 1fr);
}

.fbTile {
    width: 100%;
    height: 140px;
    border-radius: 10px;
    overflow: hidden;
    background: #111;
    cursor: pointer;
    /* ✅ prevents tiles collapsing in weird layout cases */
    min-width: 0;
}

    .fbTile img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        pointer-events: none;
    }

/* Responsive */
@media (max-width: 900px) {
    .row5 {
        grid-template-columns: repeat(3, 1fr);
    }

    .row3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 520px) {
    .row5, .row3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =======================================================================
   FULLSCREEN IMAGE VIEWER
   ======================================================================= */

.viewerOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999;
}

    .viewerOverlay.open {
        display: flex;
    }

.viewerBox {
    width: min(1200px, 100%);
    height: min(80vh, 820px);
    background: #000;
    border-radius: 14px;
    overflow: hidden;
}

.viewerImg {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
