/* Masonry using CSS columns for explore-like layout */
.masonry {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  grid-auto-rows: masonry; /* works in Firefox */
  gap: 30px;
}

.card {
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  box-shadow: rgb(255 255 255 / 16%) 0px 1px 4px;
  transition: transform 250ms cubic-bezier(.2,.9,.3,1), box-shadow 200ms;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 18px 40px rgba(2,6,23,0.75);
}


/* Cards inside columns must be inline-block to participate */
/*.card {*/
/*    display: inline-block;*/
/*    width: 100%;*/
/*    margin: 0 0 20px;*/
/*    border-radius: 16px;*/
/*    overflow: hidden;*/
/*    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));*/
/*    box-shadow: rgb(255 255 255 / 16%) 0px 1px 4px;*/
/*    transform-origin: center;*/
/*    transition: transform 250ms cubic-bezier(.2,.9,.3,1), box-shadow 200ms;*/
/*}*/

/*.card:focus-within, .card:hover{ */
/*    transform: translateY(-8px); */
/*    box-shadow: 0 18px 40px rgba(2,6,23,0.75); */
/*}*/

/* thumbnail area */
.media {
    position: relative;
    display:block;
    width:100%;
    overflow:hidden;
    background: #071022;
}

/* control aspect ratios using aspect-ratio when supported */
.media img{
    display:block;
    width:100%;
    height:100%;
    object-fit: cover;
    transition: transform 420ms cubic-bezier(.2,.9,.3,1);
    -webkit-user-drag: none;
    -webkit-user-select:none;
    user-select:none;
}

/* overlay appear on hover */
.media-overlay {
    position:absolute; 
    inset:0;
    display:flex;
    align-items:center;
    justify-content:center;
    background: linear-gradient(180deg, rgba(0,0,0,0.0), rgba(0,0,0,0.6));
    opacity:0; transition: opacity 220ms ease;
}
.card:hover .media-overlay, .card:focus-within .media-overlay { 
    opacity:1; 
}

.gt-news-image:hover .media-overlay, .gt-news-image:focus-within .media-overlay { 
    opacity:1; 
}

/* Play button */
.play {
    width:64px; 
    height:64px;
    border-radius: 50%;
    background: rgb(9 12 19);
    display:flex; 
    align-items:center; 
    justify-content:center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.45);
    cursor:pointer; 
    transform:scale(1); 
    transition: transform 160ms ease;
}
.play:hover{ 
    transform: scale(1.08); 
}

.play img{
    width: 30px !important;
    height: 30px !important;
    object-fit: contain;
}

.meta {
    padding: 10px 12px;
    background-color: var(--gt-theme);
}

.meta h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #f6fbff;
    line-height: 1.3;
    display: flex;            /* keeps link + plays inline */
    align-items: center;      /* vertical center */
    gap: 6px;                 /* space before/after the dot */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.meta h3 a {
    color: #f6fbff;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.meta .plays {
    font-size: 12px;
    color: var(--gt-text);
    font-weight: 400;
}

/* Play preview micro animation */
.card:hover img{ 
    transform: scale(1.07) rotate(.2deg); 
    filter: saturate(1.05) contrast(1.02); 
}

/* Aspect helpers using aspect-ratio if supported, fallback via padding hack */
.ratio-9x16{ 
    aspect-ratio: 9 / 16; 
    width:100%; 
    height:auto; 
}
.ratio-16x9{ 
    aspect-ratio: 16 / 9; 
    width:100%; 
    height:auto; 
}
.ratio-square{ 
    aspect-ratio: 1 / 1; 
    width:100%; 
    height:auto; 
}

/* small responsive tweaks */
@media (max-width:520px){
    .play{ width:50px; height:50px; }
}

.ad-container {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    margin:0 0 30px; 
    text-align:center;
}

.ad-container ins {
    display: block !important;
    margin: auto;
    max-width: 100%;
}
.ad-title{
    font-size:13px;
    color: #ffffff;
    background-color: #ec0707;
}

.category-box {
    display: flex; 
    align-items: center;
    grid-column-start: span 2;
    grid-row-start: span 1;
    overflow: hidden;
    background-color: var(--gt-white);
    border-radius: var(--gt-border-radius);
    box-shadow: rgb(255 255 255 / 16%) 0px 1px 4px;
}

.category-box .category-img {
    transition: transform 0.3s ease;
     border-radius: 16px 0 0 16px;
}

.category-box:hover .category-img {
    transform: scale(1.15); /* zoom effect */
}

.category-text {
    color: var(--gt-theme);
    font-weight: 700;
    font-size: 12px;
    line-height: 20px;
    padding: 0 8px;
    -webkit-font-smoothing: antialiased;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.category-box:nth-child(1)  { background: #FFCDD2; }   /* soft red */
.category-box:nth-child(2)  { background: #BBDEFB; }   /* soft blue */
.category-box:nth-child(3)  { background: #C8E6C9; }   /* soft green */
.category-box:nth-child(4)  { background: #FFF9C4; }   /* soft yellow */
.category-box:nth-child(5)  { background: #E1BEE7; }   /* soft purple */
.category-box:nth-child(6)  { background: #FFE0B2; }   /* soft orange */
.category-box:nth-child(7)  { background: #B2EBF2; }   /* soft cyan */
.category-box:nth-child(8)  { background: #FFCCBC; }   /* soft peach */
.category-box:nth-child(9)  { background: #DCEDC8; }   /* soft lime */
.category-box:nth-child(10) { background: #D1C4E9; }   /* soft lavender */
.category-box:nth-child(11) { background: #FFF59D; }   /* soft bright yellow */
.category-box:nth-child(12) { background: #B2DFDB; }   /* soft teal */
.category-box:nth-child(13) { background: #FFE082; }   /* soft cream */
.category-box:nth-child(14) { background: #F8BBD0; }   /* soft rose */
.category-box:nth-child(15) { background: #CFD8DC; }   /* soft grey */

.no-more {
  color: #ccc;
  font-size: 15px;
  text-align: center;
  margin: 20px 0;
  font-style: italic;
}

.gt-theme-btn {
  transition: transform 0.3s ease;
  animation: floatButton 1.8s ease-in-out infinite;
}

@keyframes floatButton {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-18px);
  }
}

.gt-theme-btn:hover {
  background-image: linear-gradient(to right, #7A0202 0%, #FF0808 50%, #7A0202 100%);
  transform: scale(1.05);
}