:root {
  --bg-dark: #090a0f;
  --card-bg: rgba(20, 22, 32, 0.85);
  --accent-fire: #ff4500;
  --accent-gold: #ffaa00;
  --accent-purple: #7928ca;
  --text-main: #f8fafc;
  --text-dim: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
  background: radial-gradient(circle at top center, #1e0c36 0%, var(--bg-dark) 80%);
  color: var(--text-main);
  min-height: 100vh;
}

/* NAVBAR */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(9, 10, 15, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(45deg, var(--accent-gold), var(--accent-fire));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  cursor: pointer;
}

.search-box {
  width: 35%;
}

.search-box input {
  width: 100%;
  padding: 0.65rem 1.2rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  color: #fff;
  outline: none;
  transition: 0.2s ease;
}

.search-box input:focus {
  border-color: var(--accent-fire);
  box-shadow: 0 0 12px rgba(255, 69, 0, 0.3);
}

.nav-actions {
  display: flex;
  gap: 12px;
}

/* BUTTONS */
.btn {
  padding: 0.6rem 1.2rem;
  border-radius: 12px;
  border: none;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, #ff4500, #ff8c00);
  color: #fff;
  box-shadow: 0 4px 15px rgba(255, 69, 0, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 69, 0, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* LAYOUT CONTAINER */
.container {
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.section-title h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

/* GRID */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 69, 0, 0.4);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.thumb-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
}

.thumb-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.duration-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.85);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
}

.top-flame-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: linear-gradient(45deg, #ff0000, #ff8c00);
  color: #fff;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 800;
  box-shadow: 0 0 12px rgba(255, 69, 0, 0.8);
}

.card-info {
  padding: 1rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* DEDICATED VIDEO PAGE PAGE LAYOUT */
.video-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
}

@media (max-width: 1024px) {
  .video-layout {
    grid-template-columns: 1fr;
  }
}

.player-wrapper {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.player-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.video-player-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 1.2rem 0 1rem 0;
}

.video-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--card-bg);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.author-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(45deg, var(--accent-purple), var(--accent-fire));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
}

.author-name {
  font-weight: 700;
  font-size: 1rem;
}

.views-count {
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* LIKE / DISLIKE BUTTONS SIDE BY SIDE */
.vote-actions {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 30px;
  padding: 4px;
  border: 1px solid var(--border-color);
}

.btn-vote {
  background: transparent;
  border: none;
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: 0.2s ease;
}

.btn-vote:hover {
  background: rgba(255, 255, 255, 0.1);
}

.vote-divider {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.15);
}

/* SIDEBAR RELATED VIDEOS */
.video-sidebar h3 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.related-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.related-card {
  display: flex;
  gap: 12px;
  background: var(--card-bg);
  padding: 8px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: 0.2s ease;
}

.related-card:hover {
  border-color: var(--accent-fire);
  transform: translateX(4px);
}

.related-thumb {
  width: 120px;
  aspect-ratio: 16/9;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.related-title {
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-author {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* COMMENTS */
.comments-section {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 16px;
  border: 1px solid var(--border-color);
}

.add-comment-box {
  display: flex;
  gap: 10px;
  margin: 1rem 0;
}

.add-comment-box input {
  flex: 1;
  padding: 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.comment-item {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border-color);
}

.comment-header {
  display: flex;
  gap: 8px;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.comment-author {
  font-weight: 700;
  color: var(--accent-gold);
}

.comment-date {
  color: var(--text-dim);
}

/* MODALS */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: #12131a;
  padding: 2rem;
  border-radius: 20px;
  width: 90%;
  max-width: 480px;
  border: 1px solid var(--border-color);
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.form-group input {
  width: 100%;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: #fff;
}

.modal-actions, .auth-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
}

.auth-footer a {
  color: var(--accent-gold);
  font-size: 0.85rem;
  text-decoration: none;
}