
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: #141414; /* Netflix Siyahı */
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

/* 
   HEADER VE ARAMA ALANI
   */
header {
    background: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, rgba(20,20,20,1) 100%);
    padding: 60px 20px;
    text-align: center;
    border-bottom: 1px solid #333;
}

h1 {
    color: #e50914;
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 4px;
    margin-bottom: 30px;
    text-transform: uppercase;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.7);
}

.search-sort-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

#searchInput {
    width: 100%;
    max-width: 600px;
    padding: 15px 25px;
    border-radius: 30px;
    border: 2px solid #444;
    background-color: #222;
    color: #fff;
    font-size: 1.1rem;
    transition: all 0.4s ease;
}

#searchInput:focus {
    outline: none;
    border-color: #e50914;
    background-color: #2b2b2b;
    box-shadow: 0 0 20px rgba(229, 9, 20, 0.5);
    width: 110%; /* Hafif büyüme efekti */
}

.sort-buttons {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.sort-btn {
    background-color: #333;
    color: white;
    border: 1px solid #444;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-btn:hover {
    background-color: #e50914;
    border-color: #e50914;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(229, 9, 20, 0.3);
}

/* 
   NAVİGASYON VE FİLTRELEME
   */
nav {
    padding: 25px;
    background-color: #141414;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-btn {
    background-color: #262626;
    color: #efefef;
    border: none;
    padding: 10px 22px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-btn:hover {
    background-color: #404040;
    transform: scale(1.1);
}

.filter-btn.active {
    background-color: #e50914;
    color: white;
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.4);
}

/*
   MEDYA KARTLARI (GRID)
  */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 35px;
    padding: 50px;
}

.card {
    background-color: #1f1f1f;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1); /* Yumuşak geçiş */
    border: 1px solid #2a2a2a;
}

/* BONUS: KART ÜZERİNE GELİNDİĞİNDE PARLAMA VE BÜYÜME */
.card:hover {
    transform: scale(1.1) translateY(-15px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.8), 0 0 20px rgba(229, 9, 20, 0.2);
    border-color: #e50914;
    z-index: 50;
}

/* Beyaz Parlama Efekti (Shine) */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.2), transparent);
    transform: skewX(-25deg);
    transition: 0.7s;
    z-index: 2;
}

.card:hover::before {
    left: 150%;
}

.card img {
    width: 100%;
    height: 360px;
    object-fit: cover;
    transition: 0.5s;
}

.card:hover img {
    filter: brightness(1.1);
}

.card-info {
    padding: 20px;
    background: linear-gradient(0deg, #1f1f1f 0%, rgba(31,31,31,0.9) 100%);
}

.card-info h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-info p {
    font-size: 0.85rem;
    color: #b3b3b3;
    margin-bottom: 5px;
}

.rating {
    color: #ffb400;
    font-weight: 700;
    font-size: 1rem;
}

/* 
   FAVORİ BUTONU SİSTEMİ
  */
.fav-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0,0,0,0.7);
    border: 2px solid rgba(255,255,255,0.2);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
}

.fav-btn:hover {
    background: #fff;
    color: #e50914;
    transform: scale(1.2);
}

.fav-btn.active {
    background: #e50914;
    color: white;
    border-color: #e50914;
    animation: pulse 0.5s ease;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

/* 
   DETAY MODALI (MODAL)
   */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: #181818;
    margin: 50px auto;
    padding: 40px;
    width: 85%;
    max-width: 900px;
    border-radius: 20px;
    position: relative;
    border: 1px solid #333;
    box-shadow: 0 0 50px rgba(0,0,0,1);
}

.close-button {
    position: absolute;
    right: 25px;
    top: 15px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    transition: 0.3s;
}

.close-button:hover {
    color: #e50914;
    transform: rotate(90deg);
}

.modal-flex {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.modal-left img {
    width: 320px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.modal-right h2 {
    font-size: 2.5rem;
    color: #e50914;
    margin-bottom: 20px;
}

.modal-right p {
    margin-bottom: 12px;
    font-size: 1.05rem;
    color: #ccc;
}

.modal-right strong {
    color: #fff;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 100px;
    font-size: 1.5rem;
    color: #666;
}

/*
   MOBİL UYUMLULUK (RESPONSIVE)
 */
@media (max-width: 850px) {
    .modal-flex { flex-direction: column; align-items: center; text-align: center; }
    .modal-left img { width: 100%; max-width: 300px; }
    .modal-content { margin: 20px auto; height: 90vh; overflow-y: auto; }
    h1 { font-size: 2rem; }
    #searchInput { width: 90%; }
}

#backToTop {
    display: none; /* Başlangıçta gizli */
    position: fixed; 
    bottom: 20px; 
    right: 30px; 
    z-index: 99; 
    border: none; 
    outline: none; 
    background-color: #f1c40f; /* Temana uygun sarı tonu */
    color: black; 
    cursor: pointer; 
    padding: 15px; 
    border-radius: 50%; 
    font-size: 18px;
    transition: 0.3s;
}

#backToTop:hover {
    background-color: #d4ac0d;
    transform: scale(1.1);
}
