/* 🎬 Movie Comment System Styles */

.movie-comments-section {
  margin-top: 40px;
  padding: 24px;
  background: var(--card-bg, #1a1a1a);
  border-radius: 12px;
  border: 1px solid var(--border-color, #333);
}

.comments-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color, #333);
}

.comments-header h3 {
  margin: 0;
  color: var(--text-color, #fff);
  font-size: 20px;
  font-weight: 600;
}

.comments-count {
  background: var(--primary-color, #6c5ce7);
  color: white;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
}

/* Comment Form */
.comment-form {
  background: var(--form-bg, #2a2a2a);
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 32px;
  border: 1px solid var(--border-color, #444);
}

.form-row {
  margin-bottom: 16px;
}

.form-row:last-child {
  margin-bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#commenter-name {
  width: 100%;
  max-width: 250px;
  padding: 12px 16px;
  background: var(--input-bg, #1a1a1a);
  border: 1px solid var(--border-color, #555);
  border-radius: 6px;
  color: var(--text-color, #fff);
  font-size: 14px;
  transition: border-color 0.2s ease;
}

#commenter-name:focus {
  outline: none;
  border-color: var(--primary-color, #6c5ce7);
}

#comment-content {
  width: 100%;
  padding: 12px 16px;
  background: var(--input-bg, #1a1a1a);
  border: 1px solid var(--border-color, #555);
  border-radius: 6px;
  color: var(--text-color, #fff);
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.2s ease;
}

#comment-content:focus {
  outline: none;
  border-color: var(--primary-color, #6c5ce7);
}

.char-count {
  font-size: 12px;
  color: var(--muted-color, #888);
}

.submit-btn {
  background: var(--primary-color, #6c5ce7);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.submit-btn:hover:not(:disabled) {
  background: var(--primary-hover, #5a4fcf);
  transform: translateY(-1px);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Comments List */
.comments-list {
  space-y: 16px;
}

.comment {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: var(--comment-bg, #2a2a2a);
  border: 1px solid var(--border-color, #444);
  border-radius: 8px;
  margin-bottom: 16px;
  transition: all 0.2s ease;
}

.comment:hover {
  border-color: var(--primary-color, #6c5ce7);
  transform: translateY(-1px);
}

.comment-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-color, #6c5ce7), var(--secondary-color, #a29bfe));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 16px;
  flex-shrink: 0;
}

.comment-content {
  flex: 1;
  min-width: 0;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.comment-author {
  color: var(--text-color, #fff);
  font-size: 14px;
  font-weight: 600;
}

.comment-time {
  color: var(--muted-color, #888);
  font-size: 12px;
}

.comment-text {
  color: var(--text-color, #fff);
  line-height: 1.6;
  margin-bottom: 12px;
  word-wrap: break-word;
}

.comment-actions {
  display: flex;
  gap: 12px;
}

.action-btn {
  background: none;
  border: 1px solid var(--border-color, #555);
  color: var(--muted-color, #888);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.action-btn:hover:not(:disabled) {
  background: var(--hover-bg, #3a3a3a);
  color: var(--text-color, #fff);
}

.action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.like-btn.liked {
  background: rgba(108, 92, 231, 0.1);
  border-color: var(--primary-color, #6c5ce7);
  color: var(--primary-color, #6c5ce7);
}

.report-btn:hover {
  border-color: #ff5722;
  color: #ff5722;
}

/* Empty States */
.no-comments, .loading, .error {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted-color, #888);
}

.no-comments p, .error p {
  margin: 0;
  font-size: 16px;
}

.error button {
  background: var(--primary-color, #6c5ce7);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 12px;
}

/* Notifications */
.comment-notification {
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .movie-comments-section {
    margin-top: 24px;
    padding: 16px;
  }
  
  .comments-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .comment-form {
    padding: 16px;
  }
  
  .form-row:last-child {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .char-count {
    text-align: center;
  }
  
  .comment {
    padding: 12px;
    gap: 10px;
  }
  
  .comment-avatar {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
  
  .comment-actions {
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .action-btn {
    font-size: 11px;
    padding: 4px 8px;
  }
}

@media (max-width: 480px) {
  #commenter-name {
    max-width: none;
  }
  
  .comments-header h3 {
    font-size: 18px;
  }
  
  .comment-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

/* Dark/Light Theme Support */
@media (prefers-color-scheme: light) {
  :root {
    --card-bg: #ffffff;
    --form-bg: #f8f9fa;
    --input-bg: #ffffff;
    --comment-bg: #f8f9fa;
    --text-color: #333333;
    --muted-color: #666666;
    --border-color: #e1e5e9;
    --hover-bg: #f0f0f0;
  }
  
  .comment {
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  }
}

/* Integration với theme hiện tại */
.theme-dark .movie-comments-section {
  --card-bg: #1a1a1a;
  --form-bg: #2a2a2a;
  --input-bg: #1a1a1a;
  --comment-bg: #2a2a2a;
  --text-color: #ffffff;
  --muted-color: #888888;
  --border-color: #444444;
  --hover-bg: #3a3a3a;
}

.theme-light .movie-comments-section {
  --card-bg: #ffffff;
  --form-bg: #f8f9fa;
  --input-bg: #ffffff;
  --comment-bg: #f8f9fa;
  --text-color: #333333;
  --muted-color: #666666;
  --border-color: #e1e5e9;
  --hover-bg: #f0f0f0;
} 