/* Layout adjustments */
.spacer { height: 56px; }

/* Theme Colors */
:root {
  --bg-light: #ffffff;
  --fg-light: #212529;
  --card-bg-light: #f8f9fa;

  --bg-dark: #1e1e2f;
  --fg-dark: #e2e2e2;
  --card-bg-dark: #2c2c3a;
}

/* Active Theme */
html[data-theme='light'] {
  --bg: var(--bg-light);
  --fg: var(--fg-light);
  --card-bg: var(--card-bg-light);
}
html[data-theme='dark'] {
  --bg: var(--bg-dark);
  --fg: var(--fg-dark);
  --card-bg: var(--card-bg-dark);
}
/* Placeholder color in dark mode */
html[data-theme='dark'] ::placeholder {
  color: #ccc; /* light gray for placeholders */
  opacity: 1;   /* ensure full opacity */
}

/* Input and select text color in dark mode */
html[data-theme='dark'] input,
html[data-theme='dark'] select,
html[data-theme='dark'] textarea {
  color: #fff;
}
/* Sidebar links color in dark mode */
html[data-theme='dark'] .offcanvas a,
html[data-theme='dark'] .offcanvas p {
  color: #fff;
}

/* Optional: Hover effect for sidebar links */
html[data-theme='dark'] .offcanvas a:hover {
  color: #ffc107; /* Gold accent on hover */
  text-decoration: underline;
}
/* Global */
body {
  background: var(--bg);
  color: var(--fg);
}
.navbar {
  background: var(--bg) !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.navbar-brand-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-weight: bold;
  font-size: 1.25rem;
  color: var(--fg);
}

/* Sidebar */
.offcanvas {
  background: var(--card-bg);
}
.sidebar-ad img {
  max-width: 150px;
}

/* Forms & Buttons */
.form-control, .form-select {
  background: var(--card-bg);
  color: var(--fg);
}
.btn-outline-secondary {
  color: var(--fg);
  border-color: var(--fg);
}
.btn-outline-secondary:hover {
  background: var(--fg);
  color: var(--bg);
}
.btn-primary {
  background: #0d6efd;
  border: none;
}

/* Cards */
.video-card {
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
}
.card-body {
  flex-grow: 1;
}
.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: pre-wrap !Important;
}
.video-length {
  font-size: 0.9rem;
  color: #6c757d;
}

/* Ads */
.alert-secondary {
  background: var(--card-bg);
  border: none;
}
.carousel-inner img {
  border-radius: 8px;
}
.carousel-item{
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
}
/* Footer */
.footer {
  background: var(--card-bg);
  color: var(--fg);
}

/* Theme Switch */
.theme-switch-wrapper {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--card-bg);
  border-radius: 30px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  z-index: 1050;
}
.theme-switch-wrapper .form-check-input {
  width: 2rem;
  height: 1rem;
}
.theme-icon {
  font-size:1.3rem;
user-select: none;
cursor: default;
}
#sunIcon {
color: #ffc107; /* Gold sun /
}
#moonIcon {
color: #6c757d; / Muted moon */
}

.video-preview-wrapper {
  cursor: pointer;
}

.play-icon {
  font-size: 5rem;
  color: rgba(255, 255, 255, 0.85);
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.7));
  pointer-events: none; /* Let clicks go through to image */
  user-select: none;
}

.video-description button {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--fg);
}

.video-description button:hover {
  text-decoration: underline;
}