body.texture-dots {
    --texture-image: url('../images/textures/dots.png');
}
body.texture-diagonal-stripes {
    --texture-image: url('../images/textures/diagonal-stripes.png');
}
body.texture-cross-lines {
    --texture-image: url('../images/textures/cross-lines.png');
}
body.texture-grid-small {
    --texture-image: url('../images/textures/grid-small.png');
}
body.texture-diagonal-check {
    --texture-image: url('../images/textures/diagonal-check.png');
}
body.texture-circles {
    --texture-image: url('../images/textures/circles.png');
}
body.texture-waves {
    --texture-image: url('../images/textures/waves.png');
}
body.texture-zigzag {
    --texture-image: url('../images/textures/zigzag.png');
}
body.texture-noise {
    --texture-image: url('../images/textures/noise.png');
}
  
html {
    line-height: 1.15;
    scroll-behavior: smooth;
}
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
li,
figure,
figcaption {
    margin: 0;
    padding: 0;
}
a {
    text-decoration: none;
    outline: none;
    color: inherit;
}

p {
    text-align: left;
    font-size:medium;
    margin-bottom: 30px;
}

/* กล่องปกติ */
.layout-box .container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px;
}

/* กล่องเต็มจอ */
.layout-full .container {
    max-width: 100%;
    width: 100%;
    padding: 0 15px;
}

.container {
    max-width: 100%;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0px;
    padding-right: 0px;
    box-sizing: border-box;
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}
@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}
@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}
@media (min-width: 1400px) {
    .container {
        max-width: 100%;
        padding-left: 20px;
        padding-right: 20px;
    }
}
*,
*::before,
*::after {
    box-sizing: border-box;
}
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: 0;
    margin-left: 0;
}
.row > [class^="col-"] {
    position: relative;
    width: 100%;
    min-height: 1px;
    padding-right: 0;
    padding-left: 0;
    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: 0;
    max-width: 100%;
}
.col-1 {
    flex: 0 0 8.3333%;
    max-width: 8.3333%;
}
.col-2 {
    flex: 0 0 16.6667%;
    max-width: 16.6667%;
}
.col-3 {
    flex: 0 0 25%;
    max-width: 25%;
}
.col-4 {
    flex: 0 0 33.3333%;
    max-width: 33.3333%;
}
.col-5 {
    flex: 0 0 41.6667%;
    max-width: 41.6667%;
}
.col-6 {
    flex: 0 0 50%;
    max-width: 50%;
}
.col-7 {
    flex: 1 1 65%;
    max-width: 65%;
    padding: 16px;
}
.col-8 {
    flex: 0 0 66.6667%;
    max-width: 66.6667%;
}
.col-9 {
    flex: 0 0 75%;
    max-width: 75%;
}
.col-10 {
    flex: 0 0 83.3333%;
    max-width: 83.3333%;
}
.col-11 {
    flex: 0 0 91.6667%;
    max-width: 91.6667%;
}
.col-12 {
    flex: 0 0 100%;
    width: 100%;
    padding:0;
    margin:0;
}
@media (max-width: 768px) {
    .row > [class^="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
}


body {
    font-weight: 200;
    font-style: normal;
    margin: 0;
    padding: 0;
    font-size: 1rem;
    overflow-x: hidden;
    color: var(--fontcolor);
    background-color: var(--bgcolor);
}

.site-header {
    position: relative;
    background: linear-gradient(90deg, var(--headercolor), var(--header2color), var(--bgcolor));
    background-size: 400% 400%; /* ✅ ทำให้ Gradient เคลื่อนที่ */
    animation: gradientShift 15s ease infinite; /* ✅ ใช้ Animation */
}

.site-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--texture-image); /* ✅ แสดง texture */
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}
  
  
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5px;
    position: relative;
}
  
.logo a {
    font-size: 1.6em;
    font-weight: bold;
    color: var(--fontcolor);
    text-decoration: none;
}
  
.logo img {
    max-width: 100%;
    height: auto;
    display: block;
}

.search-form {
    display: flex;
    align-items: center;
}

.search-form form {
    display: flex;
    align-items: center;
    gap: 5px;
  }
  
.search-form input[type="search"] {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid var(--headercolor);
    background-color: var(--bg2color);
    color: var(--fontcolor);
    border-radius: 0;
}

.search-form input[type="search"]:focus {
    border-color: var(--border);
    box-shadow: 0 0 10px rgba(var(--shadow), 0.5);
}
  
.search-form button {
    background: none;
    border: none;
    color: var(--fontcolor);
    font-size: 1.2em;
    margin-left: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .search-form form {
      width: 100%;
    }
  
    .search-form input[type="search"] {
      width: 100%;
    }
  }
  
/* Nav Menu */
.main-nav {
    position: relative;
    z-index: 2;
    background: linear-gradient(90deg, var(--headercolor), var(--header2color), var(--bgcolor));
    border-bottom: 3px solid var(--header2color);
    box-shadow: 0 0 10px rgba(var(--shadow), 0.3), 0 5px 20px rgba(var(--shadow), 0.2);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 0;
    overflow: visible !important;
}

/* เพิ่มแถบ border glow วิ่ง */
.main-nav::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: -100%;
    width: 200%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--headercolor), transparent);
    animation: nav-glow-bar 4s linear infinite;
    opacity: 0.7;
}

@keyframes nav-glow-bar {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}
  
.main-nav ul {
    display: flex;
    margin: 0;
    padding: 14px 4px;
    list-style: none;
    gap: 5px;
    z-index: 2;
}

/* Hover เพิ่ม Glow หนักขึ้น */
.main-nav:hover {
    box-shadow: 0 0 20px rgba(var(--shadow), 0.6), 0 8px 30px rgba(var(--shadow), 0.4);
    transform: translateY(-1px);
}

  
.main-nav ul li a {
    color: var(--elementfont);
    text-decoration: none;
    padding: 6px 10px;
    display: inline-block;
    border-radius: 3px;
    transition: background 0.2s ease, color 0.2s ease;
}
  
.main-nav ul li a:hover {
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
}

/* เมนูย่อย */
.menu-item-has-children {
    position: relative;
}

.menu-item-has-children > .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--bg2color);
    /*
    border: 2px solid var(--headercolor);
    box-shadow: 0 4px 15px rgba(var(--shadow), 0.3);*/
    z-index: 10000;
    padding: 10px 0;
}

.menu-item-has-children:hover > .sub-menu {
    display: block;
}

.sub-menu li {
    display: block;
    padding: 8px 20px;
}

.sub-menu li a {
    color: var(--fontcolor);
    text-decoration: none;
    display: block;
    transition: 0.2s;
}

.sub-menu li a:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

  
/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    margin-right: 10px;
}
  
.hamburger .bar {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
}
  
/* Overlay */
.overlay {
    display: none;
}
  
.close-btn {
    display: none; /* ซ่อนไว้ก่อน */
}
  
/* Responsive */
@media (max-width: 768px) {
    .logo {
        max-width: 120px;
    }
    .hamburger {
        display: flex;
    }
    .main-nav {
        position: fixed;
        left: -250px;
        top: 0;
        width: 250px;
        height: 100%;
        background: var(--bg2color);
        transition: left 0.3s;
        flex-direction: column;
        z-index: 10000;
    }
    .close-btn {
        display: block; /* แสดงเฉพาะในหน้าจอเล็ก */
        position: absolute;
        top: 10px;
        right: 10px;
        background: none;
        border: none;
        color: #fff;
        font-size: 1.5em;
        cursor: pointer;
        z-index: 1001;
    }
    .main-nav ul {
        flex-direction: column;
        padding-top: 60px;
    }
    .main-nav.active {
        left: 0;
    }
    .overlay {
        display: none;
        position: fixed;
        top: 0; left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0,0,0,0.6);
        z-index: 999;
    }
    .overlay.active {
        display: block;
    }
}







/* ✅ สร้าง Keyframes ให้ Gradient เคลื่อนไหว */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}


.rowx {
    margin-right: 0px;
    margin-left: 0px;
}

.homepage .list-box-wrapper,
.archive-page .list-box-wrapper,
.single-list .list-box-wrapper,
.search-page .list-box-wrapper {
    background-color: var(--bg2color);
    display: flex;
    flex-flow: row wrap;
    width: 100%;
    height: 100%;
    margin-left: 0px;
    margin-right: 0px;
    padding: 0;
}

.homepage .list-box-wrapper .list-box-item,
.archive-page .list-box-wrapper .list-box-item,
.single-list .list-box-wrapper .list-box-item,
.search-page .list-box-wrapper .list-box-item {
    flex: 0 0 25%;
    max-width: 25%;
    margin: 0;
    padding: 2px 2px;
}

.homepage .col-2.list-box-item,
.archive .col-2.list-box-item,
.single-list .col-2.list-box-item,
.search-page .col-2.list-box-item {
    flex: 0 0 16.6667%;
    max-width: 16.6667%;
}


/* ✅ Element ตัวแรกของแต่ละแถวให้ชิดซ้าย */
.list-box-item:nth-child(4n+1) {
    padding-left: 0;
    margin-left: 0;
}

/* ✅ Element ตัวสุดท้ายของแต่ละแถวให้ชิดขวา */
.list-box-item:nth-child(4n) {
    padding-right: 0;
    margin-right: 0;
}

.homepage .list-box-wrapper .list-box-item .list-box-inner,
.archive-page .list-box-wrapper .list-box-item .list-box-inner,
.single-list .list-box-wrapper .list-box-item .list-box-inner,
.search-page .list-box-wrapper .list-box-item .list-box-inner {
    display: block;
    position: relative;
    height: 100%;
}
.homepage .list-box,
.archive-page .list-box,
.single-list .list-box,
.search-page .list-box {
    width: 100%;
    background: linear-gradient(180deg, #000000, #181818, #2e2e2e);
    border: 2px solid #181818; /* ✅ ใช้ขอบสีดำเพื่อแยกจากพื้นหลัง */
    padding: 0px 0px 5px 0px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); /* ✅ เงาดำ */
    transition: all 0.3s ease-in-out;
}

.homepage .list-box:hover,
.archive-page .list-box:hover,
.single-list .list-box:hover,
.search-page .list-box:hover {
    box-shadow: 0 4px 15px rgba(var(--shadow), 0.5);
    transform: translateY(-2px); /* ✅ ยกขึ้นเล็กน้อย */
}

.list-thumbnail:hover img {
    box-shadow: 0 10px 20px rgba(var(--shadow), 0.5);
}

.homepage .list-box::after,
.archive-page .list-box::after,
.single-list .list-box::after,
.search-page .list-box::after {
    display: table;
    clear: both;
    content: "";
}

/* ✅ ปรับสไตล์ของรูป Thumbnail */
.list-thumbnail {
    position: relative;
    overflow: hidden;
}


.list-thumbnail picture {
    display: block;
    transition: transform 0.6s ease;
    
  }

/* ✅ เอฟเฟกต์ Blur ตอนโหลดรูป */
.list-thumbnail img {
    aspect-ratio: 16 / 9;
    width: 100%;
    height: auto;
    display: block;
    filter: blur(10px);
    opacity: 0.7;
    transition: filter 0.5s ease-in-out, opacity 0.5s ease-in-out, transform 0.3s ease-in-out;
}

/* ✅ เมื่อโหลดรูปเสร็จ ให้แสดงปกติ */
.list-thumbnail img[src] {
    filter: blur(0);
    opacity: 1;
}

/* ✅ เอฟเฟกต์ Hover */
.list-thumbnail:hover img {
    transform: scale(1.05); /* ขยายภาพเล็กน้อย */
}

.homepage .list-box .list-thumbnail,
.archive-page .list-box .list-thumbnail,
.single-list .list-box .list-thumbnail,
.search-page .list-box .list-thumbnail {
    display: block;
    width: 100%;
    height: auto;
    overflow: hidden;
    margin-bottom: 4px;
    background-color: var(--bg2color);
}

.homepage .list-box .list-thumbnail img,
.archive-page .list-box .list-thumbnail img,
.single-list .list-box .list-thumbnail img,
.search-page .list-box .list-thumbnail img {
    width: 100%;
    height: auto;
}

.homepage .list-box .list-title,
.archive-page .list-box .list-title,
.single-list .list-box .list-title,
.search-page .list-box .list-title {
    font-size: 0.9em;
    font-weight: 100;
    color: var(--fontcolor);
}

.badges {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 2;
}

.badges .badge-new {
    font-size: 0.7rem;
    padding: 3px 6px;
    font-weight: bold;
    background: var(--fontcolor);
    color: var(--elementfont);
}

.badges .badge-hot {
    font-size: 0.7rem;
    padding: 3px 6px;
    font-weight: bold;
    background: #ff0000;
    color: var(--elementfont);
}

.overlay-meta {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    padding: 3px 8px;
    font-size: 0.75em; /* 🔽 ลดขนาดฟอนต์ */
    font-weight: bold;
    display: flex;
    gap: 8px;
    border-radius: 2px;
    align-items: center;
}

/* ปรับระยะห่างระหว่างไอคอนกับตัวเลข */
.overlay-meta span {
    display: flex;
    align-items: center;
    gap: 3px;
}

/* ปรับสีให้แตกต่างกันเล็กน้อย */
.overlay-meta .views {
    color: var(--fontcolor);
}

.overlay-meta .likes {
    color: var(--fontcolor);
}


/* ✅ ปรับสไตล์ Pagination */
.homepage .pagination,
.archive-page .pagination,
.single-list .pagination,
.search-page .pagination {
    width: 100%;
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
}

/* ✅ ปรับสไตล์ปุ่ม Pagination */
.homepage .pagination .page-numbers,
.archive-page .pagination .page-numbers,
.single-list .pagination .page-numbers,
.search-page .pagination .page-numbers {
    display: inline-block;
    min-width: 35px;
    margin: 4px;
    font-weight: 500;
    text-align: center;
    font-size: 1rem;
    padding: 7px 12px;
    transition: all 0.3s ease-in-out;
    text-decoration: none;
    transition: all 0.3s ease-in-out; /* ✅ ทำให้ทุกอย่างลื่นไหล */
    color: var(--elementfont);
    background-color: var(--bg2color);
    border: 2px solid var(--headercolor);
    box-shadow: 0 2px 10px rgba(var(--shadow), 0.3);
}

.homepage .pagination .page-numbers:hover,
.archive-page .pagination .page-numbers:hover,
.single-list .pagination .page-numbers:hover,
.search-page .pagination .page-numbers:hover {
    background-color: var(--headercolor);
    color: var(--elementfont);
    border-color: var(--paginationborder);
    box-shadow: 0 4px 15px rgba(var(--shadow), 0.5);
}


/* ✅ ปรับหน้าปัจจุบัน (Current Page) ให้ดูเด่น */
.homepage .pagination .page-numbers.current,
.archive-page .pagination .page-numbers.current,
.single-list .pagination .page-numbers.current,
.search-page .pagination .page-numbers.current {
    font-weight: bold;
    background-color: var(--headercolor);
    color: var(--elementfont);
    border-color: var(--paginationborder); 
    box-shadow: 0 0 15px rgba(var(--shadow), 0.7);
}

/* ✅ ลบ Margin ขวาของปุ่มสุดท้าย */
.homepage .pagination .page-numbers:last-child,
.archive-page .pagination .page-numbers:last-child,
.single-list .pagination .page-numbers:last-child,
.search-page .pagination .page-numbers:last-child {
    margin-right: 0;
}

.homepage,
.archive-page,
.single-page,
.search-page {
    display: block;
    width: 100%;
    padding: 5px 0;
}

.archive .title {
    display: block;
    width: 100%;
    text-align: center;
    margin-bottom: 5px;
}

.archive .title h1 {
    font-size: 1.2em;
    font-weight: 500;
}

.single-page {
    width: 100%;
    min-height: 400px;
    display: block;
}

.single-page .show {
    width: 100%;
    display: block;
    background: linear-gradient(180deg, #000000 0%,  #222222 50%, #2e2e2e 100%);
    border: 1px solid #000000;
    padding: 10px;
    border-radius: 0px;
    box-shadow: 0 2px 10px rgba(53, 53, 53, 0.3);
    transition: all 0.3s ease-in-out;
}

/* ✅ เอฟเฟกต์ Hover */
.single-page .show:hover {
    box-shadow: 0 5px 15px rgba(var(--shadow), 0.5);
    transform: translateY(-2px);
}

.single-page .show h1 {
    font-size: 1.5em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(90deg, var(--headercolor), var(--header2color));
}

.single-page .show .user::after,
.single-page .show .cate::after,
.single-page .show .tags::after {
    display: table;
    clear: both;
    content: "";
}

.single-page .show .user {
    margin-top: 5px;
}

.single-page .show .user,
.single-page .show .cate {
    font-size: 1.1em;
    color: black;
    font-weight: bold;
    line-height: 30px;
    margin-bottom: 5px;
    color: var(--paginationborder);
}

.single-page .show .user span,
.single-page .show .cate span {
    font-weight: 500;
}
.single-page .show .user a,
.single-page .show .cate a {
    text-decoration: underline;
}
.single-page .show .tags {
    margin-top: 8px;
}

.single-page .show .tags a {
    font-size: 1.1em;
    display: inline-block;
    background: none;
    padding: 6px 10px;
    margin: 0 5px 5px 0;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease-in-out;
    box-shadow: none;
    border-radius: 0px;
    color: var(--element2);
    border: 2px solid var(--element2);
}

/* ✅ เอฟเฟกต์ Hover */
.single-page .show .tags a:hover {
    transform: translateY(-2px);
    background: var(--element2);
}

/* ✅ เอฟเฟกต์ Hover */
.single-page .show .tags a:hover {
    color: var(--elementfont);
    transform: translateY(-2px);
    opacity: 0.9;
    background: linear-gradient(90deg, var(--element2), var(--element2shadow));
    border-color: var(--element2border);
    box-shadow: 2px 2px 10px rgba(var(--element2shadow), 0.6);
}

p.content {
    font-weight: bold;
    font-size: 1rem;
    color: var(--element1);
}

.single-page .show .tags a:last-child {
    margin-right: 0;
}

.single-page .show .tags a:hover {
    background-color: #000;
    opacity: 0.9;
}

.single-page .sidebar {
    width: 100%;
    display: block;
}

.single-page .sidebar .list {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    margin-bottom: 10px;
    padding-bottom: 7px;
    border-bottom: 1px solid #fff;
}

.single-page .sidebar .list:last-child {
    border-bottom: 0;
}

.single-page .sidebar .list .thumbnail {
    width: 120px;
    height: 93px;
    background-color: #fff;
    overflow: hidden;
    border: 1px solid #e4e4e4;
    padding: 5px;
    border-radius: 5px;
}

.single-page .sidebar .list .thumbnail img {
    width: 100%;
    height: auto;
    transition: all 0.2s ease-in-out;
}

.single-page .sidebar .list .thumbnail:hover img {
    transform: scale(1.2);
}

.single-page .sidebar .list .title {
    position: relative;
    display: block;
    width: 300px;
    font-size: 0.9em;
    font-weight: 400;
    color: #707070;
    transition: all 0.2s ease-in-out;
    padding-top: 10px;
}

.single-page .sidebar .list .title::before {
    content: "";
    display: block;
    width: 15px;
    height: 15px;
    background-color: #707070;
    margin-bottom: 5px;
    transition: all 0.2s ease-in-out;
}

.single-page .sidebar .list .title:hover {
    color: #000;
}

.single-page .sidebar .list .title:hover::before {
    background-color: #000;
}

.single-list {
    margin-bottom: 5px;
    padding-top: 5px;
}

.single-list .top-title h2 {
    font-size: 1.3em;
    font-weight: bold;
    text-align: center;
    color: white;
}

.page-not-found {
    width: 100%;
    text-align: center;
    padding: 80px 0;
}

.page-not-found .title {
    font-size: 3em;
}

footer {
    text-align: center;
    padding: 15px;
    background-color: var(--bgcolor);
    color: var(--elementfont);
    border-top: 2px solid var(--header2color);
    box-shadow: 0 -5px 20px rgba(var(--shadow), 0.3);
}

footer:hover {
    background-color: var(--bg2color);
    box-shadow: 0 -5px 30px rgba(var(--shadow), 0.5);
}


@media screen and (max-width: 991px) {
    .homepage .col-3.list-box-item,
    .archive .col-3.list-box-item,
    .single-list .col-3.list-box-item,
    .search-page .col-3.list-box-item {
        flex: 0 0 33.33%;
        max-width: 33.33%;
    }
    .homepage .col-2.list-box-item,
    .archive .col-2.list-box-item,
    .single-list .col-2.list-box-item,
    .search-page .col-2.list-box-item {
        flex: 0 0 16.6667%;
        max-width: 16.6667%;
    }
    .single-page {
        padding: 5px;
    }
    .single-page .col-7 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .single-page .sidebar {
        display: none;
    }
}
@media screen and (max-width: 767px) {
    .homepage .col-3.list-box-item,
    .archive .col-3.list-box-item,
    .single-list .col-3.list-box-item,
    .search-page .col-3.list-box-item {
        flex: 0 0 50%;
        max-width: 50%;
        margin: 0;
    }
    .single-page .show {
        margin-bottom: 1px;
    }
    .archive-page .title {
        text-align: center;
    }
}
@media screen and (max-width: 530px) {
    .homepage .pagination,
    .archive .pagination,
    .single-list .pagination,
    .search-page .pagination {
        width: 99%;
        margin: auto;
        margin-top: 2px;
    }
    .single-list .top-title {
        text-align: center;
    }
}
a {
    color: var(--fontcolor);
}
h4.list-title {
    text-align: left;
    padding: 0px 5px 0px 5px;
}
.single-page .show .x-content {
    color: var(--fontcolor);
    font-weight: bold;
    line-height: 20px;
}
.video-box {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-top: 60%;
    border:var(---bg2color) 1px solid;
}
.video-box iframe {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
}
.socialx {
    text-align: center;
    padding: 5px;
    border: none;
    border-top: 2px solid var(--fontcolor);
    border-bottom: 2px solid var(--fontcolor);
    border-radius: 0px;
    font-weight: bold;
    transition: all 0.3s ease-in-out;
    background: linear-gradient(90deg, var(--headercolor), var(--header2color));
}

/* ✅ เอฟเฟกต์ Hover */
.socialx:hover {
    transform: scale(1.02);
    background: linear-gradient(90deg, var(--header2color), var(--headercolor));
    border-color: var(--border);
}

.share-buttons .share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 0px;
    color: var(--elementfont);
    transition: all 0.3s ease;
}

.share-buttons .telegram {
    background-color: #0088cc;
}

.share-buttons .vk {
    background-color: #4c75a3;
}

.share-buttons .line {
    background-color: #00c300;
}

.share-buttons .x {
    background-color: #000000;
}

.share-buttons .messenger {
    background-color: #0084ff;
}

.share-buttons .copy-link {
    background-color: #555; /* สีเทาเข้ม */
}

.share-buttons .share-btn:hover {
    transform: scale(1.5);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    color: var(--elementfont);
}

.titlex {
    color: var(--elementfont);
    padding: 0px;
    margin-bottom: 5px;
    font-weight: bold;
    text-align: left;
}

.titlex h1{
    padding: 20px;
}

.datex {
    font-size: 1.1em;
    color: black;
    font-weight: bold;
    line-height: 30px;
}

.tagrow {
    display: flex;
    justify-content: center;
    width: 100%;
    align-items: center;
    flex-wrap: wrap;
    padding-bottom: 10px;
    padding-top: 5px;
}

span.tagx a {
    font-size: 14px;
    background: none;
    margin: 3px;
    padding: 5px 8px;
    float: left;
    font-weight: bold;
    text-decoration: none;
    display: block;
    transition: all 0.3s ease-in-out;
    color: var(---elementfont);
    border: 2px solid var(--element2border);
}

/* ✅ เอฟเฟกต์ Hover */
span.tagx a:hover {
    transform: translateY(-2px);
    background: var(--header2color);
}

span.tagx2 a {
    font-size: 14px;
    background: none;
    margin: 3px;
    padding: 5px 8px;
    float: left;
    font-weight: bold;
    text-decoration: none;
    display: block;
    transition: all 0.3s ease-in-out;
    color: var(--elementfont);
    border: 2px solid var(--paginationborder);
}

/* ✅ เอฟเฟกต์ Hover */
span.tagx2 a:hover {
    transform: translateY(-2px);
    background: var(--element2);
    color: var(--elementfont);
}

/* ✅ ปรับสไตล์ของ textstar (ชมพูสด) */
.single-page .show .tags .textstar a {
    font-size: 14px;
    background: none;
    margin: 0 5px 5px 0;
    padding: 5px 8px;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease-in-out;
    color: var(--element1);
    border: 2px solid var(--element1);
}

/* ✅ เอฟเฟกต์ Hover */
.single-page .show .tags .textstar a:hover {
    transform: translateY(-2px);
    background: var(--element1);
    color: var(--elementfont);
}

/* ✅ ปรับสไตล์ของ textstudio (เขียวเข้ม) */
.single-page .show .tags .textstudio a {
    font-size: 14px;
    background: none; /* ✅ ลบพื้นหลังออก */
    color: #0e4401; /* ✅ ใช้สีเขียวเข้ม */
    margin: 0 5px 5px 0;
    padding: 5px 8px;
    border: 2px solid #0e4401; /* ✅ เพิ่มขอบสีเขียวเข้ม */
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease-in-out;
}

/* ✅ เอฟเฟกต์ Hover */
.single-page .show .tags .textstudio a:hover {
    background: #0e4401; /* ✅ เพิ่มพื้นหลังสีเขียวเข้มเมื่อ Hover */
    color: white;
    transform: translateY(-2px);
}

/* ✅ ปรับสไตล์ของ cattx (สีแดงเข้ม) */
.single-page .show .tags .cattx a {
    font-size: 1.1em;
    background: none;
    margin: 0 5px 5px 0;
    padding: 6px 10px;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease-in-out;
    color: var(--paginationborder);
    border: 2px solid var(--paginationborder);
}

/* ✅ เอฟเฟกต์ Hover */
.single-page .show .tags .cattx a:hover {
    transform: translateY(-2px);
    background: var(--paginationborder);
    color: var(--elementfont);
}

article {
    width: 100%;
}

@media only screen and (max-width: 639px) {
    .rowx {
        margin-right: 0px;
        margin-left: 0px;
    }
    .container {
        padding-left: 0px;
        padding-right: 0px;
    }
    .homepage .list-box,
    .archive-page .list-box,
    .single-list .list-box,
    .search-page .list-box {
        padding: 3px;
    }
    .homepage .list-box-wrapper .list-box-item,
    .archive-page .list-box-wrapper .list-box-item,
    .single-list .col-3.list-box-item,
    .search-page .list-box-wrapper .list-box-item {
        flex: 0 0 100%;
        max-width: 50%;
    }
    .col-1,
    .col-2,
    .col-3,
    .col-4,
    .col-5,
    .col-6,
    .col-7,
    .col-8,
    .col-9,
    .col-10,
    .col-11,
    .col-12,
    .col {
        padding-right: 1px;
        padding-left: 1px;
    }
    .single-page .show {
        padding: 2px;
    }
    .video-box {
        padding-top: 66%;
    }
    .video-box iframe {
        width: 100%;
        height: 100%;
        position: absolute;
        left: 0;
        top: 0;
    }
    .single-page .show .user,
    .single-page .show .cate {
        font-size: 0.8em;
    }
    .single-page .show h1 {
        font-size: 1.2em;
        line-height: 1.3;
    }
    .single-page .show .x-content {
        font-size: 0.8em;
    }
    .single-page .show .tags a {
        font-size: 0.9em;
    }
    .starx {
        font-size: 0.9em;
    }
    .datex {
        font-size: 0.8em;
    }
    .studiox {
        font-size: 0.9em;
    }
}
@media only screen and (min-width: 640px) and (max-width: 767px) {

    .container {
        max-width: 100%;
    }
    .homepage .col-3.list-box-item,
    .archive .col-3.list-box-item,
    .single-list .col-3.list-box-item,
    .search-page .col-3.list-box-item {
        flex: 1 1 calc(33.33% - 10px);
        max-width: calc(33.33% - 10px);
        box-sizing: border-box;
    }

    .homepage .list-box,
    .archive-page .list-box,
    .single-list .list-box,
    .search-page .list-box {
        padding: 3px;
    }
}
@media only screen and (min-width: 768px) and (max-width: 959px) {
    .container {
        max-width: 100%;
    }
    .homepage .col-3.list-box-item,
    .archive .col-3.list-box-item,
    .single-list .col-3.list-box-item,
    .search-page .col-3.list-box-item {
        flex: 0 0 33.33%;
        max-width: 33.33%;
    }
    .homepage .col-2.list-box-item,
    .archive .col-2.list-box-item,
    .single-list .col-2.list-box-item,
    .search-page .col-2.list-box-item {
        flex: 0 0 33.33%;
        max-width: 33.33%;
    }
    .homepage .list-box,
    .archive-page .list-box,
    .single-list .list-box,
    .search-page .list-box {
        padding: 3px;
    }
}

img.ads80x {
    max-width: 98%;
    height: auto;
}
img.ads800 {
    max-width: 37%;
    height: auto;
}
.adsok {
    max-width: 37%;
    height: 0;
    float: left;
}
img.ads140s {
    width: 120px;
    height: 220px;
}
#slider-r {
    width: 120px;
    right: 3px;
    position: fixed;
    top: 160px;
    text-align: center;
    line-height: 0;
}
#slider-l {
    width: 120px;
    left: 3px;
    position: fixed;
    top: 160px;
    text-align: center;
    line-height: 0;
}
img.ads300s {
    width: 280px;
    max-height: 90px;
}
#slider-f {
    width: 280px;
    right: 30px;
    left: 0;
    bottom: 5px;
    margin: 0 auto;
    position: fixed;
    text-align: center;
    line-height: 0;
}
.xcc {
    width: 23px;
    height: 90px;
    position: absolute;
    left: 100%;
    top: 0;
}

@media (min-width: 768px) and (max-width: 959px) {
    img.ads800 {
        max-width: 40%;
        height: auto;
    }
    .adsok {
        max-width: 40%;
        height: 0;
        float: left;
    }
    img.ads140s {
        width: 100px;
        max-height: 175px;
    }
    #slider-r {
        width: 100px;
        right: 3px;
        position: fixed;
        top: 5px;
        text-align: center;
        line-height: 0;
    }
    #slider-l {
        width: 100px;
        left: 3px;
        position: fixed;
        top: 5px;
        text-align: center;
        line-height: 0;
    }
    img.ads300s {
        width: 230px;
        max-height: 70px;
    }
    #slider-f {
        width: 200px;
        right: 30px;
        left: 0;
        bottom: 5px;
        margin: 0 auto;
        position: fixed;
        text-align: center;
        line-height: 0;
    }
    .xcc {
        width: 20px;
        height: 70px;
        position: absolute;
        left: 100%;
        top: 0;
    }
}

@media (min-width: 640px) and (max-width: 767px) {
    img.ads800 {
        max-width: 40%;
        height: auto;
    }
    .adsok {
        max-width: 40%;
        height: 0;
        float: left;
    }
    img.ads140s {
        width: 80px;
        max-height: 140px;
    }
    #slider-r {
        width: 80px;
        right: 3px;
        position: fixed;
        top: 5px;
        text-align: center;
        line-height: 0;
    }
    #slider-l {
        width: 80px;
        left: 3px;
        position: fixed;
        top: 5px;
        text-align: center;
        line-height: 0;
    }
    img.ads300s {
        width: 230px;
        max-height: 70px;
    }
    #slider-f {
        width: 230px;
        right: 30px;
        left: 0;
        bottom: 5px;
        margin: 0 auto;
        position: fixed;
        text-align: center;
        line-height: 0;
    }
    .xcc {
        width: 20px;
        height: 70px;
        position: absolute;
        left: 100%;
        top: 0;
    }
}

@media (min-width: 320px) and (max-width: 639px) {
    img.ads800 {
        max-width: 95%;
        height: auto;
    }
    .adsok {
        max-width: 95%;
        height: 1px;
    }
    img.ads80x {
        max-width: 98%;
        height: auto;
    }
    img.ads140s {
        width: 70px;
        max-height: 120px;
    }
    #slider-r {
        width: 70px;
        right: 3px;
        position: fixed;
        top: 35px;
        text-align: center;
        line-height: 0;
    }
    #slider-l {
        width: 70px;
        left: 3px;
        position: fixed;
        top: 35px;
        text-align: center;
        line-height: 0;
    }
    img.ads300s {
        width: 220px;
        max-height: 65px;
    }
    #slider-f {
        width: 220px;
        right: 30px;
        left: 0;
        bottom: 5px;
        margin: 0 auto;
        position: fixed;
        text-align: center;
        line-height: 0;
    }
    .xcc {
        width: 20px;
        height: 65px;
        position: absolute;
        left: 100%;
        top: 0;
    }
}

@media (max-width: 319px) {
    .adsok,
    img.ads800,
    img.ads80x,
    img.ads140s,
    img.ads300s,
    #slider-r,
    #slider-l,
    #slider-f,
    .xcc {
        display: none;
    }
}

.ads-header,
.ads-footer,
.ads-single {
    text-align: center;
}

.button {
    display: inline-block;
    padding: 10px 20px;
    border: 0;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease-in-out;
    background: linear-gradient(90deg, var(--headercolor), var(--header2color));
    color: var(--elementfont);
}

.button:active {
    transform: scale(0.98);
    background: linear-gradient(90deg, var(--header2color), var(--headercolor));
}

/* ✅ แสดงยอดวิว */
.list-box-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    padding: 5px 10px;
    background: var(--bg2color);
    color: var(--headercolor);
    border-top: 2px solid var(--header2color);
}

/* ✅ ปรับสไตล์ยอดวิว */
.views {
    display: block;
    align-items: center;
    font-weight: bold;
}

/* ✅ ปรับสไตล์ปุ่มโหวต */
.vote-buttons {
    display: flex;
    gap: 10px;
}

/* ✅ ปุ่ม Like & Dislike */
.vote-btn {
    background: none;
    padding: 5px 10px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    display: flex;
    align-items: center;
    gap: 5px;
    border: 2px solid var(--headercolor);
    color: var(--headercolor);
}

.vote-btn:hover {
    background: var(--headercolor);
    color: var(--elementfont);
}

.vote-btn.active {
    background: var(--headercolor);
    color: var(--elementfont);
    border-color: var(--header2color);
}

/* ✅ โครงสร้างหลักของกล่องคอมเมนต์ */
#comment-section {
    background: linear-gradient(180deg, var(--bg2color), var(--bgcolor));
    padding: 15px;
    border: 2px solid var(--bg2color);
    color: var(--elementfont);
    margin: 10px auto;
}

/* ✅ หัวข้อคอมเมนต์ */
#comment-section h3 {
    font-size: 1.5rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 10px;
    color: var(--element1);
}

/* ✅ รายการคอมเมนต์ */
#comments-list {
    margin-bottom: 15px;
    background: var(--bg2color);
    padding: 10px;
    border-radius: 3px;
}

/* ✅ รูปแบบของคอมเมนต์ */
.comment-item {
    display: flex;
    padding: 10px;
    border-bottom: 1px solid var(--bg2color);
    transition: all 0.2s ease-in-out;
}

/* ✅ เอฟเฟกต์ Hover */
.comment-item:hover {
    background: rgba(255, 0, 100, 0.1);
    transform: translateY(-2px);
}

/* ✅ Avatar ของผู้คอมเมนต์ */
.comment-avatar {
    margin-right: 10px;
}

.comment-avatar img {
    border-radius: 50%;
    border: 2px solid #ff006a;
}

/* ✅ เนื้อหาคอมเมนต์ */
.comment-content {
    flex-grow: 1;
}

.comment-content strong {
    font-size: 1rem;
    color: var(--fontcolor);
    display: block;
}

.comment-content p {
    font-size: 0.95rem;
    color: var(--elementfont);
    line-height: 1.4;
    margin-top: 5px;
}

/* ✅ ฟอร์มส่งคอมเมนต์ */
#comment-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 15px;
    background: var(--bg2color);
    border: 2px solid var(--header2color);
    box-shadow: 0 0 10px rgba(var(--shadow), 0.5);
}

/* ✅ ช่องกรอกข้อมูล */
#comment-form input,
#comment-form textarea {
    width: 100%;
    padding: 10px;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s ease-in-out;
    border: 2px solid var(--header2color);
    background: var(--bg2color);
    color: var(--elementfont);
}

#comment-form input:focus,
#comment-form textarea:focus {
    border-color: var(--element1);
    box-shadow: 0 0 8px rgba(var(--shadow), 0.5);
}

/* ✅ ปุ่มส่งคอมเมนต์ */
#comment-form button {
    border: none;
    padding: 12px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    text-transform: uppercase;
    font-weight: bold;
    background: linear-gradient(90deg, var(--header2color), var(--element1));
    color: var(--elementfont);
}

#comment-form button:hover {
    background: linear-gradient(90deg, var(--element1), var(--header2color));
    box-shadow: 0 0 10px rgba(var(--shadow), 0.7);
}

/* ✅ Responsive สำหรับมือถือ */
@media (max-width: 768px) {
    #comment-section {
        padding: 10px;
    }

    .comment-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .comment-avatar {
        margin-bottom: 5px;
    }

    #comment-form {
        padding: 10px;
    }
}

/*** TAGS ***/
.tag-letter {
    font-size: 24px;
    margin-top: 20px;
}

.tag-list {
    list-style: none;
    padding: 0;
    border-bottom: 1px solid var(--separator);
}

.tag-list li {
    display: inline-block;
    margin: 5px 10px;
}

.tag-list a {
    text-decoration: none;
    text-decoration: none;
    color: var(--element2border);
}

.tag-list a:hover {
    text-decoration: underline;
}

.category-listing {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 20px 0;
}

.category-item {
    width: 200px;
    text-align: center;
    background-color: var(--bg2color);
    padding: 15px;
    transition: all 0.3s ease;
}
  
.category-item:hover {
    transform: translateY(-5px);
}
  
.category-item img {
    width: 100%;
    height: auto;
    border: 2px solid var(--elementfont);
    object-fit: cover;
    margin-bottom: 10px;
}
  
.category-item .cat-title {
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 5px;
}
  
.category-item .post-count {
    font-size: 0.9em;
    color: var(--fontcolor);
}

.category-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 10px;
}

.footer-link {
    color: var(--elementfont);
    text-decoration: none;
    transition: color 0.3s ease-in-out;
}

.footer-link:hover {
    color: var(--element1);
    text-decoration: none;
}

.novideo {
    font-size: xxx-large; text-align: center; padding: 100px; font-weight: bold;
    text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
    background: 
      repeating-radial-gradient(#000 0 0.0001%,#fff 0 0.0002%) 50% 0/2500px 2500px,
      repeating-conic-gradient(#000 0 0.0001%,#fff 0 0.0002%) 60% 60%/2500px 2500px;
    background-blend-mode: difference;
    animation: b .2s infinite alternate;
  }
  @keyframes b{
    100% {background-position: 50% 0, 60% 50%}
  }

/** TAB **/
.single-tabs-container {
    margin-top: 30px;
}

.tab-nav {
    display: flex;
    flex-wrap: wrap;
    background: var(--bgcolor);
    border-bottom: 2px solid var(--headercolor, --element1);
    margin-bottom: 15px;
    padding: 0;
    list-style: none;
}

.tab-nav li {
    padding: 10px 10px;
    cursor: pointer;
    background: var(--bgcolor);
    border-right: 1px solid #333;
    color: var(--fontcolor, --element1);
    font-weight: bold;
    transition: background 0.3s;
}

.tab-nav li:hover {
    background: var(--bg2color);
}

.tab-nav li.active {
    background: var(--headercolor, --separator);
    color: #fff;
}

.tab-nav li i {
    margin-right: 8px;
}

.tab-content {
    display: none;
    padding: 15px;
    background: #1a1a1a;
    border: 1px solid #333;
    color: var(--fontcolor);
}

.tab-content.active {
    display: block;
}

.bounce-icon {
    animation: bounce 1s infinite;
    color: #ffd700;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

/*** CSS CATEGORIES AND ACTORS PAGE ***/
.category-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.category-item {
    flex: 0 0 25%;
    max-width: 15%;
    background: var(--bg2color);
    padding: 10px;
    border: 1px solid #444;
    box-shadow: 0 0 10px rgba(var(--shadow), 0.2);
    text-align: center;
    transition: transform 0.2s ease;
}

.category-item:hover {
    transform: scale(1.03);
    box-shadow: 0 0 15px rgba(var(--element2shadow), 0.4);
}

.category-item img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
    margin-bottom: 10px;
    border-radius: 4px;
}

.category-link {
    text-decoration: none;
    color: inherit;
}

.category-item h3 {
    margin: 0;
    font-size: 1.1em;
    color: var(--fontcolor);
}

.post-count {
    color: #aaa;
    font-size: 0.9em;
    text-align: center;
}


.actor-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.actor-item {
    flex: 0 0 25%;
    max-width: 25%;
    background: var(--bg2color);
    padding: 10px;
    border: 1px solid #444;
    box-shadow: 0 0 10px rgba(var(--element2shadow), 0.2);
    text-align: center;
}

.actor-item img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
    margin-bottom: 10px;
    border-radius: 4px;
}

.actor-link {
    text-decoration: none;
    color: inherit;
}

.actor-item h3 {
    font-size: 1.1em;
    color: var(--fontcolor);
}

.actor-item .post-count {
    color: #aaa;
    font-size: 0.9em;
    text-align: center;
}
