/* ===================== */
/* 1) Temel Değişkenler  */
/* ===================== */
:root {
    --primary-color: #dc3545;
    --secondary-color: #6c757d;
    --background-color: #f8f9fa;
    --text-color: #343a40;
    --light-text: #6c757d;
    --card-bg: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

/* ===================== */
/* 2) Genel Stil         */
/* ===================== */
body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
}

h1, h3, h4, h5 {
    margin: 0;
    padding: 0;
}

.highlight-red {
    color: var(--primary-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeIn 1s ease-in-out;
}

/* ===================== */
/* 3) Başlıklar          */
/* ===================== */
.series-header h1 {
    font-size: 2rem;
    font-weight: bold;
    text-align: left;
    margin: 0 0 0 20px; /* top 0, left 20px */
}

/* ===================== */
/* 4) Video Bölümü       */
/* ===================== */
.video-section {
    background-color: #1e1e1e;
    padding: 40px 20px;
    color: #ffffff;
    margin-bottom: 40px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.video-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(28, 28, 28, 0.7), rgba(0, 0, 0, 0.7));
    z-index: 1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.video-section:hover .video-overlay {
    opacity: 1;
}

.video-container iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
    border-radius: 10px;
    box-shadow: 0 8px 16px var(--shadow-color);
    transition: transform 0.3s ease;
}

.video-container iframe:hover {
    transform: scale(1.05);
}

.badge-date {
    background-color: var(--primary-color);
    color: #fff;
    padding: 8px 24px;
    border-radius: 20px;
    font-size: 1em;
    display: inline-block;
    margin-top: 20px;
    z-index: 2;
    position: relative;
}

/* ===================== */
/* 5) Açıklama Bölümü    */
/* ===================== */
.description {
    margin-top: 30px;
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 8px 16px var(--shadow-color);
}

.description h4 {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    color: var(--text-color);
}

.description h4 i {
    margin-right: 10px;
    font-size: 1.5em;
    color: var(--primary-color);
}

.description p {
    text-align: justify;
    line-height: 1.8;
    color: var(--light-text);
}

.description ul {
    list-style: none;
    padding: 0;
}

.description ul li {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    color: var(--light-text);
}

.description ul li i {
    margin-right: 10px;
    color: var(--primary-color);
}
/* ===================== */
/* 6) Modern Tablo       */
/* ===================== */
.table-container {
    margin: 1em 0;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    text-align: left;
    padding: 0.75em;
    vertical-align: middle;
    border: 1px solid #dee2e6;
}

th {
    background-color: #343a40;
    color: #fff;
    white-space: nowrap;
}

tr:nth-child(even) {
    background-color: #f8f9fa;
}

tr:hover {
    background-color: #e9ecef;
    transition: background-color 0.2s ease-in-out;
}

/* Badge'leri soldan hizalı şekilde sarmalamak için */
.badge-container {
    display: flex;       /* Yatayda badge’leri sıralar */
    flex-wrap: wrap;     /* Taşan badge’leri alt satıra geçirir */
    gap: 0.5rem;         /* Badge’ler arası boşluk */
    justify-content: flex-start;  /* Soldan hizala */
    align-items: center;          /* Dikey merkezle (opsiyonel) */
}

.badge-container .badge {
    /* Eğer .badge linklerinde .me-1, .ms-1 vb. margin sınıfları varsa 
       kaldırabilir veya margin'i sıfırlayabilirsiniz. */
    margin: 0;  /* Opsiyonel: margin'i sıfırlamak için */
}

/* Daha modern responsive tablo */
@media (max-width: 768px) {
    /* Başlıkları gizle, satırları dikey blok yap */
    table, thead, tbody, th, td, tr {
        display: block;
        width: 100%;
    }
    thead tr {
        display: none;
    }
    tbody tr {
        margin-bottom: 1em;
        border: 1px solid #dee2e6;
        border-radius: 10px;
        padding: 15px;
    }
    tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid #dee2e6;
        padding: 0.5em;
    }
    tbody td:last-child {
        border-bottom: none;
    }
    tbody td::before {
        content: attr(data-label);
        flex-basis: 40%;
        text-align: left;
        font-weight: bold;
        color: #495057;
        margin-right: 0.5em; /* Label ile içerik arası ufak boşluk */
    }
    
    /* Mobilde de badge container soldan hizalansın */
    .badge-container {
        justify-content: flex-start;
        align-items: center;
    }
}

/* ===================== */
/* 7) Badge Stilleri     */
/* ===================== */
.badge-tag, .badge-category, .badge-guest {
    margin: 2px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75em;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    color: #fff;

}

.badge-tag {
    background-color: var(--secondary-color);
}

.badge-category {
    background-color: var(--primary-color);
}

.badge-guest {
    background-color: #0d6efd;
}

.badge-category:hover,
.badge-tag:hover,
.badge-guest:hover {
    opacity: 0.8;
}

/* Modern Badge Ek Örnekleri */
.badge.modern-badge {
    padding: 0.4em 0.7em;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 0.4rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    text-transform: capitalize;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    color: #fff;
    margin-bottom: 15px;
}

.badge.modern-badge i {
    font-size: 0.85rem;
}

.badge.green-badge {
    background-color: #28a745;
}
.badge.green-badge:hover {
    background-color: #218838;
    box-shadow: 0 4px 10px rgba(40,167,69,0.4);
}
.badge.orange-badge {
    background-color: #fd7e14;
}
.badge.orange-badge:hover {
    background-color: #e7670f;
    box-shadow: 0 4px 10px rgba(253,126,20,0.4);
}
.badge.red-badge {
    background-color: #dc3545;
}
.badge.red-badge:hover {
    background-color: #c82333;
    box-shadow: 0 4px 10px rgba(220,53,69,0.4);
}

/* ===================== */
/* 8) Yorum Sistemi      */
/* ===================== */
.comment-section {
    margin-top: 50px;
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 8px 16px var(--shadow-color);
}

.comment-section h4 {
    margin-bottom: 20px;
    color: var(--text-color);
}

.comment-form textarea {
    resize: none;
}

.comment-list {
    margin-top: 30px;
}

.comment {
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: flex-start;
}

.comment:last-child {
    border-bottom: none;
}

.comment .user-icon {
    color: var(--primary-color);
    margin-right: 15px;
    font-size: 1.5em;
}

.comment .comment-content h6 {
    margin-bottom: 5px;
    color: var(--text-color);
}

.comment .comment-content p {
    margin: 0;
    color: var(--secondary-color);
}

.comment .like-button {
    color: var(--primary-color);
    cursor: pointer;
    margin-right: 10px;
}

.comment .like-count {
    color: var(--secondary-color);
}

/* ===================== */
/* 9) Video Kartları     */
/* ===================== */
.video-cards-section {
    margin-top: 70px;
    margin-bottom: 40px;
}

.video-cards-section h3 {
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    display: inline-block;
    color: var(--text-color);
}

.video-cards-section h3::after {
    content: '';
    width: 50px; height: 3px;
    background-color: var(--primary-color);
    position: absolute;
    left: 50%; bottom: -10px;
    transform: translateX(-50%);
}

.card {
    border: none;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    background-color: var(--card-bg);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.2);
}

.card-img-top {
    height: 180px; /* Video yüksekliği */
    object-fit: cover;
    transition: transform 0.3s;
}

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

.card-body {
    padding: 20px;
    background-color: var(--card-bg);
}

.card-title {
    font-size: 1.2em;
    margin-bottom: 10px;
    color: var(--text-color);
}

.card-text {
    font-size: 0.95em;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.btn-watch {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 8px 20px;
    transition: background-color 0.3s;
    text-decoration: none;
}

.btn-watch:hover {
    background-color: #a71d2a;
    color: #fff;
}

.fas.fa-play-circle {
    font-weight: 900;
    color: snow;
    font-size: 60px;
    opacity: 0.7;
}

/* ===================== */
/* 10) Player & Playlist */
/* ===================== */
.player-container {
    display: flex;
    flex-direction: row;
    gap: 20px;
    background-color: #1e1e1e;
    padding: 20px;
    border-radius: 10px;
    position: relative;
    z-index: 2;
    animation: fadeInUp 1s ease-in-out;
    align-items: stretch; /* Aynı yükseklik */
}

.player-side {
    flex: 70%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

video.plyr {
    width: 100%;
    max-width: 100%;
    border: none;
    border-radius: 8px;
    background-color: #000;
    height: auto;
}

.video-info {
    margin-top: 10px;
    background: #1e1e1e;
    padding: 10px;
    border-radius: 5px;
    animation: fadeIn 1s ease-in-out;
}

.video-title {
    font-size: 20px;
    font-weight: bold;
    margin: 0;
    text-align: left;
    color: #fff;
}

.video-stats {
    margin-top: 5px;
    font-size: 14px;
    color: #aaa;
}

.video-controls {
    display: flex;
    align-items: center;
    margin-top: 10px;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-group {
    display: flex;
    gap: 10px;
}

.btn {
    background: #2c2c2c;
    border: none;
    color: #fff;
    padding: 8px 12px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background 0.3s, transform 0.2s, color 0.3s;
    position: relative;
    overflow: hidden;
}
.btn:hover {
    background: #3a3a3a;
}
.btn:active {
    transform: scale(0.95);
}
.btn.like-active {
    background: #28a745; /* Beğenildiğinde yeşil */
    color: #fff;
}
.btn.dislike-active {
    background: #dc3545; /* Beğenilmediğinde kırmızı */
    color: #fff;
}

/* Paylaş Popup */
.share-container {
    position: relative;
}
.share-popup {
    position: absolute;
    background: #1e1e1e;
    padding: 10px;
    border-radius: 5px;
    top: 50px;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 5px;
    animation: fadeIn 0.3s ease-in-out;
    z-index: 3;
}
.share-popup a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    background: #2c2c2c;
    padding: 5px;
    border-radius: 3px;
    text-align: center;
    transition: background 0.3s;
}
.share-popup a:hover {
    background: #3a3a3a;
}

/* Toggle Switch */
.toggle-switch {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.toggle-switch input {
    display: none; 
}
.toggle-switch label {
    background: #ccc;
    width: 50px;
    height: 24px;
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
}
.toggle-switch label::after {
    content: "";
    width: 20px; height: 20px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 2px; left: 2px;
    transition: transform 0.3s;
}
.toggle-switch input:checked + label {
    background: #28a745 !important;
}
.toggle-switch input:checked + label::after {
    transform: translateX(26px);
}

/* Playlist */
.playlist {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 30%;
    max-height: 450px;
    overflow-y: auto;
    animation: fadeIn 1s ease-in-out;
    display: flex;
    flex-direction: column;
}

.playlist li {
    display: flex;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    background-color: #2c2c2c;
    margin-bottom: 10px;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.2s;
    position: relative;
    height: 65px;
}
.playlist li:hover {
    background-color: #3a3a3a;
}
.playlist li.active {
    background-color: #bb0000;
    color: #fff;
}

.playlist img {
    width: 80px;
    height: 45px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 15px;
    opacity: 0;   /* Lazyload öncesi animasyon için */
    transition: opacity 0.3s;
}
.playlist img.lazyloaded {
    opacity: 1;   /* Lazyload sonrası görünür */
}

.playlist span {
    flex-grow: 1;
    font-size: 16px;
    font-weight: 500;
}

.duration-badge {
    position: absolute;
    right: 10px; bottom: 10px;
    background: rgba(0,0,0,0.7);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
}

/* Scrollbar */
.playlist::-webkit-scrollbar {
    width: 8px;
}
.playlist::-webkit-scrollbar-track {
    background: #2c2c2c; 
    border-radius: 8px;
}
.playlist::-webkit-scrollbar-thumb {
    background: #555; 
    border-radius: 8px;
}
.playlist::-webkit-scrollbar-thumb:hover {
    background: #777; 
}

/* ===================== */
/* 11) Lights Off Modu   */
/* ===================== */
.lights-off-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 1;
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}
.lights-off-overlay.active {
    display: block;
}

/* ===================== */
/* 12) Responsive Düzelt */
/* ===================== */
@media (max-width: 992px) {
    .player-container {
        flex-direction: column;
    }
    .playlist {
        width: 100%;
        max-height: none;
    }
    .video-title {
        text-align: left;
    }
    .share-popup {
        right: auto;
        left: 0;
    }
    .video-controls {
        gap: 10px;
    }
    .btn {
        padding: 8px 10px;
        font-size: 12px;
    }
}

/* ===================== */
/* 13) İkon Efektleri    */
/* ===================== */
.icon-style {
    font-size: 4rem;
    opacity: 0.8;
    color: white !important;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.icon-style:hover {
    transform: scale(1.2)!important;
    opacity: 1;
    color: #fff;
}


  /* Stil kodlarınız */
  .btn.like-active { background-color: #28a745 !important; color: #fff !important; }
  .btn.dislike-active { background-color: #dc3545 !important; color: #fff !important; }
  .card-title2 { color: #212529 !important; background-color: transparent !important; font-size: 1.4rem !important; font-weight: bold !important; }
  .comment { display: flex; margin-bottom: 15px; border-bottom: 1px solid #ddd; padding-bottom: 10px; }
  .user-icon { margin-right: 10px; color: #555; }
  .comment-content { flex: 1; }
  .lights-off-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.8); z-index: 9999; pointer-events: none; }
  .lights-off-overlay.active { display: block !important; }
  #lights-off-btn { position: relative; z-index: 10000; display:none!important; }
  .switch { position: relative; display: inline-block; width: 50px; height: 24px; }
  .switch input { opacity: 0; width: 0; height: 0; }
  .slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: 0.4s; border-radius: 24px; }
  .slider::before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: 0.4s; border-radius: 50%; }
  input:checked + .slider { background-color: #4caf50; }
  input:checked + .slider::before { transform: translateX(26px); }
  .switch:hover .slider { background-color: #b3b3b3; }
  .lights-off-overlay.active ~ .container { opacity: 0.2; }
  .btn-group .btn span { margin-left: 5px; font-weight: bold; }
  .comment-like-btn.like-active i { color: #28a745; }
  .comment-dislike-btn.dislike-active i { color: #dc3545; }

  
  /* Badge Stil */
  .badge-secondary {
      background-color: #6c757d;
      color: #fff;
  }

  .badge-sm {
      padding: 0.25em 0.4em;
      font-size: 75%;
      border-radius: 0.2rem;
  }

  .badge-secondary.me-1 {
      margin-right: 0.25rem;
  }

  /* Modern Badge */
  .modern-badge.green-badge {
      background-color: #28a745;
      color: #fff;
  }

  .modern-badge.red-badge {
      background-color: #dc3545;
      color: #fff;
  }

  .modern-badge.orange-badge {
      background-color: #fd7e14;
      color: #fff;
  }

  .badge-modern-badge {
      padding: 0.5em 1em;
      font-size: 0.9em;
      border-radius: 0.25rem;
  }

  /* Kategori Stil */
  .categories a.badge {
      margin-right: 0.25rem;
      margin-bottom: 0.25rem;
  }
  /* Player alanı vs. (Değiştirmiyoruz) */
  .video-section { margin-bottom: 2rem; }
  .player-container { display: flex; gap: 1rem; }
  .player-side { flex: 1; }

  .lights-off-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8); z-index: 9999; pointer-events: none;
  }
  .lights-off-overlay.active { display: block !important; }


  .comment { display: flex; margin-bottom: 15px; border-bottom: 1px solid #ddd; padding-bottom: 10px; }
  .user-icon { margin-right: 10px; color: #555; }
  .comment-content { flex: 1; }
  
  /* Tek tablo */
  .table-container { margin-top: 2rem; }
  tr.video-row { cursor: pointer; }
  tr.video-row:hover { background-color: #f7f7f7; }

/* ===================== */
/* 14) Animasyonlar      */
/* ===================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

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

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



