@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #f9f9f9;
  color: #222;
}

header {
  background-color: #212121;
  color: white;
  padding: 1em 2em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

header h1 {
  font-size: 1.5rem;
}

header p {
  font-size: 0.95rem;
}

main {
  padding: 2em 5%;
  max-width: 1400px;
  margin: auto;
}

a {
  color: #2196f3;
  text-decoration: none;
  margin-right: 10px;
}

a:hover {
  text-decoration: underline;
}

form {
  display: flex;
  gap: 10px;
  margin-bottom: 1em;
  flex-wrap: wrap;
}

input[type="text"] {
  flex: 1;
  padding: 0.5em;
  border: 1px solid #ccc;
  border-radius: 6px;
  min-width: 200px;
}

button {
  background-color: #2196f3;
  border: none;
  color: white;
  padding: 0.5em 1.2em;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  min-width: 100px;
}

button:hover {
  background-color: #1976d2;
}

.search-section {
  padding-bottom: 1em;
  margin-bottom: 1.5em;
  border-bottom: 1px solid #ccc;
}

.tags {
  margin-top: 0.5em;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags a {
  display: inline-block;
  background: #e0f2f1;
  color: #00796b;
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 20px;
  text-decoration: none;
  transition: background 0.2s;
}

.tags a:hover {
  background: #b2dfdb;
}

/* Grid of Cards */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2em;
  margin-top: 1.5em;
}

.card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  padding: 1em;
  transition: transform 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.8em;
}

.card:hover {
  transform: translateY(-3px);
}

iframe {
  width: 100%;
  height: auto;
  border: none;
  border-radius: 8px;
  aspect-ratio: 16 / 9;
}

h3 {
  margin-bottom: 0.25em;
}

p {
  margin: 0.2em 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

.pagination {
  text-align: center;
  margin-top: 2.5em;
}

.pagination a, .pagination strong {
  margin: 0 5px;
  font-weight: 600;
  color: #333;
}

textarea {
  width: 100%;
  min-height: 100px;
  border-radius: 6px;
  padding: 0.5em;
  border: 1px solid #ccc;
  resize: vertical;
  font-family: 'Inter', sans-serif;
}

input, textarea, button {
  font-size: 0.95rem;
}

/* Floating Upload Button */
.fab-upload {
  position: fixed;
  right: 30px;
  bottom: 30px;
  background-color: #f44336;
  color: white;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  font-size: 30px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  cursor: pointer;
  transition: background 0.3s;
  z-index: 999;
}

.fab-upload:hover {
  background-color: #d32f2f;
}
.playlist-nav {
  display: inline-block;
  margin-bottom: 1.5em;
  font-size: 1rem;
  background-color: #e8f0fe;
  padding: 8px 12px;
  border-radius: 6px;
  color: #1a73e8;
  font-weight: 600;
}

.playlist-nav:hover {
  background-color: #d2e3fc;
}

.add-playlist-btn {
  display: inline-block;
  margin-top: 0.5em;
  font-size: 0.85rem;
  color: #00796b;
  background-color: #e0f2f1;
  padding: 4px 8px;
  border-radius: 4px;
  text-decoration: none;
}

.add-playlist-btn:hover {
  background-color: #b2dfdb;
}
.playlist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5em;
}

.create-playlist-btn {
  background-color: #4caf50;
  color: white;
  padding: 8px 14px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.2s;
}

.create-playlist-btn:hover {
  background-color: #388e3c;
}

.playlist-list {
  display: flex;
  flex-direction: column;
  gap: 1em;
}

.playlist-item {
  background: white;
  padding: 1em;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  transition: transform 0.2s;
}

.playlist-item:hover {
  transform: translateY(-2px);
}

.playlist-item a {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  text-decoration: none;
}

.form-container {
  max-width: 500px;
  margin: auto;
  background: white;
  padding: 2em;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.form-container form {
  display: flex;
  flex-direction: column;
  gap: 1em;
}

.form-container input,
.form-container select {
  padding: 0.5em;
  font-size: 1rem;
  border-radius: 4px;
  border: 1px solid #ccc;
}
.playlist-tags {
  margin-top: 0.5em;
}

.playlist-tag {
  display: inline-block;
  background-color: #fff3e0;
  color: #e65100;
  padding: 4px 8px;
  margin: 2px;
  border-radius: 12px;
  font-size: 0.8rem;
  text-decoration: none;
}

.playlist-tag:hover {
  background-color: #ffe0b2;
}
