:root {
    --kdf-primary: #22b3c9;
    --kdf-primary-2: #4fd1c5;
    --kdf-bg: #f7f9fb;
    --kdf-card: #ffffff;
    --kdf-text: #1f2933;
    --kdf-muted: #6b7280;
    --kdf-radius: 10px;
    --kdf-shadow-sm: 0 6px 16px rgba(0,0,0,.08);
    --kdf-shadow-md: 0 16px 40px rgba(0,0,0,.14);
    --kdf-shadow-lg: 0 40px 120px rgba(0,0,0,.35);
}

.kdf-yt-container {
    width: 100%;
    margin: 0;
    position: relative;
    font-family: system-ui, -apple-system, Inter, sans-serif;
    color: var(--kdf-text);
}

.kdf-yt-container * {
    box-sizing: border-box !important;
}

/* ===== TABS (PRO) ===== */
.kdf-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.kdf-tabs button {
    all: unset;
    padding: 10px 15px;
    border-radius: 999px;
    background: rgba(255,255,255,.7);
    backdrop-filter: blur(8px);
    color: var(--kdf-muted);
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    box-shadow: var(--kdf-shadow-sm);
    transition: all .25s ease;
}

.kdf-tabs button:hover {
    transform: translateY(-2px);
    color: var(--kdf-primary);
}

.kdf-tabs button.active {
    background: linear-gradient(135deg, var(--kdf-primary), var(--kdf-primary-2));
    color: #fff;
    box-shadow: var(--kdf-shadow-md);
}

/* ===== TABS CONTENT ===== */
.kdf-tab { display: none }
.kdf-tab.active { display: block }

/* ===== GRID ===== */
.kdf-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 10px 4px 30px;
}

/* ===== CARD ===== */
.kdf-card {
    background: var(--kdf-card);
    border-radius: var(--kdf-radius);
    padding: 14px;
    box-shadow: var(--kdf-shadow-sm);
    scroll-snap-align: start;
    transition: all .35s cubic-bezier(.2,.8,.2,1);
    position: relative;
}

.kdf-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,.04));
    pointer-events: none;
}

.kdf-card:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: var(--kdf-shadow-md);
}

/* ===== THUMB ===== */
.kdf-thumb {
  position: relative;
  cursor: pointer;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.kdf-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

/* ===== PLAY BUTTON ===== */
.kdf-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  color: white;
  background: linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.6));
  opacity: 0;
  transition: .3s;
}

.kdf-card:hover .kdf-play-btn {
  opacity: 1;
}

.kdf-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,.7);
  color: white;
  font-size: 12px;
  padding: 3px 6px;
  border-radius: 4px;
}
.kdf-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0,0,0,.7);
  color: white;
  font-size: 12px;
  padding: 3px 6px;
  border-radius: 4px;
}


/* ===== TITLE ===== */
.kdf-card p {
  margin: 14px 6px 4px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.4;
  color: var(--kdf-text);
  display: none;
}

/* ===== PLAYLIST TITLE ===== */
.kdf-playlist-title {
  margin: 30px 6px 14px;
  font-size: 20px;
  font-weight: 700;
  color: var(--kdf-text);
}

/* ===== MODAL CINEMÁTICO ===== */
.kdf-modal {
  position: fixed;
  inset: 0;
  background: rgba(8,12,18,.88);
  backdrop-filter: blur(12px);
  display: none;
  z-index: 99999;
}

.kdf-modal.showw {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: kdfFadeIn .3s ease;
}

@keyframes kdfFadeIn {
  from { opacity: 0 }
  to { opacity: 1 }
}

.kdf-modal-content {
  width: 100%;
  max-width: 800px;
  background: #fff;
  border-radius: 15px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--kdf-shadow-lg);
  transform: scale(.9);
  animation: kdfZoom .35s ease forwards;
}

@keyframes kdfZoom {
  to { transform: scale(1) }
}

.kdf-modal-title {
    padding: 10px 15px;
    background: #19b6d3;
}

.kdf-modal-title h4 {
    margin: 0px;
    color: #fff;
    font-size: 20px;
}

.kdf-modal-video {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
}

.kdf-modal-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.kdf-modal-info {
    padding: 25px;
    display: flex;
    justify-content: space-between;
}

.kdf-modal-info .count {
    display: flex;
    gap: 10px;
}

.kdf-modal-info .count p {
    margin: 0px;
}

.kdf-modal-info .count p i {
    color: #009975;
}

.kdf-modal-info .downloads a {
    background: #32ad90;
    padding: 10px 15px;
    color: white;
    border-radius: 10px;
}

.kdf-modal-info .downloads a:hover {
    background: #009975;
}

/* Close glass */
.kdf-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(34, 179, 201,.18);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  cursor: pointer;
  transition: .25s;
  z-index: 2;
}

.kdf-modal-close:hover {
    background: var(--kdf-primary);
    transform: rotate(90deg);
}

/* ===== SEARCH ===== */
.kdf-search {
    margin-bottom: 20px;
}

.kdf-search-input {
    width: 100%;
    padding: 15px 20px !important;
    border-radius: 999px !important;
    border: 1px solid #e5e7eb !important;
    font-size: 14px;
    outline: none !important;
    box-shadow: var(--kdf-shadow-sm);
}

.kdf-search-input:focus {
  border-color: var(--kdf-primary);
}

/* ===== TABLET ===== */
@media (max-width: 850px) {
    .kdf-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ===== MOBILE ===== */
@media (max-width: 640px) {
    .kdf-grid {
        grid-template-columns: 1fr;
    }
}
