html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background: #1b241e;
    background-image: url('images/logo.webp');
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment: fixed;
    background-size: 320px 320px;
    min-height: 100vh;
    color: #fff;
    font-family: Arial, sans-serif;
    -webkit-overflow-scrolling: touch;
    overflow-x: hidden !important;
    max-width: 100vw !important;
    overscroll-behavior-y: contain;
    overscroll-behavior-x: contain;
}
@media (max-width: 500px) {
    body {
        background-size: 65vw 65vw;
    }
}
.no-body-scroll, .no-body-scroll html {
    margin: 0;
    padding: 0;
    width: 100vw;
    min-height: 100vh;
    overflow-x: hidden;
}
body {
    min-height: 100vh;
    box-sizing: border-box;
    overflow-x: hidden !important;
    max-width: 100vw !important;
}
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: hwb(120 20% 71%);
    color: #e6f6db;
    padding: 20px 0 0 0;
    text-align: center;
    border-bottom: 3px solid #35452f;
}
h1 {
    margin: 0;
    font-size: 2em;
    letter-spacing: 1px;
    font-weight: 700;
    color: #e6f6db;
    text-shadow: 0 2px 10px #0006;
    text-align: center;
}
h2, .pavadinimas {
    margin: 0;
    font-size: 2em;
    letter-spacing: 1px;
    font-weight: 700;
    color: #e6f6db;
    text-shadow: 0 2px 10px #0006;
    text-align: center;
}
.banner-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  background: hwb(120 20% 71%);
  padding: 14px 0 12px 0;
  margin: 0 auto;
  position: relative;
}
.new-header-flex {
    display: flex;
    justify-content: space-evenly;  /* equal space between and on sides */
    align-items: center;
    width: 100%;
    background: hwb(120 20% 71%);
    padding: 14px 0 12px 0;
    margin: 0 auto;
}
.new-header-flex button {
    background: transparent;
    border: none;
    cursor: pointer;
    width: 60px;   /* keep it consistent with image width */
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.new-header-flex button {
    background: #42552e;   /* dark square background */
    border: 2px solid #313d25;
    border-radius: 18px;   /* adjust for more/less roundness */
    box-shadow: 0 2px 8px #0002;
    width: 64px;
    height: 64px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, box-shadow 0.15s, transform 0.12s;
}
.new-header-flex button:hover {
    background: #293a16;
    box-shadow: 0 6px 18px #0004;
    transform: scale(1.05);
}
.new-header-flex button img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 12px; /* softens image edges a bit, optional */
}
.news-popup {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.48);
    display: flex; align-items: center; justify-content: center;
    z-index: 10001;
}
.news-popup.hidden { display: none; }
.news-popup-content {
    background: #22301d;
    color: #fff;
    padding: 26px 30px 20px 30px;
    border-radius: 16px;
    min-width: 320px;
    max-width: 95vw;
    box-shadow: 0 4px 18px #0009;
    text-align: left;
    position: relative;
}
.news-text[contenteditable="true"] {
    border: 1px dashed #ffe793;
    background: #191f16;
    min-height: 70px;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 8px;
    white-space:pre-line
}
.news-popup-footer {
    margin-top: 18px;
    font-size: 0.97em;
    color: #ffe793;
}
.close-news-btn {
    margin-top: 18px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    font-weight: bold;
    cursor: pointer;
    float: right;
}
.admin-controls {
    margin: 10px 0 6px 0;
    gap: 6px;
    display: flex;
}
.home-icon-btn,
.user-icon-btn,
.news-btn,
.report-error-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.home-icon-btn svg, .user-icon-btn svg {
    display: block;
}
.user-popup {
    position: absolute;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: #001407;
    color: #e6f6db;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.24);
    padding: 20px 24px 18px 24px;
    min-width: 170px;
    text-align: left;
    z-index: 22;
    border: 1px solid #000000;
    font-size: 1.09em;
    animation: popupShow 0.21s;
}
@keyframes popupShow {
    from { opacity: 0; transform: translateY(-15px);}
    to { opacity: 1; transform: translateY(0);}
}
.user-popup button {
    margin-top: 18px;
    width: 100%;
    background: #56685a;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 7px 0;
    font-size: 1em;
    cursor: pointer;
}

/* --- MAIN MENU, CATEGORIES, SUBCATEGORIES: BUTTONS --- */
.category, .subsection-btn, .main-menu-btn, .subsections-list button, .center-buttons button, .category-btn {
    width: 94vw;
    max-width: 500px;
    min-height: 70px;
    font-size: 1.25em;
    border-radius: 2em;
    background: #273323;
    color: #e6f6db;
    border: none;
    box-shadow: 0 4px 24px #0006;
    font-weight: bold;
    letter-spacing: 1px;
    margin-bottom: 8px;
    transition: background 0.16s, transform 0.12s;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-align: center;
}
.category.row {
    flex-direction: row !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.main-selection button:hover,
.category:hover, .subsection-btn:hover, .category-btn:hover {
    background: #42552e;
    color: #ffe793;
    transform: scale(1.03);
}
.center-buttons, .center-buttons button, .category, .main-selection, .subsections-list, .category-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 8px;
  min-height: 70px;
  border-radius: 1.5em;
  justify-content: center !important;
  text-align: center;
  width: 100%;
  max-width: 100vw;
  min-width: 0;
  flex-wrap: wrap;
  box-sizing: border-box;
  padding-left:8px;
}
.subsection-preview-img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 15px;
    margin-right: 16px;
    box-shadow: 0 2px 8px #0002;
}
.center-buttons, .center-buttons button, .subsections-list button, .main-menu-btn, .category, .category-btn{
    max-width: 96vw;
    width: 100%;
    box-sizing: border-box;
    margin: 6px;
    white-space: normal;
    word-break: break-word;
}
@media (max-width: 480px) {
    .main-selection button,
    .category,
    .subsection-btn {
        font-size: 1.25em;
        min-height: 80px;
    }
}
.hidden { display: none !important; }

/* --- IMAGE BUTTONS --- */
.image-thumb-btn {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    width: 180px;
    min-width: 180px;
    max-width: 180px;
    min-height: 180px;
    max-height: 180px;
    padding: 0;
    background: #2c3e50 !important;
    border: 2px solid #42552e !important;
    margin: 10px;
    box-shadow: 0 4px 16px #0003;
    cursor: pointer;
    border-radius: 1.3em;
    overflow: hidden;
    transition: box-shadow 0.13s, transform 0.12s;
    color: #e6f6db;
}
.image-thumb-btn:hover {
    box-shadow: 0 8px 24px #0006;
    background: #42552e !important;
    color: #ffe793;
    transform: scale(1.04);
}
.image-thumb {
    width: 100%;
    height: 130px;
    object-fit: cover;
    border-radius: 0.9em 0.9em 0 0;
    margin: 0;
    background: #222;
    pointer-events: none;
}
.image-thumb-btn .img-description {
    width: 100%;
    color: #e6f6db;
    font-size: 1em;
    background: #001407;
    padding: 7px 0;
    border-radius: 0 0 1.3em 1.3em;
    text-align: center;
    pointer-events: none;
}

/* --- IMAGES CONTAINER --- */
.images-container {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin: 24px 0 12px 0;
    justify-content: center;
}

/* --- IMAGE MODAL (POPUP) --- */
.image-modal {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed; left: 0; top: 0; width: 100vw; height: 100vh;
    background: rgba(34,46,36,0.95);
    z-index: 1002;
    transition: background 0.15s;
}
.image-modal.hidden { display: none; }
.image-modal-content {
    position: relative;
    background: #f8faef;
    color: #273323;
    padding: 24px 30px 20px 30px;
    border-radius: 18px;
    text-align: center;
    max-width: 96vw;
    max-height: 92vh;
    box-shadow: 0 4px 32px #000c;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: popupShow 0.21s;
}
.image-modal-content img {
    max-width: 90vw;
    max-height: 70vh;
    width: auto;
    height: auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 2px 18px #0003;
    margin-bottom: 18px;
    border: 4px solid #2c3e50;
    background: #fff;
}
.close-modal {
    position: absolute;
    top: 16px;
    right: 24px;
    font-size: 2.2em;
    color: #c0392b;
    cursor: pointer;
    z-index: 1020;
}
body.modal-open {
    overflow: hidden !important;
}
.quiz-image {
  max-width: 350px;
  max-height: 240px;
  border-radius: 14px;
  border: 3px solid #42552e;
  margin-bottom: 10px;
}

/* --- PANEL STYLES (upload, login, quiz, live) --- */
#uploadPanel, #loginPanel, #quizPanel, #entryPanel, .user-popup, .image-modal-content, .livequiz-panel, .livequiz-join-panel {
    background: #001407 !important;
    color: #e6f6db !important;
    border-radius: 16px;
    box-shadow: 0 2px 20px #0003;
    padding: 24px 18px 18px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;      /* horizontal center */
    justify-content: center;  /* vertical center */
}
#loginPanel {
    position: relative;
    z-index: 1001;
}
#uploadPanel input, #loginPanel input, #quizPanel input, #entryPanel input, .livequiz-panel input, .livequiz-join-panel input, textarea, select {
    background: #232d1d;
    color: #fff;
    border: 1.5px solid #42552e;
    border-radius: 6px;
    font-size: 1em;
    padding: 8px 10px;
    margin: 0 auto;
}
#uploadPanel button, #loginPanel button, #quizPanel button, #entryPanel button, .liveqSuiz-panel button, .livequiz-join-panel button {
    background: #42552e;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 0;
    font-size: 1em;
    cursor: pointer;
    width: 100%;
    margin-top: 11px;
    font-weight: 600;
    transition: background .18s;
}
#uploadPanel button:hover, #loginPanel button:hover, #quizPanel button:hover, #entryPanel button:hover, .livequiz-panel button:hover, .livequiz-join-panel button:hover {
    background: #56685a;
}
@media (max-width: 700px) {
    #uploadPanel, #loginPanel, #quizPanel, #entryPanel, .livequiz-panel, .livequiz-join-panel, .image-modal-content {
        max-width: 99vw;
        border-radius: 0;
        box-shadow: none;
        padding: 14px 2vw 14px 2vw;
    }
}
#loginPanel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    background: #001407;
    color: #e6f6db;
    border-radius: 16px;
    box-shadow: 0 2px 20px #000a;
    padding: 32px 24px 24px 24px;
    min-width: 320px;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.close-modal {
    position: absolute;
    top: 16px;
    right: 24px;
    font-size: 2.2em;
    color: #c0392b;
    cursor: pointer;
    z-index: 1020;
}
#modalOverlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
}
/* --- "Back" Button --- */
.back-btn, .back-to-main, .backToSubSections, .backToCategories {
    background: #273323;;
    color: #fff;
    border: none;
    border-radius: 18px;
    padding: 13px 28px;
    font-size: 1.09em;
    font-weight: bold;
    cursor: pointer;
    letter-spacing: 1px;
    margin: 16px 0 26px 0;
    transition: background .18s, transform .12s;
}
.back-btn:hover, .back-to-main:hover, .backToSubSections:hover, .backToCategories:hover {
    background: #001407;
    color: #ffe793;
    transform: scale(1.04);
}
/*ATGAL MYGTUKO PABAIGA*/
/*Video mygtukai*/
.video-btn {
    font-size: 1.15em;
    padding: 18px 38px;
    background: #004217;;
    color: #ffe793;
    border: none;
    border-radius: 14px;
    margin-bottom: 16px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 3px 12px #0003;
    transition: background 0.18s, color 0.18s;
}
.video-btn:hover, .video-btn:focus {
    background: #415c32;
    color: #fff;
}
#videoModal.hidden { display:none !important; }
.subcategory-desc-panel {
  font-size: 1.13em;
  color: #ffffff;
  padding: 12px 16px;
  border-radius: 10px;
  background: #001407;
  min-height: 34px;
  margin-bottom: 12px;
  box-shadow: 0 1px 5px #0001;
  line-height: 1.5;
  word-break: break-word;
}

.video-panele video {
  max-width: 90vw;
  max-height: 70vh;
  width: auto;
  height: auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 2px 18px #0003;
  margin-bottom: 18px;
  border: 4px solid #2c3e50;
  background: #fff;
}
/* --- Instrukcijos --- */
#videoModal {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
#videoModal.hidden {
    display: none !important;
}
.video-modal-inner {
    background: #191919;
    border-radius: 18px;
    padding: 18px 14px;
    max-width: 95vw;
    max-height: 90vh;
    position: relative;
}
#closeVideoModal {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 2em;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
}
#instructionVideo {
    max-width: 90vw;
    max-height: 70vh;
    border-radius: 12px;
}
/* --- video mariaus --- */
.bookmark-label { 
    color:#ffffff;
    font-size:1.12em;
    font-weight:600;
    margin:24px 0 7px 0; 
}
.week-desc { 
    color:#bde48d; 
    margin-left:10px; 
    font-size:1em; 
    font-weight:400;
}
.edit-btn { 
    margin-left:10px; 
    cursor:pointer; 
    color:#ffffff; 
    font-size:.98em; 
    background:none; 
    border:none; }
.save-btn, .cancel-btn { 
    margin-left:7px; 
    font-size:.98em; 
    background:#183e1e; 
    color:#ffffff; border:none; 
    border-radius:6px; padding:3px 11px; 
    cursor:pointer;}
.filter-label {
    color:#ffffff;
    font-size:1em;
    margin-right:8px;
}
.filter-select {
    font-size:1em;
    padding:3px 10px 3px 7px;
    border-radius:6px;
    background:#2c3e50;
    color:#ffffff;
}
/*---- video mariaus PABAIGA --- */
/* --- efektyvus nuotoliai --- */
        .nuotoliai-container { 
            max-width: 100vw;
            overflow-x: auto;
            padding: 18px 2vw 40px 2vw;
            box-sizing: border-box;
        }
        table {
            width: 100%;
            min-width: 0;
            max-width: 100vw;
            table-layout: fixed;
            border-collapse: collapse;
            background: #232d1d;
            color: #e2efde;
            font-size: 1.02em;
            margin-bottom: 32px;
            border-radius: 15px;
            overflow: hidden;
            box-shadow: 0 2px 16px #0005;
            border: 1px solid #444;
        }
        th, td { 
            border-bottom: 2px solid #314326;
            padding: 12px 7px;
            text-align: left;
            word-break: break-word;
            min-width: 0;
            max-width: 100vw;
            box-sizing: border-box;
        }
        th { 
            background: #273323; 
            color: #ffe793; 
            font-weight: bold; 
            font-size: 1.07em; }
        tr:last-child td { 
            border-bottom: none; 
        }

.silpnosios-vietos-page #svUploadPanel {
  background: #001407;
  color: #e6f6db;
  border-radius: 16px;
  box-shadow: 0 2px 20px #0003;
  padding: 24px 18px 18px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  min-width: 200px;
  font-size: 1em;
  position: relative;
  z-index: 10;
}
#svuploadbtn {
    background: #42552e;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 0;
    font-size: 1em;
    cursor: pointer;
    width: 100%;
    margin-top: 11px;
    font-weight: 600;
    transition: background .18s;
}
#svuploadbtn:hover {
    background: #56685a;
}

#svuploadStatus {
    margin-top: 10px;
    font-size: 1em;
    font-weight: 500;
    text-align: center;
}
.stat-green {
    color: #7fff7f;
    font-weight: bold;
}
.stat-red {
    color: #ff5c5c;
    font-weight: bold;
}
.stat-gray {
    color: #bbb;
    font-style: italic;
}
.video-link {
    color: #0048ff;
    font-size: 1.1em;
    text-decoration: underline;
    margin-top: 12px;
    display: inline-block;
    transition: color 0.18s, text-decoration 0.18s;
}
.panel-flex-col {
    display: flex;
    flex-direction: column;
    gap: 12px;           /* LESS space between first/second panels */
    max-width: 820px;
    margin: 0 auto;
    min-height: 300px;
    min-width: 0;
}
.panel-box {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
    margin-bottom: 0;
    background: #22301d;
    border-radius: 18px;
    box-shadow: 0 4px 24px #000a;
    padding: 20px 18px 22px 18px;
    border: 1.5px solid #35452f;
    transition: box-shadow 0.18s;
    overflow: hidden;
}
.panel-box h3 {
    margin-top: 0;
}

.panel-box:last-child {
    margin-bottom: 64px; /* Extra space after the LAST panel (bottom of screen) */
}
#blogPostsList, #videosList {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 8px;
    scroll-behavior: smooth;
}
#blogPostsList::-webkit-scrollbar, #videosList::-webkit-scrollbar {
    width: 8px;
    background: #1b241e;
}
#blogPostsList::-webkit-scrollbar-thumb, #videosList::-webkit-scrollbar-thumb {
    background: #2a4632;
    border-radius: 5px;
}
#customModal {
  position: fixed !important;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.43);
  overflow: auto; /* allow scrolling if needed */
}

/* The inner modal content */
#modalInner {
  max-width: 98vw;
  max-height: 90vh;
  min-width: 240px;
  min-height: 60px;
  background: #22301d;
  border-radius: 18px;
  box-shadow: 0 2px 36px #0005;
  overflow: auto;   /* key: allow scroll inside! */
  padding: 24px 22px;
  box-sizing: border-box;
  font-size: 1.12em;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.error-popup {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999;
}

.error-popup.hidden {
    display: none;
}

.error-popup-content {
    background: #22301d;
    padding: 28px 36px;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.12);
    text-align: center;
}

#errorPopup button {
    margin-top: 20px;
    padding: 8px 16px;
    background: #e33;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}
.video-scroller {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #232d1d;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    margin: 0;
    padding: 0;
}
#videoScroller .video-card {
  display: none;    /* default hidden, will show via JS */
  justify-content: center;
  align-items: center;
  min-height: 90vh;
  width: 100vw;
}

#videoScroller::-webkit-scrollbar { width: 0; background: transparent; }
#videoScroller { scrollbar-width: none; }

.video-card video {
  max-width: 98vw;
  max-height: 60vh;
  border-radius: 14px;
  margin-bottom: 20px;
}

.video-description {
  color: #fff;
  font-size: 1.18em;
  text-align: center;
  margin-top: 10px;
  padding: 0 20px;
}

.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: 3em;
  color: #ffe793;
  background: rgba(0,0,0,0.38);
  border-radius: 100px;
  padding: 16px 30px;
  transform: translate(-50%, -50%);
  pointer-events: all;
  cursor: pointer;
  z-index: 5;
  transition: background .2s, color .2s;
  opacity: 0.85;
}
/* Reels Modal Fullscreen */
.reels-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: #000 !important;
  display: flex !important;
  align-items: stretch;
  justify-content: center;
  z-index: 9999;
}
.reels-modal.hidden { display: none !important; }
.reels-modal-inner {
  position: relative;
  width: 100vw; height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  background: transparent;
  padding: 0; margin: 0;
}
.modal-video-center {
  position: absolute;
  top: 0; left: 0; width: 100vw; height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}
.modal-video-center video, .reels-video-container video {
  max-width: 100vw;
  max-height: 100vh;
  width: 100vw;
  height: 100vh;
  object-fit: contain;
  background: #000;
  display: block;
}
.reels-video-desc {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100vw;
  background: rgba(0,0,0,0.87);
  color: #fff;
  font-size: 1.25em;
  padding: 18px 26px 32px 26px;
  box-sizing: border-box;
  text-align: left;
  pointer-events: none;
  border-radius: 18px 18px 0 0;
  z-index: 10;
}
.reels-close-btn {
  position: absolute;
  top: 18px;
  right: 24px;
  font-size: 2.3em;
  background: rgba(0,0,0,0.6);
  border: none;
  color: #fff;
  border-radius: 12px;
  z-index: 20;
  padding: 2px 16px;
  cursor: pointer;
}
.video-section-pagewrap {
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;  /* always fills at least full viewport */
}

.fullscreen-panel,
.blog-fullscreen,
#blogBox.panel-box {
    width: 92vw;
    max-width: 900px;
    min-width: 320px;
    height: 84vh;      /* Much less than 100vh, leaves room for button and visual gap */
    min-height: 320px;
    background: #22301d;
    border-radius: 32px;
    box-shadow: 0 4px 48px #0008;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.blog-fullscreen h3,
.blog-fullscreen #adminBlogForm {
    padding: 0 28px;
    flex-shrink: 0;
}

/* Blog area is always scrollable inside panel */
.blog-scroll-area {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 0 28px 32px 28px;
    min-height: 0;
    max-height: 60vh; /* tweak for your design */
    box-sizing: border-box;
}

/* Button always sticks to bottom of viewport, never scrolls with panel */
.play-btn-bottom {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    width: 340px;
    height: 56px;
    background:transparent 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    text-align: center;
    padding: 0;
    border-radius: 16px;
    transition: filter 0.15s;
}
.play-btn-bottom img {
    width: 340px;
    height: 40px;
    border-radius: 16px;
    display: block;
    cursor: pointer;
    object-fit: cover;
}
.video-section-pagewrap {
    width: 100vw;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* No overflow here */
}

.video-section-pagewrap .fullscreen-panel,
.video-section-pagewrap .blog-fullscreen,
.video-section-pagewrap #blogBox.panel-box {
    width: 94vw !important;
    max-width: 900px !important;
    height: calc(100vh - 120px - 40px) !important; /* 40px total gap for top+bottom */
    min-height: 320px !important;
    margin: 20px auto !important;
    padding: 0 !important;
    border-radius: 28px !important;
    box-shadow: 0 4px 48px #0008;
    background: #22301d;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
}
.loading-spinner {
  position: fixed;
  z-index: 9999;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(20, 26, 23, 0.83);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s;
}
.loading-spinner.hidden { display: none; }
.spinner {
  border: 8px solid #eee;
  border-top: 8px solid #50e650;
  border-radius: 50%;
  width: 70px;
  height: 70px;
  animation: spin 1.1s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg);}
  100% { transform: rotate(360deg);}
}



.button-unified {
  width: 94vw;
  max-width: 500px;
  min-height: 70px;
  font-size: 1.5em;
  border-radius: 2em;
  background: #273323;
  color: #e6f6db;
  border: none;
  box-shadow: 0 4px 24px #0006;
  font-weight: bold;
  letter-spacing: 1px;
  margin-bottom: 8px;
  transition: background 0.16s, transform 0.12s;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  text-align: center;
  margin-top: 2vw;
}
.comments-panel {
    background: #273323;
    border: 1px solid #d0d0e0;
    border-radius: 8px;
    padding: 18px 16px;
    margin: 18px 0;
    box-shadow: 0 2px 8px rgba(80,80,120,0.07);
}
.comments-panel h3 {
    margin-top: 0;
    margin-bottom: 12px;
    color: #fff;
}
#commentsList {
    margin-bottom: 12px;
}
#commentInput {
    border-radius: 6px;
    border: 1px solid #ccc;
    padding: 8px;
    font-size: 1em;
}
#postCommentBtn {
    background: #3a6ed8;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 7px 18px;
    cursor: pointer;
    font-size: 1em;
}
#postCommentBtn:hover {
    background: #295bb2;
}
.code-text.scrollable-panel {
    display: block;
    width: 100%;
    max-width: 100vw;
    max-height: 48vh;
    min-height: 120px;
    background: #273323;
    border-radius: 6px;
    padding: 8px;
    font-family: monospace;
    word-break: normal;           /* <-- ensures words are not split in the middle */
    overflow-wrap: break-word;    /* <-- wraps long words to next line if needed */
    color: #fff;
    overflow-y: auto;
    box-sizing: border-box;
    margin-bottom: 8px;
}
@media (max-width: 700px) {
    .image-modal-content {
        max-width: 99vw !important;
        padding: 10px 2vw 10px 2vw !important;
    }
    .code-text.scrollable-panel {
        max-height: 38vh;
        font-size: 0.97em;
        padding: 6px;
    }
}