/* styles.css - RaspiFlix v3 */
* {
  box-sizing: border-box;
}

:root {
  --bg: #08080a;
  --panel: #0f1113;
  --muted: #bdbdbd;
  --accent: #ff2e63;
  --card-radius: 12px;
  --hl-start: #00f5d4;
  --hl-mid1: #7c4dff;
  --hl-mid2: #ffb86b;
  --hl-end: #ff6b6b;
}

body {
  margin: 0;
  font-family: "Roboto", sans-serif;
  background: linear-gradient(180deg, var(--bg) 0%, #020203 100%);
  color: #fff;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 5%;
  background: rgba(8, 8, 10, 0.8);
  backdrop-filter: blur(10px);
  z-index: 1200;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.6px;
}
.logo span {
  color: var(--accent);
}

.header-actions {
  display: flex;
  gap: 14px;
  align-items: center;
}

.bell {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 10px;
}
.bell svg {
  color: var(--muted);
  width: 22px;
  height: 22px;
}
.bell:hover svg {
  color: #fff;
}
.badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--accent);
  color: #fff;
  padding: 2px 7px;
  font-size: 12px;
  border-radius: 12px;
}

/* Notifications Panel */
.notif-panel {
  position: fixed;
  top: 80px;
  right: 34px;
  width: 360px;
  max-width: 92vw;
  background: #1a1c1e;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  z-index: 1300;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.notif-header {
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.notif-list {
  max-height: 320px;
  overflow: auto;
  padding: 8px;
}
.notif-item {
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.notif-item:hover {
  background: rgba(255, 255, 255, 0.05);
}
.notif-empty {
  padding: 14px;
  color: var(--muted);
  text-align: center;
}

/* Main Content */
.content {
  padding: 20px 5%;
}

/* === NEW SEARCH & FILTER STYLES === */
.search-and-filters-section {
    background: var(--panel);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 40px;
}
.main-search-bar input {
    width: 100%;
    padding: 14px 20px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    background: #0c0c0d;
    color: #fff;
    font-size: 16px;
}
.main-search-bar input::placeholder {
    color: #6d6d6d;
}
.controls {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}
.btn-filter, .btn-reset {
    padding: 10px 18px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 500;
}
.btn-filter {
    background-color: #333;
    color: #fff;
}
.btn-reset {
    background-color: transparent;
    color: var(--muted);
    border: 1px solid #333;
}
.filter-panel {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px;
    margin-top: 15px;
    background-color: #0c0c0d;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
}
.filter-panel.show {
    display: grid;
}
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.filter-group label {
    font-size: 14px;
    color: var(--muted);
}
.filter-group input, .filter-group select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #333;
    background: #1a1c1e;
    color: #fff;
}
.sort-group label {
    margin-bottom: 5px;
}
.sort-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.sort-options label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #fff;
    cursor: pointer;
}
.sort-options input[type="radio"] {
    accent-color: var(--accent);
}

/* Section Title */
.section-title {
  font-size: 20px;
  margin: 40px 0 12px;
  font-weight: 700;
}

/* Grid & Cards */
.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
.no-results {
    color: var(--muted);
    padding: 40px 0;
    text-align: center;
}
.movie-card {
  border-radius: var(--card-radius);
  overflow: hidden;
  background: var(--panel);
  cursor: pointer;
  position: relative;
  outline: 4px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, outline-color 0.3s ease;
}
.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}
.thumb-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #060607;
  display: flex;
  align-items: center;
  justify-content: center;
}
.thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.movie-info {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.movie-info h3 {
  font-size: 15px;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.rating {
  font-size: 13px;
  color: gold;
}
.action-btn {
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.rank-number {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 26px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}
.highlight-pulse {
  animation: highlightPulse 3s ease-in-out forwards;
}
@keyframes highlightPulse {
  0%, 100% { transform: none; outline-color: transparent; }
  10% { outline-color: var(--hl-start); }
  30% { outline-color: var(--hl-mid1); transform: scale(1.02); }
  50% { outline-color: var(--hl-mid2); }
  70% { outline-color: var(--hl-end); transform: scale(1.01); }
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  z-index: 1400;
}
.modal-content {
  width: 94%;
  max-width: 1000px;
  background: #101214;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255,255,255,0.1);
}
.modal-row {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 0;
}
.player-frame {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
}
.player-meta {
  padding: 24px;
  color: #ddd;
  font-size: 14px;
  max-height: 500px;
  overflow-y: auto;
}
.episodes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 15px;
}
.episode-btn {
  padding: 10px;
  text-align: left;
  border-radius: 8px;
  background: #1f2225;
  color: #fff;
  border: none;
  cursor: pointer;
}
.close-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.5);
    border: none;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
}

@media (max-width: 980px) {
  .modal-row {
    grid-template-columns: 1fr;
  }
}

/* NAVIGATION */
.nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-item {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 6px 0;
    transition: color 0.3s;
}

.nav-item.active,
.nav-item:hover {
    color: var(--accent);
}

.nav-item.active::after,
.nav-item:hover::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}



/* KAFELKOWA NAWIGACJA */
.nav-grid {
  display: flex;
  gap: 14px;
}

.nav-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  background: var(--panel);
  border-radius: var(--card-radius);
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.nav-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--card-radius);
  background: linear-gradient(120deg, var(--hl-start), var(--hl-mid1), var(--hl-mid2), var(--hl-end));
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 0;
}

.nav-card span {
  position: relative;
  z-index: 1;
}

.nav-card:hover::before,
.nav-card.active::before {
  opacity: 0.3;
}

.nav-card:hover,
.nav-card.active {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

/* Zachowujemy poprzedni bell i badge CSS */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bell {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 12px;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 10;
}
.bell:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: scale(1.05);
}
.bell svg {
  width: 22px;
  height: 22px;
  fill: var(--muted);
  transition: fill 0.2s ease;
}
.bell:hover svg {
  fill: #fff;
}
.badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--accent);
  color: #fff;
  padding: 2px 7px;
  font-size: 12px;
  border-radius: 12px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}
