/* Condensed CSS for vi/index.html
   Contains resets + only selectors used on the page */

/* Reset / Base */
*{
    text-decoration: none;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

h1, h2, h3, h4, h5, h6, p, ul {
    padding: 0;
    margin: 0;
}

a {
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    display: inline-block;
}

body {
    font-size: 15px;
    background: #070e18;
    background: #232323;
    background: #1c1c1d;
    margin: 0 auto;
    color: #ddd;
    width: 100%;
    max-width: 800px;
    font-family: -apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
}

/* Header */
.header_container {
    display: flex;
    justify-content: space-between;
    padding-bottom: 5px;
    margin: 10px 15px 0;
    align-items: center;
}
.site_logo a {
    font-weight: bold;
    font-size: 1.4rem;
    transition: all 0.3s ease;
    color: #efefef;
}
.site_logo span {
    color: #d04519;
    padding-left: 3px;
} 
.menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    color: #afafaf;
    gap: 15px;
}
.menu a {
    font-weight: bold;
    transition: all 0.3s ease;
    color: #afafaf;
    gap: 10px;
}
.header_container a:hover { color: #fff; }

.panel {
    display: block;
    background: #252728;
    /* background: linear-gradient(to right, #252728, transparent) !important; */
    margin: 5px;
    border-radius: 10px;
    box-shadow: 1px 1px 5px #000;
}
.panel_list {display: flex;flex-direction: column;width: 100%;}

.panel_post {
    display: block;
    margin: 5px;
    border-radius: 10px;
    overflow: hidden;
    color: #e2e5e9;
    background: #252728;
    box-shadow: 1px 1px 5px #000;
}

/* Navigation filters (was .filter) */
.nav {
    padding: 5px 10px;
    background: #52525257;
    /* background: linear-gradient(to right, #4b4b4b57, transparent) !important; */
    display: flex;
    gap: 5px;
    border-radius: 10px 10px 0 0;
}
.nav_link {
    padding: 3px 10px;
    /* font-weight: bold; */
    border-radius: 8px;
    transition: all 0.3s ease;
    color: #dedede;
}
.nav_link:hover {background: #272727d1;color: #fff;}

.post_content {
    display: grid;
    gap: 10px;
    padding: 10px 15px 15px;
    color: #ddd;
}
.date {
    display: flex;
    padding: 5px 10px;
    color: #a9a9a9;
    margin: 5px;
    justify-content: right;
}
 

.post_title {
    padding: 15px 15px 0;
}
.post_title h1 {
    font-size: 1.2em;
    color: #ddd;
}
/* Cards grid (was .box-char) */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
    gap: 9px 9px;
    padding: 12px;
}
.cards span {
    padding: 10px;
    color: #fff;
    font-size: 0.9em;
    position: absolute;
    bottom: 0;
    z-index: 2;
    padding: 5px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    width: 100%;
    background: linear-gradient(to top, rgb(0 0 0 / 90%) 0%, rgb(0 0 0 / 60%) 60%, rgb(0 0 0 / 60%) 60%, rgb(0 0 0 / 0%) 100%);
}

.card {
    border-radius: 10px;
    padding: 0 0 5px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
    text-align: center;
    color: #fff;
    box-shadow: #050505d1 0px 5px 10px;
    display: block;
    width: 100%;
    height: 0;
    padding-top: 177.7778%; /* fallback: height = 16/9 of width (portrait 9:16) */
    aspect-ratio: 9/16; /* modern browsers: width / height = 9/16 (portrait) */
    border-radius: 10px;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-color: transparent !important;
    position: relative;
    overflow: hidden;
    color: #fff;
}
.card img {width: 100%;border-radius: 50%;padding: 5px;}



/* Rarity/color variations */
.card.UR { background: #247fc7b3; }
.card.UR:hover { background: #3c9deab3; transform: translateY(-2px); }
.card.SP { background: #b24343b3; }
.card.SP:hover { background: #b24343; transform: translateY(-2px); }
.card.SSR { background: #a49437b5; box-shadow: #000 0px 0px 15px; }
.card.SSR:hover { background: #a49437; transform: translateY(-2px); }
.card.SR { background: #70547282; box-shadow: #000 0px 0px 15px; }
.card.SR:hover { background: #705472; transform: translateY(-2px); }
.card.R { background: #2a3a4bfc; box-shadow: #000 0px 0px 15px; }
.card.R:hover { background: #345475; transform: translateY(-2px); }
.card { background: #585858b3; }
.card:hover { background: #696969b3; transform: translateY(-2px); }
/* Small responsive tweak */
@media (max-width: 640px) {
    .cards { grid-template-columns: repeat(auto-fill, minmax(95px, 1fr)); }
}

/* Post image gallery: lead image full-width, thumbnails row below */
.post_img {
    display: flex;
    flex-direction: column;
    gap: 3px;
    position: relative;
}
.post_img > img {
  aspect-ratio: 16/9;
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  /* border-radius: 10px 10px 0 0; */
}
.thumbs_row {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 4px 4px 7px 4px;
    margin: 1px 1px 15px;
}
.thumbs_row img {
    flex: 0 0 auto;
    width: 120px;
    height: 70px;
    object-fit: cover;
    /* border-radius: 5px; */
    cursor: pointer;
}
.thumbs_row img.thumb_active {
    outline: 3px solid #d04519;
}

/* Gallery nav arrows */
.gallery_nav {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    background: rgb(0 0 0 / 0%);
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.8rem;
}
.gallery_prev {left: 10px;}
.gallery_next {right: 10px;}

.gallery_prev,.gallery_next {transition: all 0.3s ease;color: #bbbbbb;}
.gallery_prev:hover, .gallery_next:hover {color: #fff;}


/* Thiết lập chiều rộng của thanh cuộn */
::-webkit-scrollbar {
  position: absolute;
  top: 0px; /* Cách top modal 5px */
  right: 0px; /* Cách bên phải modal 5px */
}

/* Thiết lập màu nền cho thanh cuộn */
::-webkit-scrollbar-track {
  background: #181b1ff2;
}

/* Thiết lập màu của phần cuộn của thanh cuộn */
::-webkit-scrollbar-thumb {
  background: #4e4d4d;
  border-radius: 0px;
  margin: 0px;
}

/* Thiết lập màu nền của thanh cuộn khi di chuột qua */
::-webkit-scrollbar-thumb:hover {
  background: #555;
}


 



@media (max-width: 640px) {
.thumbs_row img { width: 90px; height: 60px; }
.gallery_nav {font-size: 1.2rem;}

}
/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.modal.active {
    display: block;
}

.modal_overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
}

.modal_content {
    background-color: #252728;
    margin: 0px auto;
    width: 100%;
    height: calc(100% - 0px);
    overflow: auto;
    max-width: 780px;
    clip-path: inset(0 round 0px);
    box-shadow: rgba(3, 3, 13, 0.03) 0px 1px 2px 0px, rgba(3, 3, 13, 0.05) 0px 1px 3px 0px, rgba(255, 255, 255, 0.15) 0px 1px 0px 0px inset;
}

.modal_close {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: #9699aa;
    border-radius: 50%;
    margin: 0 6px;
    justify-content: center;
    display: flex;
    align-items: center;
    z-index: 99999;
    box-shadow: 1px 1px 5px #000;
}

.modal_close img {
    width: 50px;
    border-radius: 50%;
    filter: opacity(80%);
    border: solid 1px;
    cursor: pointer;
}

.modal_close img:hover {
filter: opacity(90%);
}
 


@media (max-width: 640px) {
    .modal_content {
      width: 100%;
      height: 100%;
      max-height: 100%;
      border-radius: 0;
      margin: 0;
      padding-bottom: 60px;
      clip-path: inset(0 round 0px);
    }
   .post_img > img {
       border-radius:0;
   }
  
body {
    font-size: 14px;}
}