:root {
  --tiktok-cyan: #00f2ea;
  --tiktok-red: #ff0050;
  --bg-dark: #121212;
  --bg-surface: #1e1e1e;
  --border-secondary: rgba(255, 255, 255, 0.1);
  --text-light: #ffffff;
  --text-secondary: #ced4da; /* Brighter than adb5bd */
  --text-muted: #adb5bd;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6, .card-title, .navbar-brand {
  color: var(--text-light) !important;
}

.bg-surface {
  background-color: var(--bg-surface);
}

.text-tiktok-cyan {
  color: var(--tiktok-cyan) !important;
}

.text-tiktok-red {
  color: var(--tiktok-red) !important;
}

.text-secondary {
  color: var(--text-secondary) !important;
}

.small.text-secondary {
  color: var(--text-secondary) !important;
  opacity: 1 !important;
}

.btn-tiktok-cyan {
  background-color: var(--tiktok-cyan);
  color: #000;
  border: none;
}

.btn-tiktok-cyan:hover {
  background-color: #00d8d1;
  color: #000;
}

.btn-outline-tiktok-cyan {
  border-color: var(--tiktok-cyan);
  color: var(--tiktok-cyan);
}

.btn-outline-tiktok-cyan:hover {
  background-color: var(--tiktok-cyan);
  color: #000;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.bg-secondary {
  background-color: var(--text-secondary);
}

.bg-success {
  background-color: #28a745 !important;
}

.comment-feed {
  scrollbar-width: thin;
  scrollbar-color: var(--border-secondary) transparent;
}

.comment-feed::-webkit-scrollbar {
  width: 6px;
}

.comment-feed::-webkit-scrollbar-thumb {
  background-color: var(--border-secondary);
  border-radius: 10px;
}

.comment-item {
  border-bottom: 1px solid var(--border-secondary);
  padding: 10px 0;
  animation: fadeIn 0.3s ease-out;
}

.comment-author {
  font-weight: 600;
  color: var(--tiktok-cyan);
  margin-right: 8px;
}

.comment-text {
  color: var(--text-light);
}

.ai-reply-box {
  background-color: rgba(0, 242, 234, 0.05);
  border-left: 3px solid var(--tiktok-cyan);
  padding: 8px 12px;
  margin-top: 5px;
  font-size: 0.9rem;
  font-style: italic;
  color: var(--tiktok-cyan);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.pulse {
  animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

.card {
  border-radius: 12px;
}

.form-control, .form-select {
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  background-color: #262626 !important;
  border-color: #444 !important;
  color: #fff !important;
}

.form-control::placeholder {
  color: #888 !important;
  opacity: 1;
}

.form-control:focus, .form-select:focus {
  background-color: #2d2d2d !important;
  border-color: var(--tiktok-cyan) !important;
  box-shadow: 0 0 0 0.25rem rgba(0, 242, 234, 0.1);
  color: #fff !important;
}

.toast {
  background-color: var(--bg-surface);
  color: var(--text-light);
  border: 1px solid var(--border-secondary);
}

/* AI Avatar Styles Improved */
.ai-avatar-container {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
}

.ai-avatar {
  width: 160px;
  height: 220px;
  border-radius: 80px 80px 20px 20px;
  background: linear-gradient(135deg, var(--tiktok-cyan), var(--tiktok-red));
  padding: 5px;
  display: inline-block;
  box-shadow: 0 10px 40px rgba(0, 242, 234, 0.3);
  overflow: hidden;
  position: relative;
  animation: float-sway 6s ease-in-out infinite, breath 4s ease-in-out infinite;
}

.ai-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 75px 75px 15px 15px;
  background: #000;
  filter: brightness(1.1) contrast(1.1);
}

.ai-avatar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
  pointer-events: none;
}

.ai-avatar-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-shadow: inset 0 0 20px rgba(0, 242, 234, 0.4);
  pointer-events: none;
  z-index: 2;
  animation: glow-pulse 3s infinite;
}

.ai-badge {
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--tiktok-cyan);
  color: #000;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 12px;
  border-radius: 20px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.4);
  z-index: 3;
}

@keyframes float-sway {
  0% { transform: translateY(0px) rotate(-1deg); }
  50% { transform: translateY(-20px) rotate(1deg); }
  100% { transform: translateY(0px) rotate(-1deg); }
}

@keyframes breath {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

@keyframes glow-pulse {
  0% { opacity: 0.3; }
  50% { opacity: 1; }
  100% { opacity: 0.3; }
}

.admin-link {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.admin-link:hover {
  color: var(--tiktok-cyan);
}

/* Table readability */
.table {
  color: var(--text-light) !important;
}

.table thead th {
  color: var(--text-secondary) !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.text-muted {
  color: var(--text-muted) !important;
}
