* {
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

html, body {
  margin: 0;
  padding: 0;
  background: #000;
}

body {
  display: flex;
  justify-content: center;  /* Ortalar */
  width: 100%;

}


.app {
  width: 100%;
  max-width: 1100px;   
  background: #0f0f0f;
}

@media (min-width: 900px) {
  .app {
    max-width: 1100px;
  }
}

.topbar {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.topbar img.logo {
  width: 32px;
  height: 32px;
}

/* LOGO + YAZI */
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.logo span {
  font-size: 22px;
  font-weight: 700;
  color: #e50914;
  letter-spacing: 0.5px;
}

.logoArea {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ARAMA KUTUSU */
/* Arama kutusu: Clear ikonunu input içine sabitle */
.search-box {
  position: relative;
  width: 100%;
  max-width: 460px; /* masaüstünde geniş */
}

#search {
  width: 100%;
  padding-right: 36px !important; /* ikon için boşluk */
}

#clearSearch {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  cursor: pointer;
  color: #ccc;
  background: none;
  border: none;
  padding: 0;
}



.search-box input {
  width: 100%;
  padding: 10px 34px 10px 12px;
  border-radius: 999px;
  border: none;
  background: #1c1c1c;
  color: #fff;
}



/* MAIL İKONU */
.mail-btn {
  padding: 8px;
  background: #1c1c1c;
  border-radius: 50%;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 18px;
}


.topbar h1 {
  margin: 0;
  font-size: 20px;
  color: #e50914;
}

.topbar input {
  flex: 1;
  min-width: 0;
  padding: 9px 14px;
  border-radius: 999px;
  background: #1c1c1c;
  border: none;
  color: #fff;
}

.topbar .rightIcons {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* TABS */
nav {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.tabs {
  background: #1a1a1a;
  padding: 6px;
  border-radius: 999px;
  display: flex;
  gap: 6px;
}

.tabs button {
  background: transparent;
  border: none;
  color: #aaa;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
}

.tabs button.active {
  background: #e50914;
  color: #fff;
}

/* GRID */
#grid,
#favorites {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  padding: 14px;
}


@media (min-width: 600px) {
  #grid,
  #favorites {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* CARD */
.card {
  width: 100%;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
}


.card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  display: block;
}

/* GRADIENT + BLUR */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0) 40%,
    rgba(0,0,0,.85)
  );
}

/* INFO */
.card .info {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  z-index: 2;
}

/* RATING */
.rating {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 2;
}

.rating span {
  color: #f5c518;
}

/* MODAL */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #111;
  width: 90%;
  max-width: 400px;
  max-height: 90dvh;
  overflow-y: auto;
  border-radius: 20px;
  padding: 16px;
  color: #fff;
  position: relative;
}

.modal-content img {
  width: 100%;
  border-radius: 16px;
}

#closeModal {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

#modalRating {
  margin-top: 8px;
  font-size: 18px;
  font-weight: bold;
  color: #f5c518;
}

#favBtn {
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  border-radius: 12px;
  border: none;
  background: #e50914;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
}

.hidden {
  display: none;
}


@media (max-width: 450px) {
  .search-box {
    max-width: 240px; /* mobilde daralt */
  }
}

