/* Video Grid Düzeni */

.yt-gallery {
    margin: 20px 0;
}

/* Grid Layout - 3 Sütunlu */
.yt-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px;
}

.yt-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    opacity: 0;
    animation: fade-in 0.5s ease forwards;
}

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

.yt-grid-thumbnail {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.yt-grid-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yt-grid-title {
    padding: 10px;
    text-align: center;
    font-size: 14px;
    width: 100%;
}

.yt-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.yt-play-button svg {
    width: 30px;
    height: 30px;
    fill: white;
}

.yt-gallery-item:hover .yt-play-button {
    background-color: rgba(255, 0, 0, 0.8);
}

.yt-video-title {
    margin: 10px 0;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
}

/* Slider Özel Stilleri */
.yt-slider.swiper-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.yt-slider .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100% !important;
    height: auto;
    padding: 20px;
    box-sizing: border-box;
}

.yt-slide-content {
    max-width: 1000px; /* Genişliği artır */
    width: 100%;
    text-align: center;
    background-color: #f9f9f9;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.yt-slide-image {
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    position: relative;
}

.yt-slide-responsive-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yt-slide-title {
    padding: 15px;
    background-color: #ffffff;
    font-weight: bold;
    color: #333;
}

.yt-slider .swiper-button-next,
.yt-slider .swiper-button-prev {
    color: #ff0000 !important;
}

/* Pagination'ı tamamen kaldır */
.yt-slider .swiper-pagination {
    display: none !important;
}

/* Swiper Navigation stilleri */
.yt-slider .swiper-button-next,
.yt-slider .swiper-button-prev {
    width: 50px;
    height: 50px;
    background-color: rgba(255, 0, 0, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
}

.yt-slider .swiper-button-next:hover,
.yt-slider .swiper-button-prev:hover {
    background-color: rgba(255, 0, 0, 0.2);
}

/* Liste Görünümü - Detaylı Düzen */
.yt-list-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.yt-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.yt-list-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    opacity: 0;
    animation: fade-in 0.5s ease forwards;
}

.yt-list-thumbnail {
    width: 250px;
    margin-right: 20px;
    flex-shrink: 0;
}

.yt-list-thumbnail img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.yt-list-details {
    flex-grow: 1;
}

.yt-list-title {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.yt-list-description {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* Load More Button */
.yt-load-more {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
}

.yt-slider .yt-load-more {
    display: none !important;
}

.yt-load-more-btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    text-align: center;
    margin: 20px auto;
    max-width: 250px;
}

.yt-load-more-btn:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

.yt-load-more-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
}

.yt-load-more-btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.yt-load-more-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Modal styles */
.yt-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    overflow-y: auto;
}

.yt-modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    margin: 0 auto;
    top: 50%;
    transform: translateY(-50%);
}

.yt-modal-close {
    position: absolute;
    top: -30px;
    right: -30px;
    color: #fff;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.yt-video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.yt-video-container.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.yt-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Galeri Yönetim Modali Stilleri */
.yt-gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.yt-gallery-modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80%;
    overflow-y: auto;
    position: relative;
}

.yt-gallery-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.yt-gallery-modal-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.yt-modal-cancel {
    margin-right: 10px;
    background-color: #f8f8f8;
    color: #333;
    border: 1px solid #ccc;
}

.yt-modal-save {
    background-color: #007bff;
    color: white;
}

/* Modal Stilleri */
.yt-gallery-modal,
#edit-gallery-modal,
#edit-video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.yt-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    color: #888;
    cursor: pointer;
    transition: color 0.3s ease;
}

.yt-modal-close:hover {
    color: #333;
}

/* Modal İçerik Stilleri */
.yt-gallery-modal-content,
#edit-gallery-modal .modal-content,
#edit-video-modal .modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80%;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Responsive Ayarlar */
@media screen and (max-width: 1024px) {
    .yt-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .yt-grid {
        grid-template-columns: 1fr;
    }

    .yt-list-item {
        flex-direction: column;
        text-align: center;
    }

    .yt-list-thumbnail {
        width: 100%;
        margin-right: 0;
        margin-bottom: 15px;
    }
}