/* ================= RESET ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #000;
    color: #eee;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

/* ================= HEADER ================= */
.header {
    background: linear-gradient(#111, #232222fa);
    border-bottom: 1px solid #412f2f;
}

.header-inner {
    max-width: 1400px;
    margin: auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
   
}

.logo {
    font-size: 22px;
    font-weight: bold;
    color: #ffd24c;
}
.logo img {
    height: 35px;
}

.nav {
    display: flex;
    gap: 16px;
}

.nav a {
    background: #3e0616;
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 17px;
    color: #ccc;
    text-shadow: -2px 3px 9px #000000;
    font-weight: bold;
    
}

.nav a:hover {
    color: #ffd24c;
    background: #4e091c;
    transition: .3s;
}

.menu-toggle {
    display: none;
    font-size: 35px;
    cursor: pointer;
}

/* ================= LAYOUT ================= */
.container {
    max-width: 1400px;
    margin: auto;
    padding: 16px;
}

.single-content {
    margin-bottom: 18px;
    background: #141414;
    padding: 10px;
    border-radius: 5px;
}
.section {
    margin-bottom: 18px;
    background: #141414;
    padding: 10px;
    border-radius: 5px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.section-header h2 {
    font-size: 20px;
    font-weight: bold;
}

/* ================= TITLES ================= */
.title-hot {
    color: #ffcc33;
}

.title-series {
    color: #ff66cc;
}

.title-movie {
    color: #66ccff;
}

.view-all {
    font-size: 17px;
    color: #ffffff;
}

.view-all:hover {
    color: #dbc047;
}

/* ================= CAROUSEL ================= */
.carousel {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 6px;
}

.carousel::-webkit-scrollbar {
    height: 6px;
}

.carousel::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}

/* ================= GRID ================= */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

/* ================= CARD ================= */
.card {
    background: #211f1fd9;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid #2f2f2f;
}
.card:hover {
    background: #4f4949d9;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid #777575;
    transition: all 0.3s ease;
}

.poster {
    position: relative;
    background: #000;
}

.poster img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

/* ================= BADGES ================= */
.badge {
    position: absolute;
    top: 6px;
    right: 6px;
    padding: 2px 6px;
    font-size: 11px;
    border-radius: 4px;
    font-weight: bold;
}

.badge.pink {
    background: #ff4fa3;
    color: #fff;
}

.badge.green {
    background: #2ecc71;
    color: #000;
}

.badge.orange {
    background: #ff9f1a;
    color: #000;
}

/* ================= CARD BODY ================= */
.card-body {
    padding: 8px;
}

.card-body .title {
    font-size: 14px;
    font-weight: 600;
    margin-top: 6px;
    color: #fff;
    min-height: 36px;
    text-align: center;
}

.ep-row {
    align-items: center;
    font-size: 11px;
    margin-bottom: 4px;
    position: absolute;
    bottom: -5px;
    display: block;
}
h3.nameep {
    background: #234a71;
    color: #d9cdcd;
}
h2.metaname {
    background: linear-gradient(70deg, #234a71 0, #00334d 100%);
    padding: 0 18px;
    border-radius: 5px 5px 0 0;
    margin: -10px -10px 18px -10px;
}

.ep {
    padding: 2px 5px;
    border-radius: 3px;
    background: #2ecc71;
    color: #000;
    font-weight: bold;
}

.status {
    padding: 2px 5px;
    border-radius: 3px;
    background: #ff4fa3;
    color: #fff;
    font-weight: bold;
}

.year {
    padding: 2px 5px;
    border-radius: 3px;
    background: #575757;
    color: #fff;
    font-weight: bold;
    margin-left: 2px;
}

/* ================= FOOTER ================= */
.footer {
    border-top: 1px solid #222;
    background: #000;
    padding: 20px 10px;
    text-align: center;
    font-size: 13px;
    color: #888;
}

.footer strong {
    color: #ffd24c;
}

/* ================= SINGLE LAYOUT ================= */
.single-wrapper {
    display: grid;
    grid-template-columns: 1fr 250px;
    gap: 15px;
    align-items: flex-start;
}

/* ================= MAIN ================= */
.single-main {
    min-width: 0;
    background: #2f2c2c;
    padding: 7px;
    border-radius: 5px;
}

.single-title {
    font-size: 24px;
    line-height: 1.4;
    margin-bottom: 6px;
    color: #fff;
}

.single-meta {
    font-size: 13px;
    color: #aaa;
    margin-bottom: 10px;
}

.single-categories {
    margin-bottom: 14px;
}

.single-categories a {
    font-size: 13px;
    margin-right: 6px;
    color: #ff4fa3;
}

.single-categories a:hover {
    text-decoration: underline;
}

/* ================= PLAYER ================= */

.player-box {
    background: #000;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}
.ep-box {
    background: #000000 url(/images/uploads/nwppjjws7fen2uk0mn5p.png);
    border-radius: 6px;
    overflow: hidden;
    margin: 10px 0;
    position: relative;
}

.player-placeholder {
    padding: 15px 0 20px;
    text-align: center;
    color: #777;
}
.player-switch {
    position: absolute;
    right: 10px;
    top: 10px;
}
/* ================= EP ================= */
.single-ep {
    margin-bottom: 16px;
}

/* ================= ARTICLE ================= */
.single-article {
    font-size: 16px;
    line-height: 1.8;
    color: #cdcdcd;
    padding: 10px;
    margin-bottom: 18px;
    border-radius: 5px;
    background: #141414;
}

.single-article h2 {
    font-size: 20px;
}
.single-article h3 { 
    font-size: 18px;
}
strong {
    color: #f1f1f1;
}
p {
    
    margin-bottom: 1rem;
}
/* ================= SIDEBAR ================= */
.single-sidebar {
    background: #0b0b0b;
    border: 1px solid #1c1c1c;
    border-radius: 8px;
    padding: 3px;
    
}

/* sidebar box */
.sidebar-box {
    margin-bottom: 20px;
    background: #201f1f;
    padding: 1px 0;
    
}

.sidebar-box h3 {
    font-size: 20px;
    margin-bottom: 12px;
    padding: 6px 12px;
    color: #ffd24c;
    
}

/* sidebar item */
.sidebar-item {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    align-items: center;
}

.sidebar-item img {
    width: 60px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.sidebar-item-title {
    font-size: 13px;
    line-height: 1.4;
    color: #ddd;
}

.sidebar-item:hover .sidebar-item-title {
    color: #ff4fa3;
}

/* sidebar menu */
.sidebar-menu a {
    display: block;
    font-size: 16px;
    color: #ffffff;
    background: #141414;
    font-weight: bold;
    
}

.sidebar-menu a:hover {
    color: #ffd24c;
    background-color: #2f2c2c;
    transition: .3s;
}

.sidebar-title {
    font-size: 20px;
    background: linear-gradient(332deg, #330404 0, #610a4e 100%);
    color: #ff0060;
    padding: 10px 10px;
    border-radius: 3px 3px 0 0;
    text-shadow: -2px 3px 9px #000000;
}
.list-menu a {
    border: 1px solid #353131;
    padding: 10px;
}

/* ================= PLAYER / EP ================= */
#player-frame {
    display: none;
}
.ep-sound-tabs {
    display: flex;
    gap: 8px;
    margin: 15px 0 0 22px;
}

.ep-sound-btn {
    padding: 10px 14px;
    font-size: 13px;
    background: #2d2d2d;
    color: #ccc;
    border-radius: 4px;
    border: 1px solid #878787;
    cursor: pointer;
}

.ep-sound-btn.active {
    background: #5f3724;
    color: #fff;
}

.ep-list {
    display: flex;
    overflow-y: auto;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-top: 20px;
    margin-bottom: 10px;
    margin-left: 10px;
}

.ep-items {
    display: none;
    flex-wrap: wrap;
    gap: 6px;
    position: relative;
    margin-bottom: 10px;
}

.ep-items.active {
    display: flex;
    justify-content: center;
    width: 100%;
}

.ep-item {
    width: 19%;
    height: 50px;
    padding: 6px 10px;
    font-size: 17px;
    background: #2d2d2d;
    color: #fffdf8;
    border-radius: 4px;
    border: 1px solid #878787;
    font-weight: bold;
}
.ep-item:hover {
    background-color: #5f3724;
    transition: .3s;
}
.ep-item.watching {
    background: #5f3724;
}

.ep-item.active .watching-tex {
    background: #5f3724;
    color: #fff;
    
}
.ep-item .ep-status {
    display: block;
    font-size: 11px;
    margin-top: 2px;
    opacity: 0.85;
}
.ep-item .watching-text {
    color: #e6d010;
}
.ep-item .watched-text {
    color: #7dffb3;
}
button.player-btn.active {
    padding: 6px 10px;
    font-size: 13px;
    background: #5f3724;
    color: #fff;
    border-radius: 4px;
    border: 0;
    cursor: pointer;
}
button.player-btn {
    padding: 6px 10px;
    font-size: 13px;
    background: #2d2d2d;
    color: #ccc;
    border-radius: 4px;
    border: 0;
    cursor: pointer;
    font-weight: bold;
}
button.player-btn:hover {
    background-color: #5f3724;
    color: #fff;
    transition: .3s;
}
button#btn-report-ep {
    border: 1px solid #f1f1f1;
    padding: 5px 5px;
    background: #ff7979b3;
    border-radius: 15px;
    color: #000000;
}
button#btn-report-ep:hover {
    border: 1px solid #f76262;
    color: #ffffff;
    transition: .4s;
}
.report-ep-wrap {
    margin: 5px 0;
    text-align: right;
}

.sidebar-search .search-form {
    display: flex;
    gap: 6px;
}

.sidebar-search input {
    flex: 1;
    padding: 8px 5px;
    background: #111;
    border: 1px solid #222;
    border-radius: 4px;
    color: #fff;
    font-size: 13px;
}
.sidebar-search button {
    padding: 8px 12px;
    background: linear-gradient(332deg, #330404 0, #610a4e 100%);
    text-shadow: -2px 3px 9px #000000;
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}
.sidebar-search button:hover {
    opacity: .9;
}

/* ================= MOBILE SEARCH ================= */

.mobile-search {
  display: none;
}

.search-inline {
  position: relative;
}

.search-inline input {
  width: 180px;
  padding: 7px 58px 7px 10px; /* เผื่อที่ให้ปุ่ม */
  font-size: 13px;
  border-radius: 4px;
  border: 1px solid #222;
  background: #111;
  color: #fff;
}

.search-inline button {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 3px;
  border: none;
  background: #ff4fa3;
  color: #fff;
  cursor: pointer;
}

.search-inline button:hover {
  opacity: 0.9;
  
}

/* ===============================
   REPORT MODAL
=============================== */
.report-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 15px;
}

.report-modal.active {
    display: flex;
}

.report-modal-box {
    background: #fff;
    width: 100%;
    max-width: 420px;
    border-radius: 12px;
    padding: 18px;
    position: relative;
    animation: popIn .2s ease-out;
}

@keyframes popIn {
    from { transform: scale(.95); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.report-close {
    position: absolute;
    right: 12px;
    top: 10px;
    border: none;
    background: none;
    font-size: 26px;
    cursor: pointer;
    color: #666;
}

.report-title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 600;
}

.report-ep {
    font-size: 14px;
    color: #555;
    margin-bottom: 10px;
}

#reportMessage {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    resize: none;
    font-size: 14px;
    box-sizing: border-box;
}

#reportMessage:focus {
    outline: none;
    border-color: #4e73df;
}

.report-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.btn-cancel,
.btn-submit {
    flex: 1;
    border: none;
    border-radius: 8px;
    padding: 10px;
    font-size: 15px;
    cursor: pointer;
}

.btn-cancel {
    background: #eee;
}

.btn-submit {
    background: #e74a3b;
    color: #fff;
}

.report-status {
    display: none;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 10px;
}

.report-status.show { display: block; }

.report-status.success {
    background: #e6f4ea;
    color: #137333;
}

.report-status.error {
    background: #fdecea;
    color: #b3261e;
}

.report-status.info {
    background: #e8f0fe;
    color: #1a73e8;
}

.report-status.warning {
    background: #fff4e5;
    color: #a05a00;
}
.list-bbr{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40%, 1fr));
    gap: 5px;
    
}
.box-ads {
    position: relative;
    margin-top: 15px;
}
.list-bbr img {
    width: 100%;
    height: auto;
}
/* ================= RESPONSIVE ================= */
@media (max-width: 992px) {

    .single-wrapper {
        grid-template-columns: 1fr;
    }

    .single-sidebar {
        position: static;
        margin-top: 24px;
    }
    .ep-item {
        width: 20%;
        height: 50px;
        font-size: 14px;
    }
}
@media (max-width: 768px) {
    .nav {
        display: none;
        position: absolute;
        top: 83px;
        left: 0;
        width: 100%;
        background: #292424;
        flex-direction: column;
        border-top: 1px solid #c55252;
        z-index: 1;
        gap: 1px;
    }

    .nav.active {
        display: flex;
    }

    .nav a {
        padding: 10px 16px;
        border-bottom: 1px solid #111;
        border-radius: 1px;
    }

    .menu-toggle {
        display: block;
    }
    .mobile-search {
    display: block;
  }

  .nav {
    display: none;
  }

    .poster img {
        height: 240px;
    }
    .header-inner {
    justify-content: space-evenly;
    }
    .single-title {
    font-size: 16px;
    text-align: center;
    }
    .ep-sound-tabs{
        justify-content: center;
    }
    .ep-item {
    width: 25% !important;
    }
    .list-bbr {
		grid-template-columns: repeat(auto-fill, minmax(50%, 1fr)) !important;
	}
	
}
       
@media (max-width: 480px) {
    .report-modal-box {
        padding: 15px;
    }
}

@media (max-width: 400px) {
    .logo {
    font-size: 17px;
    }

    .menu-toggle {
    font-size: 30px;
    }
    .grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 14px;
    }
}
/* ================= END Responsive ================= */

