/*
 * XVideoSharing - Dark Theme System
 * Modern, clean, and elegant dark mode
 */

:root {
  --xvs-transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

html[data-theme="dark"] {
  --bs-body-bg: #0b0f17;
  --bs-body-color: #cbd5e1;
  --bs-border-color: #1f2937;
  --bs-secondary-color: #8896ab;
  --bs-tertiary-bg: #111827;
  --bs-heading-color: #f8fafc;
  --bs-link-color: #60a5fa;
  --bs-link-hover-color: #93c5fd;
  color-scheme: dark;
}

html[data-theme="dark"],
html[data-theme="dark"] body {
  background-color: #0b0f17 !important;
  color: #cbd5e1 !important;
  transition: var(--xvs-transition);
}

html[data-theme="dark"] main {
  background-color: #0b0f17 !important;
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .container-fluid {
  background-color: transparent !important;
}

/* Sticky Top Bar (my_files, etc.) */
html[data-theme="dark"] .top-bar {
  background-color: #111827 !important;
  border-bottom: 1px solid #1f2937 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) !important;
  transition: var(--xvs-transition);
}

html[data-theme="dark"] .top-bar .text-muted {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .top-bar .text-muted b {
  color: #f1f5f9 !important;
}

html[data-theme="dark"] .search-field {
  background-color: #0b0f17 !important;
  border: 1px solid #273346 !important;
  color: #f1f5f9 !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='17' viewBox='0 0 16 17' fill='none'%3E%3Cpath d='M12.6 12L16 15.4L14.9 16.5L11.5 13.1C10.2 14.1 8.7 14.7 7.1 14.7C3.2 14.7 0 11.5 0 7.6C0 3.7 3.2 0.5 7.1 0.5C11 0.5 14.2 3.7 14.2 7.6C14.2 9.2 13.6 10.8 12.6 12ZM11 11.4C12 10.4 12.6 9 12.6 7.6C12.6 4.6 10.1 2.1 7.1 2.1C4 2.1 1.6 4.5 1.6 7.6C1.6 10.6 4.1 13.1 7.1 13.1C8.5 13.1 9.9 12.5 10.9 11.5L11 11.4Z' fill='%2394A3B8'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: 0.75rem 50% !important;
}

html[data-theme="dark"] .search-field:focus {
  background-color: #0f1624 !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25) !important;
  color: #fff !important;
}

html[data-theme="dark"] .search-field::placeholder {
  color: #64748b !important;
}

/* Header (Control panel and main) */
html[data-theme="dark"] .header {
  background: #111827 !important;
  border-bottom: 1px solid #1f2937 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition: var(--xvs-transition);
}

html[data-theme="dark"] .header .text-dark,
html[data-theme="dark"] .header .header-stats b {
  color: #f1f5f9 !important;
}

html[data-theme="dark"] .header .open-menu,
html[data-theme="dark"] .header .icon-btn.text-dark {
  color: #cbd5e1 !important;
}

/* Invert dark logo text in Dark Mode */
html[data-theme="dark"] .logo img:not([src*="logo-w"]) {
  filter: brightness(0) invert(1);
}

/* Sidebar / Navpanel */
html[data-theme="dark"] .navpanel {
  background-color: #0d121c !important;
  border-right: 1px solid #1a2230 !important;
  scrollbar-color: #232d3f #0d121c;
  transition: var(--xvs-transition);
}

html[data-theme="dark"] .navpanel::-webkit-scrollbar {
  background-color: #0d121c;
}

html[data-theme="dark"] .navpanel::-webkit-scrollbar-thumb {
  background-color: #232d3f;
}

html[data-theme="dark"] .navpanel-menu .nav-link {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .navpanel-menu .nav-link:hover {
  background-color: #3586FF !important;
  color: #fff !important;
}

html[data-theme="dark"] .navpanel-menu .nav-link.active {
  background-color: #3586FF !important;
  color: #fff !important;
}

html[data-theme="dark"] .navpanel-menu .nav-link.open {
  background-color: rgba(255, 255, 255, 0.05) !important;
}

html[data-theme="dark"] .navpanel-submenu {
  background-color: rgba(0, 0, 0, 0.25) !important;
}

html[data-theme="dark"] .navpanel-submenu .nav-link {
  color: #8896ab !important;
}

html[data-theme="dark"] .navpanel-submenu .nav-link:hover,
html[data-theme="dark"] .navpanel-submenu .nav-link.active {
  color: #fff !important;
}

html[data-theme="dark"] .navpanel-tabs {
  background-color: #141c2a !important;
  border-radius: 8px;
}

html[data-theme="dark"] .navpanel-tabs .nav-link {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .navpanel-tabs .nav-link.active {
  background-color: #1e283a !important;
  color: #fff !important;
}

/* Cards & Blocks */
html[data-theme="dark"] .block {
  background-color: #111827 !important;
  border-color: #1f2937 !important;
  color: #cbd5e1 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transition: var(--xvs-transition);
}

html[data-theme="dark"] .block-tabs {
  box-shadow: inset 0 -1px 0 #1f2937 !important;
}

html[data-theme="dark"] .block-tabs .nav-link {
  color: #8896ab;
}

html[data-theme="dark"] .block-tabs .nav-link.active {
  color: #3586FF !important;
  border-bottom-color: #3586FF !important;
}

/* Tables (my_files, #xfiles, etc.) */
html[data-theme="dark"] .files table,
html[data-theme="dark"] .files .table,
html[data-theme="dark"] #xfiles,
html[data-theme="dark"] .table {
  --bs-table-bg: #111827 !important;
  --bs-table-color: #cbd5e1 !important;
  --bs-table-border-color: #1f2937 !important;
  --bs-table-hover-bg: #182236 !important;
  --bs-table-hover-color: #ffffff !important;
  background-color: #111827 !important;
  border: 1px solid #1f2937 !important;
  border-color: #1f2937 !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35) !important;
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .shadow-sm {
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35) !important;
}

/* Table Headers */
html[data-theme="dark"] .files table th,
html[data-theme="dark"] .files .table thead th,
html[data-theme="dark"] #xfiles thead th,
html[data-theme="dark"] .table thead th {
  background-color: #0e1524 !important;
  color: #94a3b8 !important;
  border-bottom: 1px solid #1f2937 !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  padding: 12px 14px !important;
}

html[data-theme="dark"] #xfiles thead th a,
html[data-theme="dark"] .table thead th a {
  color: #94a3b8 !important;
  text-decoration: none !important;
  transition: color 0.15s ease;
}

html[data-theme="dark"] #xfiles thead th a:hover,
html[data-theme="dark"] .table thead th a:hover {
  color: #60a5fa !important;
}

html[data-theme="dark"] #xfiles thead th img,
html[data-theme="dark"] .table thead th img {
  filter: brightness(1.3) contrast(1.1);
  opacity: 0.7;
}

/* Table Rows & Cells */
html[data-theme="dark"] .files table tr td,
html[data-theme="dark"] .files .table tbody td,
html[data-theme="dark"] #xfiles tbody td,
html[data-theme="dark"] .table tbody td {
  background-color: #111827 !important;
  color: #cbd5e1 !important;
  border-bottom: 1px solid #1a2332 !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  padding: 10px 14px !important;
  transition: background-color 0.15s ease;
}

/* Row Hover */
html[data-theme="dark"] .files table tr:hover td,
html[data-theme="dark"] .files .table-hover>tbody>tr:hover>*,
html[data-theme="dark"] #xfiles tbody tr:hover td,
html[data-theme="dark"] .table-hover>tbody>tr:hover>* {
  background-color: #182236 !important;
  color: #ffffff !important;
}

/* Selected row highlight (hi2 class added by JS) */
html[data-theme="dark"] .files table tr.hi2 td,
html[data-theme="dark"] #xfiles tr.hi2 td {
  background-color: rgba(53, 134, 255, 0.18) !important;
  color: #ffffff !important;
}

/* Public and Premium-Only flags */
html[data-theme="dark"] .files table tr td.pub,
html[data-theme="dark"] #xfiles tr td.pub {
  background-color: transparent !important;
}

html[data-theme="dark"] .files table tr td.ponly,
html[data-theme="dark"] #xfiles tr td.ponly {
  background-color: transparent !important;
}

/* Titles and file links */
html[data-theme="dark"] .files .files-name a,
html[data-theme="dark"] #xfiles .files-name a,
html[data-theme="dark"] #xfiles a.link-dark {
  color: #f1f5f9 !important;
  text-decoration: none !important;
  transition: color 0.15s ease;
}

html[data-theme="dark"] .files .files-name a:hover,
html[data-theme="dark"] #xfiles .files-name a:hover,
html[data-theme="dark"] #xfiles a.link-dark:hover {
  color: #60a5fa !important;
}

/* Thumbnail preview */
html[data-theme="dark"] .files-thumb {
  border-radius: 6px !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4) !important;
}

/* Size breakdown small text */
html[data-theme="dark"] #xfiles td small {
  color: #94a3b8 !important;
}

/* Edit & Delete Icons in row */
html[data-theme="dark"] #xfiles td a img[alt="Edit"],
html[data-theme="dark"] #xfiles td a img[alt="Delete file"],
html[data-theme="dark"] #xfiles td a img[src*="edit.svg"],
html[data-theme="dark"] #xfiles td a img[src*="delete.svg"] {
  filter: brightness(1.2) contrast(1.1);
  transition: transform 0.15s ease, filter 0.15s ease;
}

html[data-theme="dark"] #xfiles td a:hover img[alt="Edit"],
html[data-theme="dark"] #xfiles td a:hover img[alt="Delete file"],
html[data-theme="dark"] #xfiles td a:hover img[src*="edit.svg"],
html[data-theme="dark"] #xfiles td a:hover img[src*="delete.svg"] {
  transform: scale(1.18);
  filter: brightness(1.5);
}

/* Table Footer (Column Settings) */
html[data-theme="dark"] #xfiles tfoot td,
html[data-theme="dark"] .table tfoot td,
html[data-theme="dark"] .table tfoot th {
  background-color: #0e1524 !important;
  color: #8896ab !important;
  border-top: 1px solid #1f2937 !important;
  border-bottom: none !important;
  padding: 10px 14px !important;
}

html[data-theme="dark"] #show_props button {
  color: #94a3b8 !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid #1f2937 !important;
  border-radius: 6px !important;
  padding: 5px 12px !important;
  transition: all 0.15s ease;
}

html[data-theme="dark"] #show_props button:hover {
  color: #f1f5f9 !important;
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: #334155 !important;
}

/* Admin Settings & Host Rows (admin_servers, etc.) */
html[data-theme="dark"] .admin-settings,
html[data-theme="dark"] .settings-table,
html[data-theme="dark"] .settings-table td {
  background-color: #111827 !important;
  border-color: #1f2937 !important;
  color: #cbd5e1 !important;
}

html[data-theme="dark"] tr.trhost,
html[data-theme="dark"] tr.trhost td,
html[data-theme="dark"] .table tr.trhost td {
  background-color: #0e1628 !important;
  border-top: 1px solid #1f2937 !important;
  border-bottom: 1px solid #1f2937 !important;
  color: #f1f5f9 !important;
}

html[data-theme="dark"] tr.trhost td a {
  color: #60a5fa !important;
}

html[data-theme="dark"] .input-group-text {
  background-color: #0e1524 !important;
  border-color: #273346 !important;
  color: #94a3b8 !important;
}

/* Checkboxes in Dark Mode */
html[data-theme="dark"] .check-radio input[type="checkbox"] {
  background-color: #0b0f17 !important;
  border: 1px solid #334155 !important;
  border-radius: 4px;
}

html[data-theme="dark"] .check-radio input[type="checkbox"]:checked {
  background-color: #2563eb !important;
  border-color: #3b82f6 !important;
}

/* Switchers in Dark Mode */
html[data-theme="dark"] .form-switcher input {
  background-color: #273346 !important;
  border-color: #334155 !important;
}

html[data-theme="dark"] .form-switcher input:checked {
  background-color: #10b981 !important;
  border-color: #10b981 !important;
}

html[data-theme="dark"] .table-rounded {
  border-color: #1f2937 !important;
}

/* Typography, Links & Texts */
html[data-theme="dark"] .link-dark {
  color: #f1f5f9 !important;
}

html[data-theme="dark"] .link-dark:hover {
  color: #3586FF !important;
}

html[data-theme="dark"] .text-dark {
  color: #f1f5f9 !important;
}

html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .text-secondary {
  color: #8896ab !important;
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6 {
  color: #f8fafc !important;
}

/* Forms, Inputs & Textareas */
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select {
  background-color: #0b0f17 !important;
  border-color: #273346 !important;
  color: #f1f5f9 !important;
}

html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] .form-select:focus {
  background-color: #0d131e !important;
  border-color: #3586FF !important;
  color: #fff !important;
  box-shadow: 0 0 0 0.25rem rgba(53, 134, 255, 0.25) !important;
}

html[data-theme="dark"] .form-control::placeholder {
  color: #64748b !important;
}

html[data-theme="dark"] .codes-textarea .form-control {
  background-color: #0b0f17 !important;
}

/* User URL Copy Source (Referral & Public links in my_account) */
.user-url .copy-source,
html[data-theme="dark"] .user-url .copy-source {
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  color: #f1f5f9 !important;
}

html[data-theme="dark"] .user-url a:hover .copy-source {
  color: #60a5fa !important;
}

html[data-theme="dark"] .user-url .btn {
  color: #8896ab !important;
}

html[data-theme="dark"] .user-url .btn:hover {
  color: #3586FF !important;
}

/* Dropdowns & Popups */
html[data-theme="dark"] .dropdown-menu {
  background-color: #161e2e !important;
  border: 1px solid #273346 !important;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5) !important;
}

html[data-theme="dark"] .dropdown-item {
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .dropdown-item:hover,
html[data-theme="dark"] .dropdown-item:focus {
  background-color: #202b3d !important;
  color: #fff !important;
}

html[data-theme="dark"] .dropdown-divider {
  border-top-color: #273346 !important;
}

/* Modals (#add_folder, #mass_search, #fld_move_div2, #tagd, #extra2, #pld, #show_props_div, #mass_captions) */
html[data-theme="dark"] .modal-content {
  background-color: #111827 !important;
  border: 1px solid #273346 !important;
  border-radius: 12px !important;
  color: #cbd5e1 !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7) !important;
}

html[data-theme="dark"] .modal-header {
  background-color: #0e1524 !important;
  border-bottom: 1px solid #1f2937 !important;
  border-top-left-radius: 12px !important;
  border-top-right-radius: 12px !important;
  padding: 16px 20px !important;
}

html[data-theme="dark"] .modal-header .modal-title {
  color: #f8fafc !important;
  font-weight: 600 !important;
}

html[data-theme="dark"] .modal-body {
  background-color: #111827 !important;
  color: #cbd5e1 !important;
  padding: 20px !important;
}

html[data-theme="dark"] .modal-body label,
html[data-theme="dark"] .modal-body .form-label,
html[data-theme="dark"] .modal-body .col-form-label {
  color: #e2e8f0 !important;
  font-weight: 500 !important;
}

html[data-theme="dark"] .modal-body .form-control,
html[data-theme="dark"] .modal-body .form-select,
html[data-theme="dark"] .modal-body textarea {
  background-color: #0b0f17 !important;
  border: 1px solid #273346 !important;
  color: #f8fafc !important;
  border-radius: 8px !important;
}

html[data-theme="dark"] .modal-body .form-control:focus,
html[data-theme="dark"] .modal-body .form-select:focus,
html[data-theme="dark"] .modal-body textarea:focus {
  background-color: #0f1624 !important;
  border-color: #3b82f6 !important;
  color: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25) !important;
}

html[data-theme="dark"] .modal-body select option {
  background-color: #111827 !important;
  color: #f8fafc !important;
}

html[data-theme="dark"] .modal-footer {
  background-color: #0e1524 !important;
  border-top: 1px solid #1f2937 !important;
  border-bottom-left-radius: 12px !important;
  border-bottom-right-radius: 12px !important;
  padding: 14px 20px !important;
}

html[data-theme="dark"] .modal-footer .btn-outline-light {
  border-color: #334155 !important;
  color: #94a3b8 !important;
  background: rgba(255, 255, 255, 0.04) !important;
}

html[data-theme="dark"] .modal-footer .btn-outline-light:hover {
  border-color: #475569 !important;
  color: #f1f5f9 !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .btn-close {
  filter: invert(1) brightness(180%);
}

/* Tabs Bar (.tabs, .settings-tabs, .mod-tabs, .vq-tabs, .block-tabs) */
html[data-theme="dark"] .tabs,
html[data-theme="dark"] .settings-tabs,
html[data-theme="dark"] .mod-tabs,
html[data-theme="dark"] .vq-tabs {
  background-color: #0e1524 !important;
  border-color: #1f2937 !important;
  box-shadow: inset 0 -1px 0 #1f2937 !important;
}

html[data-theme="dark"] .tabs .nav-link,
html[data-theme="dark"] .settings-tabs .nav-link,
html[data-theme="dark"] .mod-tabs .nav-link,
html[data-theme="dark"] .vq-tabs .nav-link {
  background-color: #161e2e !important;
  border-color: #1f2937 !important;
  border-bottom-color: #1f2937 !important;
  color: #94a3b8 !important;
  transition: all 0.15s ease;
}

html[data-theme="dark"] .tabs .nav-link:hover,
html[data-theme="dark"] .settings-tabs .nav-link:hover,
html[data-theme="dark"] .mod-tabs .nav-link:hover,
html[data-theme="dark"] .vq-tabs .nav-link:hover {
  background-color: #1e283d !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .tabs .nav-link.active,
html[data-theme="dark"] .settings-tabs .nav-link.active,
html[data-theme="dark"] .mod-tabs .nav-link.active,
html[data-theme="dark"] .vq-tabs .nav-link.active {
  background-color: #111827 !important;
  color: #3b82f6 !important;
  border-color: #1f2937 !important;
  border-bottom-color: #111827 !important;
}

html[data-theme="dark"] .block-tabs {
  background-color: #0e1524 !important;
  border-color: #1f2937 !important;
  box-shadow: inset 0 -1px 0 #1f2937 !important;
}

html[data-theme="dark"] .block-tabs .nav-link {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .block-tabs .nav-link:hover {
  color: #ffffff !important;
}

html[data-theme="dark"] .block-tabs .nav-link.active {
  color: #3b82f6 !important;
  border-bottom-color: #3b82f6 !important;
}

html[data-theme="dark"] .tab-buttons {
  border-color: #273346 !important;
}

html[data-theme="dark"] .tab-buttons .nav-link {
  color: #8896ab;
}

html[data-theme="dark"] .tab-buttons .nav-link.active {
  background-color: #3586FF !important;
  color: #fff !important;
}

/* Control Buttons (Fixed bottom action bar) */
html[data-theme="dark"] .control-buttons {
  background-color: #0e1524 !important;
  border-top: 1px solid #1f2937 !important;
  box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.5) !important;
}

html[data-theme="dark"] .control-buttons .btn-outline-success {
  border-color: #10b981 !important;
  color: #34d399 !important;
  background: rgba(16, 185, 129, 0.1) !important;
}

html[data-theme="dark"] .control-buttons .btn-outline-success:hover {
  background: #10b981 !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .control-buttons .btn-outline-light {
  border-color: #334155 !important;
  color: #cbd5e1 !important;
  background: rgba(255, 255, 255, 0.05) !important;
}

html[data-theme="dark"] .control-buttons .btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: #475569 !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .control-buttons .dropdown-menu {
  background-color: #131b2e !important;
  border: 1px solid #273346 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
}

html[data-theme="dark"] .control-buttons .dropdown-item {
  color: #cbd5e1 !important;
  background: transparent !important;
}

html[data-theme="dark"] .control-buttons .dropdown-item:hover {
  background-color: #2563eb !important;
  color: #ffffff !important;
}

/* Pagination (.paging) */
html[data-theme="dark"] .paging {
  padding: 1.25rem 0 !important;
  color: #94a3b8 !important;
}

html[data-theme="dark"] .paging a {
  background-color: #131b2e !important;
  color: #94a3b8 !important;
  border: 1px solid #273346 !important;
  border-radius: 6px !important;
  padding: 6px 12px !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  margin-right: 6px !important;
  transition: all 0.15s ease;
}

html[data-theme="dark"] .paging a:hover {
  background-color: #2563eb !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .paging b,
html[data-theme="dark"] .paging span {
  background-color: #2563eb !important;
  color: #ffffff !important;
  border: 1px solid #2563eb !important;
  border-radius: 6px !important;
  padding: 6px 12px !important;
  font-weight: 600 !important;
  margin-right: 6px !important;
  display: inline-block !important;
}

html[data-theme="dark"] .paging small {
  color: #64748b !important;
  margin-left: 10px !important;
  font-size: 13px !important;
}

html[data-theme="dark"] .divider-text {
  border-top-color: #1f2937 !important;
}

html[data-theme="dark"] .divider-text span {
  background-color: #111827 !important;
  color: #8896ab !important;
}

/* Buttons in Dark Mode */
html[data-theme="dark"] .btn-outline-primary {
  border-color: #3b82f6 !important;
  color: #60a5fa !important;
  background: rgba(59, 130, 246, 0.1) !important;
}

html[data-theme="dark"] .btn-outline-primary:hover {
  background-color: #2563eb !important;
  border-color: #2563eb !important;
  color: #fff !important;
}

html[data-theme="dark"] .btn-outline-light {
  border-color: #334155 !important;
  color: #cbd5e1 !important;
  background: rgba(255, 255, 255, 0.05) !important;
}

html[data-theme="dark"] .btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: #475569 !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .btn-light {
  background-color: #1f2937 !important;
  border-color: #273346 !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .btn-light:hover {
  background-color: #273346 !important;
  color: #fff !important;
}

/* Quick Copy Embed Button in Dark Mode */
html[data-theme="dark"] .copy-embed-btn svg.copy-icon {
  stroke: #94a3b8 !important;
}

html[data-theme="dark"] .copy-embed-btn:hover svg.copy-icon {
  stroke: #3586FF !important;
}

/* Footer (for public pages) */
html[data-theme="dark"] .footer {
  background-color: #0b0f17 !important;
  border-top: 1px solid #1f2937 !important;
  color: #8896ab !important;
}

html[data-theme="dark"] .footer .text-dark {
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .footer .nav-link {
  color: #8896ab !important;
}

html[data-theme="dark"] .footer .nav-link:hover {
  color: #3586FF !important;
}

html[data-theme="dark"] .footer-bottom {
  border-top: 1px solid #1f2937 !important;
}

/* ============================================================
   Dark Mode Toggle Button (Premium UI)
   ============================================================ */
.theme-toggle-btn {
  width: 36px;
  height: 36px;
  border-radius: 50% !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #C9CED5;
  background: rgba(126, 135, 157, 0.08);
  color: #4e5567;
  padding: 0;
  cursor: pointer;
  outline: none !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.theme-toggle-btn:hover {
  transform: rotate(15deg) scale(1.08);
  background: rgba(53, 134, 255, 0.12);
  border-color: #3586FF;
  color: #3586FF;
}

.theme-toggle-btn:active {
  transform: scale(0.95);
}

.theme-icon-moon,
.theme-icon-sun {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  vertical-align: middle;
}

html[data-theme="dark"] .theme-toggle-btn {
  border-color: #273346;
  background: rgba(251, 191, 36, 0.08);
  color: #fbbf24 !important;
}

html[data-theme="dark"] .theme-toggle-btn:hover {
  transform: rotate(20deg) scale(1.08);
  border-color: #fbbf24;
  background: rgba(251, 191, 36, 0.18);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.25);
}

html[data-theme="dark"] .theme-icon-sun {
  color: #fbbf24 !important;
  filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.5));
}

/* ============================================================
   Bootstrap Alerts (No torrents, No files, etc.)
   ============================================================ */
html[data-theme="dark"] .alert-secondary {
  background-color: #131b2e !important;
  border-color: #1f2937 !important;
  color: #cbd5e1 !important;
}
html[data-theme="dark"] .alert-primary {
  background-color: rgba(37, 99, 235, 0.15) !important;
  border-color: rgba(37, 99, 235, 0.3) !important;
  color: #93c5fd !important;
}
html[data-theme="dark"] .alert-info {
  background-color: rgba(6, 182, 212, 0.15) !important;
  border-color: rgba(6, 182, 212, 0.3) !important;
  color: #67e8f9 !important;
}
html[data-theme="dark"] .alert-warning {
  background-color: rgba(245, 158, 11, 0.15) !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
  color: #fde68a !important;
}
html[data-theme="dark"] .alert-danger {
  background-color: rgba(239, 68, 68, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: #fca5a5 !important;
}
html[data-theme="dark"] .alert-success {
  background-color: rgba(16, 185, 129, 0.15) !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
  color: #6ee7b7 !important;
}
html[data-theme="dark"] .alert-light {
  background-color: #111827 !important;
  border-color: #1f2937 !important;
  color: #cbd5e1 !important;
}

/* ============================================================
   Accordion & API Reference (api_reference.html / api.html)
   ============================================================ */
html[data-theme="dark"] .bg-light,
html[data-theme="dark"] .bg-white {
  background-color: #111827 !important;
  color: #cbd5e1 !important;
}
html[data-theme="dark"] .accordion-item {
  background-color: #111827 !important;
  border-color: #1f2937 !important;
  color: #cbd5e1 !important;
}
html[data-theme="dark"] .accordion-button {
  background-color: #111827 !important;
  color: #f1f5f9 !important;
  border-color: #1f2937 !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .accordion-button.collapsed {
  background-color: #111827 !important;
  color: #cbd5e1 !important;
}
html[data-theme="dark"] .accordion-button:not(.collapsed) {
  background-color: #162032 !important;
  color: #60a5fa !important;
  border-bottom: 1px solid #1f2937 !important;
}
html[data-theme="dark"] .accordion-button::after {
  filter: invert(1) brightness(160%);
}
html[data-theme="dark"] .accordion-body {
  background-color: #0e1524 !important;
  border-top: 1px solid #1f2937 !important;
  color: #cbd5e1 !important;
}
html[data-theme="dark"] pre.code,
html[data-theme="dark"] .code,
html[data-theme="dark"] code {
  background-color: #080c14 !important;
  border: 1px solid #1f2937 !important;
  color: #93c5fd !important;
}

/* Cards & Lists */
html[data-theme="dark"] .card {
  background-color: #111827 !important;
  border-color: #1f2937 !important;
  color: #cbd5e1 !important;
}
html[data-theme="dark"] .card-header,
html[data-theme="dark"] .card-footer {
  background-color: #0e1524 !important;
  border-color: #1f2937 !important;
}
html[data-theme="dark"] .list-group-item {
  background-color: #111827 !important;
  border-color: #1f2937 !important;
  color: #cbd5e1 !important;
}
