body {
  font-family: Arial, sans-serif;
  background: #d8d8d8;
  color: #eee;
  margin: 0;
  padding: 20px;
}

h1 {
  text-align: center;
  color: #69ceed;
}

.tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 20px 0;
}

.tab {
  padding: 12px 30px;
  font-size: 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: #444;
  color: #fff;
  transition: background 0.2s;
}

.tab:hover {
  background: #555;
}

.tab.active {
  background: #69ceed;
  color: #000;
}

#search {
  width: 100%;
  max-width: 600px;
  padding: 12px;
  margin: 20px auto;
  display: block;
  font-size: 16px;
  border: none;
  border-radius: 6px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.movie-card {
  background: #222;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.6);
  transition: transform 0.2s;
  cursor: pointer;
}

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

.movie-card img {
  width: 100%;
  height: 320px;
  object-fit: cover;
}

.info {
  padding: 12px;
  text-align: center;
}

.title {
  font-size: 1.1em;
  margin: 8px 0;
  font-weight: bold;
}

.details {
  font-size: 0.9em;
  color: #bbb;
}

.rating {
  color: #ffd700;
  font-weight: bold;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #222;
  border-radius: 12px;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
  padding: 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: #222;
  border-bottom: 1px solid #333;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.3em;
}

.close-btn {
  background: #ff4444;
  border: none;
  color: white;
  font-size: 24px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  background: #ff6666;
}

.modal-actions {
  display: flex;
  gap: 10px;
  padding: 15px 20px;
  background: #222;
  border-top: 1px solid #333;
}

.action-btn {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.play-btn {
  background: linear-gradient(135deg, #e94560, #ff6b6b);
  color: white;
}

.play-btn:hover {
  background: linear-gradient(135deg, #ff6b6b, #e94560);
  transform: scale(1.05);
}

.torrent-btn {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
}

.torrent-btn:hover {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  transform: scale(1.05);
}

.trailer-btn {
  background: #444;
  color: white;
}

.trailer-btn:hover {
  background: #555;
}

/* Video + Status Layout */
.video-container {
  position: relative;
  flex: 1 1 auto;
  min-height: 400px;
  max-height: 60vh;
  background: black;
  margin-bottom: 20px;
  border-radius: 8px;
  overflow: hidden;
}

.video-js {
  width: 100% !important;
  height: 100% !important;
}

/* Torrent status - fixed height, always visible below video */
.torrent-status {
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 12px 15px;
  border-radius: 8px;
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.5);
  min-height: 140px;              /* Enough for all rows */
  max-height: 180px;
  overflow-y: auto;
  text-align: left;
  border-top: 3px solid #4ade80; /* Green top border to make it pop */
}

.torrent-status:not(.active) {
  display: none;
}

.status-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 13px;
}

.status-label {
  color: #aaa;
  min-width: 80px;
}

.status-value {
  color: #4ade80;
  font-family: monospace;
}

.progress-bar {
  height: 8px;
  background: #333;
  border-radius: 4px;
  margin-top: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #e94560, #ff6b6b);
  transition: width 0.3s ease;
}

/* Pagination and other styles remain unchanged */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 30px auto;
  flex-wrap: wrap;
}