/* จัดทุกอย่างให้อยู่กลางหน้าเพจ */

.you-tube-page-center {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;   /* อยู่ด้านบน */
    align-items: center;
    text-align: center;
    padding: 40px 20px 40px;       /* ลด padding-top จาก 80 → 40 */
}

/* หัวเรื่อง */
.you-tube-video-title {
    font-size: 28px;
    font-weight: 700;
    color: #d4af37;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

/* กรอบทอง */
.you-tube-video-frame-gold {
    background: linear-gradient(135deg, #d4af37, #b8860b);
    padding: 4px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.35);
    width: 90%;
    max-width: 800px;
}

/* ตัววิดีโอ */
.you-tube-video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    background: #000;
}

.you-tube-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Caption ใต้คลิป */
.you-tube-video-caption {
    margin-top: 10px;
    font-size: 18px;
    color: #d4af37;
    font-weight: 500;
    letter-spacing: 0.5px;
}
/*----*/
.playlist-grid.you-tube {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.playlist-item {
    display: block;
    padding: 20px 15px;
    text-align: center;
    border-radius: 10px;
    background: rgba(0,0,0,0.35);
    border: 1px solid #d4af37;
    text-decoration: none;
    transition: 0.25s;
}

.playlist-item h3 {
    color: #d4af37;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}

.divider {
    width: 60%;
    height: 2px;
    background: linear-gradient(to right, transparent, #d4af37, transparent);
    margin: 0 auto;
}

.playlist-item:hover {
    background: rgba(212,175,55,0.15);
    transform: translateY(-3px);
    box-shadow: 0 0 12px rgba(212,175,55,0.35);
}

/*--ปุ่ม--*/
.yt-back-btn {
    margin-top: 18px;
    display: inline-block;
    padding: 10px 18px;
    border: 1px solid #d4af37;
    border-radius: 8px;
    color: #d4af37;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    transition: 0.25s;
}

.yt-back-btn:hover {
    background: rgba(212,175,55,0.15);
    box-shadow: 0 0 10px rgba(212,175,55,0.35);
    transform: translateY(-2px);
}

/* ========================= */
/*      RESPONSIVE FIX       */
/* ========================= */

/* มือถือเล็ก */
@media (max-width: 480px) {
    .you-tube-video-title {
        font-size: 22px;
    }

    .you-tube-video-caption {
        font-size: 16px;
    }

    .playlist-item h3 {
        font-size: 18px;
    }

    .playlist-grid.you-tube {
        gap: 18px;
    }
}

/* แท็บเล็ต */
@media (max-width: 768px) {
    .you-tube-video-title {
        font-size: 24px;
    }

    .playlist-grid.you-tube {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}
/* มือถือ: ลดความสูงของบล็อกวิดีโอ เพื่อดัน playlist ขึ้น */
@media (max-width: 480px) {
    .you-tube-page-center {
        min-height: auto;      /* เอา 100vh ออก */
        padding-top: 20px;     /* ดันขึ้นเล็กน้อย */
        padding-bottom: 20px;
    }
}
