/* youtube.css */

.youtube-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.search-bar, .playlist-bar {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 20px;
}

.search-bar input, .playlist-bar input {
    width: 70%;
    max-width: 500px;
    padding: 10px;
    font-size: 16px;
    border: 2px solid #FFD700;
    border-radius: 20px 0 0 20px;
    background: radial-gradient(circle, #111, #000);
    color: #fff;
}

.search-bar button, .playlist-bar button {
    padding: 10px 20px;
    font-size: 16px;
    background: linear-gradient(#FFD700, #DAA520);
    color: #000;
    border: none;
    border-radius: 0 20px 20px 0;
    cursor: pointer;
}

.search-bar button:hover, .playlist-bar button:hover {
    background: linear-gradient(#DAA520, #FFD700);
}

.results-flex {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

.yt-card {
    background: radial-gradient(circle, #222, #000);
    border: 2px solid #FFD700;
    border-radius: 15px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    transition: transform 0.2s;
    flex: 1 1 250px;
    max-width: 350px;
}

.yt-card:hover {
    transform: scale(1.05);
}

.video-player {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 10px;
}

.video-player img,
.video-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.title-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
}

.title-container p {
    flex: 1;
    font-size: 14px;
    color: #FFD700;
    margin: 0 10px 0 0;
    text-align: left;
}

.copy-icon {
    cursor: pointer;
    color: #FFD700;
    font-size: 20px;
}

.copy-icon:hover {
    color: #DAA520;
}

/* Responsiveness */
@media (max-width: 768px) {
    .results-flex {
        flex-direction: column;
        align-items: center;
    }

    .yt-card {
        max-width: 100%;
    }

    .title-container p {
        font-size: 12px;
    }
}