.youtube-widget {
    box-sizing: border-box;
    overflow-y: auto;
    scrollbar-color: #8c8c8c #e5e7eb;
    scrollbar-width: thin;
}

.youtube-widget::-webkit-scrollbar {
    width: 10px;
}

.youtube-widget::-webkit-scrollbar-track {
    border-radius: 999px;
    background: #e5e7eb;
}

.youtube-widget::-webkit-scrollbar-thumb {
    border: 2px solid #e5e7eb;
    border-radius: 999px;
    background: #8c8c8c;
}

.youtube-widget-body {
    background: #ffffff;
}

.youtube-channel-summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    text-align: center;
}

.youtube-channel-logo-link {
    display: block;
    border-radius: 50%;
}

.youtube-channel-logo {
    width: 76px;
    height: 76px;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    object-fit: cover;
}

.youtube-channel-title {
    max-width: 100%;
    color: #4b5563;
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.05;
    text-decoration: none;
}

.youtube-channel-title:hover,
.youtube-channel-title:focus {
    color: #1f2937;
    text-decoration: underline;
}

.youtube-channel-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 20px;
    color: #4b5563;
    font-size: 0.95rem;
}

.youtube-channel-stats span {
    white-space: nowrap;
}

.youtube-channel-stats strong {
    font-weight: 800;
}

.youtube-subscribe-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: max-content;
    min-height: 46px;
    margin: 0 auto 16px;
    padding: 0 18px;
    border-radius: 8px;
    background: #415a7c;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
}

.youtube-subscribe-button:hover,
.youtube-subscribe-button:focus {
    background: #314763;
    color: #ffffff;
    text-decoration: none;
}

.youtube-subscribe-icon {
    position: relative;
    width: 22px;
    height: 16px;
    border-radius: 4px;
    background: #ffffff;
}

.youtube-subscribe-icon::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 7px solid #415a7c;
    content: "";
    transform: translate(-35%, -50%);
}

.youtube-search-box {
    position: relative;
    display: block;
    margin-bottom: 24px;
}

.youtube-search-input {
    width: 100%;
    min-height: 48px;
    padding: 0 16px 0 58px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    color: #1f2937;
    font-size: 1.15rem;
    outline: none;
}

.youtube-search-input:focus {
    border-color: #415a7c;
    box-shadow: 0 0 0 3px rgba(65, 90, 124, 0.16);
}

.youtube-search-icon {
    position: absolute;
    top: 50%;
    left: 22px;
    width: 18px;
    height: 18px;
    border: 3px solid #415a7c;
    border-radius: 50%;
    transform: translateY(-50%);
}

.youtube-search-icon::after {
    position: absolute;
    right: -8px;
    bottom: -7px;
    width: 9px;
    height: 3px;
    border-radius: 999px;
    background: #415a7c;
    content: "";
    transform: rotate(45deg);
}

.youtube-video-scroll {
    overflow: visible;
    padding-right: 0;
}

.youtube-video-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 0 0 12px;
}

.youtube-video-card {
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
}

.youtube-video-thumb {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #111827;
}

.youtube-video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 160ms ease;
}

.youtube-video-thumb:hover img,
.youtube-video-thumb:focus img {
    transform: scale(1.03);
}

.youtube-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 48px;
    height: 34px;
    border-radius: 9px;
    background: rgba(220, 38, 38, 0.86);
    transform: translate(-50%, -50%);
}

.youtube-play-button::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 13px solid #ffffff;
    content: "";
    transform: translate(-38%, -50%);
}

.youtube-video-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px 8px;
}

.youtube-video-title {
    display: -webkit-box;
    overflow: hidden;
    color: #000000;
    font-size: 1rem;
    font-weight: 750;
    line-height: 1.35;
    text-decoration: none;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.youtube-video-title:hover,
.youtube-video-title:focus {
    color: #1f2937;
    text-decoration: underline;
}

.youtube-video-date {
    color: #6b7280;
    font-size: 0.82rem;
    line-height: 1.2;
}

.youtube-empty-state,
.youtube-no-results {
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    color: #4b5563;
    font-size: 0.95rem;
    text-align: center;
}

.youtube-no-results[hidden] {
    display: none;
}

@media (max-width: 575.98px) {
    .youtube-channel-title {
        font-size: 1.45rem;
    }

    .youtube-search-box {
        margin-bottom: 36px;
    }
}
