/* ===========================================
   PRESENTATION PRESENTER CSS
   Stili specifici per la modalità presenter
   =========================================== */

/* ===========================================
   SLIDE PRESENTER
   =========================================== */
.presenter-mode .slide {
  width: 95vw;
  height: 95vh;
  display: grid;
  grid-template-columns: 0.9fr 1.6fr;
  grid-template-rows: auto 1fr auto;
  gap: 0.25rem;
  background: var(--bg-card);
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 40px 80px -20px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

/* ===========================================
   HEADER PRESENTER
   =========================================== */
.presenter-mode .slide-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  grid-column: 1 / -1;
  gap: 1rem;
}

.presenter-mode .header-left {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 0;
}

.presenter-mode .presentation-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.8;
}

.presenter-mode .slide-title {
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0;
}

.presenter-mode .header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

/* ===========================================
   THEME SELECTOR - FIX VISIBILITÀ DARK MODE
   =========================================== */
.presenter-mode .theme-selector {
  min-width: 160px;
}

/* Input e select */
.presenter-mode .theme-selector .mud-input-control {
  background: rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
}

.presenter-mode .theme-selector .mud-input {
  color: var(--text-primary) !important;
}

.presenter-mode .theme-selector .mud-select-input {
  color: var(--text-primary) !important;
}

/* Label */
.presenter-mode .theme-selector .mud-input-label {
  color: var(--text-secondary) !important;
}

.presenter-mode .theme-selector .mud-input-label-outlined {
  background: var(--bg-card) !important;
  padding: 0 6px !important;
}

/* Bordi */
.presenter-mode .theme-selector .mud-input-outlined .mud-input-outlined-border {
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.presenter-mode .theme-selector .mud-input-outlined:hover .mud-input-outlined-border {
  border-color: rgba(255, 255, 255, 0.35) !important;
}

.presenter-mode .theme-selector .mud-input-outlined.mud-input-focused .mud-input-outlined-border {
  border-color: var(--primary-color) !important;
  border-width: 2px !important;
}

/* Icona dropdown */
.presenter-mode .theme-selector .mud-select-icon {
  color: var(--text-secondary) !important;
}

/* ===========================================
   SLIDE COUNTER
   =========================================== */
.presenter-mode .slide-counter {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(99, 102, 241, 0.15);
  padding: 0.5rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(99, 102, 241, 0.25);
  white-space: nowrap;
}

/* ===========================================
   AREA SLIDE PREVIEW
   =========================================== */
.presenter-mode .slide-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: rgba(10, 14, 26, 0.4);
  border-radius: 16px;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow-y: auto;
  grid-column: 1 / 2;
  grid-row: 2 / 3;
  min-width: 260px;
  margin-right: 0.8rem;
}

.presenter-mode .slide-image {
  width: 100%;
  min-height: 168px;
  max-height: 250px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.presenter-mode .slide-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.presenter-mode .slide-text {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.presenter-mode .slide-effect {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-color);
  font-style: italic;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--accent-color);
  background: linear-gradient(90deg, rgba(236, 72, 153, 0.1) 0%, transparent 100%);
  border-radius: 8px;
  line-height: 1.5;
}

.presenter-mode .slide-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.presenter-mode .slide-bullets li {
  font-size: 0.95rem;
  padding-left: 1.5rem;
  position: relative;
  line-height: 1.5;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.presenter-mode .slide-bullets li::before {
  content: "▸";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--primary-color);
  font-size: 1.2rem;
}

/* FIX: Prevent overlapping of nested HTML elements in bullets */
.presenter-mode .slide-bullets li p {
  margin: 0 !important;
  padding: 0 !important;
  display: inline;
}

.presenter-mode .slide-bullets li ul,
.presenter-mode .slide-bullets li ol {
  margin: 0.75rem 0 0.5rem 1.5rem !important;
  padding: 0 !important;
  list-style: none !important;
}

.presenter-mode .slide-bullets li ul li,
.presenter-mode .slide-bullets li ol li {
  font-size: 0.85rem;
  margin-bottom: 0.4rem !important;
  padding-left: 1.2rem !important;
  position: relative;
  line-height: 1.4;
  color: var(--text-primary);
}

.presenter-mode .slide-bullets li ul li::before {
  content: "◦" !important;
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  color: var(--secondary-color) !important;
  font-size: 1rem !important;
}

.presenter-mode .slide-bullets li ol {
  counter-reset: nested-counter !important;
}

.presenter-mode .slide-bullets li ol li {
  counter-increment: nested-counter !important;
  padding-left: 1.5rem !important;
}

.presenter-mode .slide-bullets li ol li::before {
  content: counter(nested-counter) "." !important;
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  color: var(--secondary-color) !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
}

/* ===========================================
   SPEAKER NOTES
   =========================================== */
.presenter-mode .speaker-notes {
  grid-column: 2 / 3;
  grid-row: 2 / 3;
  background: rgba(10, 14, 26, 0.6);
  border-radius: 16px;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 0.5rem;
  overflow: hidden;
}

.presenter-mode .notes-script-main {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.presenter-mode .notes-script-main h3 {
  font-size: 1rem;
  margin: 0 0 0.75rem 0;
  color: var(--primary-color);
  font-weight: 700;
  position: sticky;
  top: 0;
  background: rgba(10, 14, 26, 0.95);
  padding: 0.5rem 0;
  z-index: 10;
}

.presenter-mode .script-content-compact {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.presenter-mode .script-content-compact p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.75rem;
  border-radius: 8px;
  border-left: 2px solid rgba(99, 102, 241, 0.3);
  margin: 0;
}

.presenter-mode .notes-sidebar-compact {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.presenter-mode .notes-box-compact {
  background: rgba(255, 255, 255, 0.04);
  padding: 0.75rem;
  border-radius: 8px;
  border-left: 3px solid var(--primary-color);
  transition: all 0.3s ease;
}

.presenter-mode .notes-box-compact:hover {
  background: rgba(255, 255, 255, 0.06);
  border-left-color: var(--accent-color);
  transform: translateX(2px);
}

.presenter-mode .notes-box-compact h4 {
  font-size: 0.8rem;
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
  font-weight: 600;
}

.presenter-mode .notes-box-compact p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.presenter-mode .notes-box-compact ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.presenter-mode .notes-box-compact li {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
  padding-left: 1rem;
  position: relative;
}

.presenter-mode .notes-box-compact li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary-color);
}

/* ===========================================
   FOOTER PRESENTER
   =========================================== */
.presenter-mode .slide-controls {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  gap: 1rem;
}

.presenter-mode .controls-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.presenter-mode .control-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ===========================================
   PULSANTI NAVIGAZIONE
   =========================================== */
.presenter-mode .nav-btn {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
  color: white !important;
  border: none !important;
  padding: 0.25rem 0.55rem !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  border-radius: 12px !important;
  cursor: pointer;
  transition: all 0.3s ease !important;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.25) !important;
  text-transform: none !important;
}

.presenter-mode .nav-btn:hover:not(:disabled) {
  transform: translateY(-2px) !important;
  box-shadow: 0 12px 28px rgba(99, 102, 241, 0.4) !important;
}

.presenter-mode .nav-btn:disabled {
  opacity: 0.3 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}

.presenter-mode .nav-btn.viewer-link {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.25) !important;
}

.presenter-mode .nav-btn.prompt-btn {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.25) !important;
}

/* ===========================================
   BADGE E STATUS
   =========================================== */
.presenter-badge {
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--secondary-color) 100%);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(236, 72, 153, 0.25);
  color: white;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.connection-status {
  font-size: 0.8rem;
  padding: 0.4rem 0.85rem;
  border-radius: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.slide-content-text-presenter p, .slide-content-text-presenter ul li {
  font-size: 0.9rem
}

.connection-status.connected {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.15);
}

.connection-status.disconnected {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.15);
}

/* ===========================================
   RESPONSIVE - PRESENTER
   =========================================== */
@media (max-width: 1200px) {
  .presenter-mode .slide {
    grid-template-columns: 1fr;
  }

  .presenter-mode .slide-content {
    grid-column: 1 / -1;
    max-width: 100%;
    min-width: 0;
  }

  .presenter-mode .speaker-notes {
    grid-column: 1 / -1;
    grid-template-columns: 1.3fr 1fr;
  }
}

@media (max-width: 768px) {
  .presenter-mode .slide {
    padding: 1rem;
    grid-template-rows: auto minmax(200px, 1fr) minmax(150px, auto) auto;
  }

  .presenter-mode .slide-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .presenter-mode .header-left {
    width: 100%;
  }

  .presenter-mode .header-right {
    width: 100%;
    justify-content: space-between;
  }

  .presenter-mode .theme-selector {
    min-width: 120px;
    flex: 1;
    max-width: 200px;
  }

  .presenter-mode .slide-title {
    font-size: 1.1rem;
  }

  .presenter-mode .slide-counter {
    font-size: 0.85rem;
    padding: 0.4rem 0.75rem;
  }

  .presenter-mode .slide-content {
    grid-row: 2 / 3;
    padding: 0.75rem;
  }

  .presenter-mode .slide-effect {
    font-size: 0.9rem;
    padding: 0.65rem 0.85rem;
  }

  .presenter-mode .slide-bullets li {
    font-size: 0.85rem;
  }

  .presenter-mode .speaker-notes {
    grid-template-columns: 1fr;
    grid-row: 3 / 4;
    padding: 0.75rem;
    max-height: 300px;
  }

  .presenter-mode .notes-script-main h3 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }

  .presenter-mode .script-content-compact p {
    font-size: 0.8rem;
    padding: 0.65rem;
  }

  .presenter-mode .notes-sidebar-compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .presenter-mode .notes-box-compact {
    padding: 0.65rem;
  }

  .presenter-mode .notes-box-compact h4 {
    font-size: 0.75rem;
  }

  .presenter-mode .notes-box-compact p,
  .presenter-mode .notes-box-compact li {
    font-size: 0.7rem;
  }

  .presenter-mode .slide-controls {
    grid-row: 4 / 5;
    flex-wrap: wrap;
    padding-top: 0.75rem;
  }

  .presenter-mode .controls-left {
    width: 100%;
    justify-content: center;
    margin-bottom: 0.5rem;
  }

  .presenter-mode .control-info {
    width: 100%;
    justify-content: center;
    gap: 0.5rem;
  }

  .presenter-mode .nav-btn {
    padding: 0.6rem 1rem !important;
    font-size: 0.85rem !important;
  }

  .presenter-badge,
  .connection-status {
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
  }
}

@media (max-width: 640px) {
  .presenter-mode .slide {
    padding: 0.75rem;
  }

  .presenter-mode .slide-title {
    font-size: 1rem;
  }

  .presenter-mode .theme-selector {
    min-width: 100px;
  }

  .presenter-mode .notes-sidebar-compact {
    grid-template-columns: 1fr;
  }

  .presenter-mode .nav-btn .nav-text {
    display: none !important;
  }
}

/* ===========================================
   TEMA LIGHT - PRESENTER MODE
   =========================================== */
[data-theme="light"] .presenter-mode .slide {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05), 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .presenter-mode .slide-header {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .presenter-mode .presentation-title {
  color: #64748b;
}

[data-theme="light"] .presenter-mode .slide-title {
  background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Theme selector light */
[data-theme="light"] .presenter-mode .theme-selector .mud-input-control {
  background: rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .presenter-mode .theme-selector .mud-input,
[data-theme="light"] .presenter-mode .theme-selector .mud-select-input {
  color: #0f172a !important;
}

[data-theme="light"] .presenter-mode .theme-selector .mud-input-label {
  color: #64748b !important;
}

[data-theme="light"] .presenter-mode .theme-selector .mud-input-label-outlined {
  background: #ffffff !important;
}

[data-theme="light"] .presenter-mode .theme-selector .mud-input-outlined .mud-input-outlined-border {
  border-color: rgba(0, 0, 0, 0.15) !important;
}

[data-theme="light"] .presenter-mode .theme-selector .mud-input-outlined:hover .mud-input-outlined-border {
  border-color: rgba(0, 0, 0, 0.3) !important;
}

[data-theme="light"] .presenter-mode .theme-selector .mud-select-icon {
  color: #64748b !important;
}

[data-theme="light"] .presenter-mode .slide-counter {
  background: rgba(255, 107, 53, 0.1);
  border-color: rgba(255, 107, 53, 0.2);
  color: #475569;
}

[data-theme="light"] .presenter-mode .slide-content {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .presenter-mode .slide-image {
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .presenter-mode .slide-effect {
  color: #ff6b35;
  background: linear-gradient(90deg, rgba(255, 107, 53, 0.1) 0%, transparent 100%);
  border-left-color: #ff6b35;
}

[data-theme="light"] .presenter-mode .slide-bullets li {
  color: #0f172a;
}

[data-theme="light"] .presenter-mode .slide-bullets li::before {
  color: #ff6b35;
}

[data-theme="light"] .presenter-mode .speaker-notes {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .presenter-mode .notes-script-main h3 {
  color: #ff6b35;
  background: rgba(255, 255, 255, 0.95);
}

[data-theme="light"] .presenter-mode .script-content-compact p {
  background: rgba(255, 107, 53, 0.05);
  color: #0f172a;
  border-left-color: rgba(255, 107, 53, 0.4);
}

[data-theme="light"] .presenter-mode .notes-box-compact {
  background: rgba(255, 107, 53, 0.05);
  border-left-color: #ff6b35;
}

[data-theme="light"] .presenter-mode .notes-box-compact:hover {
  background: rgba(255, 107, 53, 0.1);
  border-left-color: #f7931e;
}

[data-theme="light"] .presenter-mode .notes-box-compact h4 {
  color: #0f172a;
}

[data-theme="light"] .presenter-mode .notes-box-compact p,
[data-theme="light"] .presenter-mode .notes-box-compact li {
  color: #1e293b;
}

[data-theme="light"] .presenter-mode .notes-box-compact li::before {
  color: #ff6b35;
}

[data-theme="light"] .presenter-mode .slide-controls {
  border-top-color: rgba(0, 0, 0, 0.08);
}

/* ===========================================
   IMAGE PROMPT BOX
   =========================================== */
.presenter-mode .image-prompt-box {
  border-left-color: #f59e0b !important;
  background: rgba(245, 158, 11, 0.08) !important;
}

.presenter-mode .image-prompt-box:hover {
  background: rgba(245, 158, 11, 0.12) !important;
  border-left-color: #d97706 !important;
}

.presenter-mode .image-prompt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.presenter-mode .image-prompt-header h4 {
  margin: 0 !important;
}

.presenter-mode .image-prompt-text {
  font-size: 0.7rem !important;
  line-height: 1.5 !important;
  white-space: pre-wrap;
  color: var(--text-secondary);
}

[data-theme="light"] .presenter-mode .image-prompt-box {
  background: rgba(245, 158, 11, 0.1) !important;
  border-left-color: #f59e0b !important;
}

[data-theme="light"] .presenter-mode .image-prompt-box:hover {
  background: rgba(245, 158, 11, 0.15) !important;
}

[data-theme="light"] .presenter-mode .image-prompt-text {
  color: #1e293b;
}

/* ===========================================
   SLIDES DRAWER (SOMMARIO) - A SINISTRA
   =========================================== */
.slides-drawer {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  height: 100vh !important;
  width: 420px !important;
  max-width: 95vw !important;
  z-index: 9999 !important;
}

.slides-drawer.mud-drawer--open {
  transform: translateX(0) !important;
}

.slides-drawer .mud-drawer-content {
  background: var(--bg-card, #141824) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Overlay scuro dietro il drawer */
.mud-overlay {
  z-index: 9998 !important;
}

.slides-drawer-header {
  display: flex !important;
  align-items: center !important;
  padding: 1.25rem 1.5rem !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.1)) !important;
  flex-shrink: 0 !important;
}

.slides-drawer-header .mud-typography {
  color: var(--text-primary, #ffffff) !important;
  font-weight: 700 !important;
}

/* Pulsante chiusura drawer ben visibile */
.drawer-close-btn {
  background: rgba(239, 68, 68, 0.2) !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
  border-radius: 8px !important;
}

.drawer-close-btn:hover {
  background: rgba(239, 68, 68, 0.4) !important;
  border-color: rgba(239, 68, 68, 0.6) !important;
}

.slides-nav-menu {
  padding: 1rem !important;
  overflow-y: auto !important;
  flex: 1 !important;
}

.slide-summary-item {
  padding: 1rem;
  margin-bottom: 0.75rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: all 0.2s ease;
}

.slide-summary-item:hover {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.35);
  transform: translateX(4px);
}

.slide-summary-item.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(139, 92, 246, 0.2));
  border-color: var(--primary-color, #6366f1);
  box-shadow: 0 0 25px rgba(99, 102, 241, 0.25);
}

.slide-summary-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.slide-summary-header .slide-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.slide-summary-header .slide-title-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.slide-effect-text {
  font-size: 0.75rem;
  color: var(--accent-color);
  font-style: italic;
  margin: 0.5rem 0;
  padding-left: 0.75rem;
  border-left: 2px solid var(--accent-color);
  line-height: 1.4;
}

.slide-bullets-preview {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0 0;
}

.slide-bullets-preview li {
  font-size: 0.7rem;
  color: var(--text-secondary);
  padding: 0.2rem 0 0.2rem 1rem;
  position: relative;
  line-height: 1.4;
}

.slide-bullets-preview li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary-color);
}

.slide-bullets-preview li.more {
  color: var(--text-muted);
  font-style: italic;
}

.slide-bullets-preview li.more::before {
  content: "";
}

/* Light theme drawer */
[data-theme="light"] .slides-drawer .mud-drawer-content {
  background: #ffffff !important;
  border-left-color: rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .slides-drawer-header {
  background: rgba(255, 107, 53, 0.1) !important;
  border-bottom-color: rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .slides-drawer-header .mud-typography {
  color: #0f172a !important;
}

[data-theme="light"] .slide-summary-item {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .slide-summary-item:hover {
  background: rgba(255, 107, 53, 0.08);
  border-color: rgba(255, 107, 53, 0.3);
}

[data-theme="light"] .slide-summary-item.active {
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.15), rgba(247, 147, 30, 0.15));
  border-color: #ff6b35;
  box-shadow: 0 0 20px rgba(255, 107, 53, 0.15);
}

[data-theme="light"] .slide-summary-header .slide-number {
  background: linear-gradient(135deg, #ff6b35, #f7931e);
}

[data-theme="light"] .slide-summary-header .slide-title-text {
  color: #0f172a;
}

[data-theme="light"] .slide-effect-text {
  color: #ff6b35;
  border-left-color: #ff6b35;
}

[data-theme="light"] .slide-bullets-preview li {
  color: #475569;
}

[data-theme="light"] .slide-bullets-preview li::before {
  color: #ff6b35;
}

/* ===========================================
   IMAGE PROMPT INLINE (nella slide-content)
   =========================================== */
.presenter-mode .image-prompt-inline {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(251, 191, 36, 0.05));
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 10px;
  border-left: 4px solid #f59e0b;
}

.presenter-mode .image-prompt-inline .image-prompt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.presenter-mode .image-prompt-inline .image-prompt-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #f59e0b;
}

.presenter-mode .image-prompt-inline .image-prompt-text {
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--text-secondary);
  white-space: pre-wrap;
  margin: 0;
}

[data-theme="light"] .presenter-mode .image-prompt-inline {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(251, 191, 36, 0.08));
  border-color: rgba(245, 158, 11, 0.35);
}

[data-theme="light"] .presenter-mode .image-prompt-inline .image-prompt-text {
  color: #1e293b;
}

/* ===========================================
   SLIDES SUMMARY DIALOG
   =========================================== */
.slides-summary-dialog {
  max-height: 70vh;
  overflow-y: auto;
}

.slides-summary-dialog .summary-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.slides-summary-dialog .summary-item {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.slides-summary-dialog .summary-item:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateX(4px);
}

.slides-summary-dialog .summary-item.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.15));
  border-color: var(--primary-color);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

.slides-summary-dialog .summary-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.slides-summary-dialog .summary-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.slides-summary-dialog .summary-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.slides-summary-dialog .summary-effect {
  font-size: 0.85rem;
  color: var(--accent-color);
  font-style: italic;
  margin: 0.5rem 0;
  padding-left: 1rem;
  border-left: 2px solid var(--accent-color);
}

.slides-summary-dialog .summary-bullets {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0 0;
}

.slides-summary-dialog .summary-bullets li {
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding: 0.25rem 0 0.25rem 1.25rem;
  position: relative;
}

.slides-summary-dialog .summary-bullets li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--primary-color);
}

/* ===========================================
   SLIDES OVERVIEW DIALOG (Vista Panoramica)
   =========================================== */
.slides-overview-dialog {
  padding: 0 !important;
}

.slides-overview-dialog .overview-header-info {
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.05));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.slides-overview-dialog .overview-header-info h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.25rem 0;
}

.slides-overview-dialog .overview-header-info p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

/* FIX: PANORAMICA button visibility in light theme */
[data-theme="light"] .presenter-mode .overview-btn {
  color: #0f172a !important;
  border-color: rgba(0, 0, 0, 0.3) !important;
  background: rgba(255, 255, 255, 0.95) !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .presenter-mode .overview-btn:hover {
  background: rgba(255, 255, 255, 1) !important;
  border-color: rgba(0, 0, 0, 0.4) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* FIX: Overview dialog text visibility in light theme */
[data-theme="light"] .slides-overview-dialog .overview-header-info h2 {
  color: #0f172a !important;
  text-shadow: none !important;
}

[data-theme="light"] .slides-overview-dialog .overview-header-info p {
  color: #475569 !important;
}

.slides-overview-dialog .overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  padding: 1.5rem;
}

.slides-overview-dialog .overview-card {
  cursor: pointer !important;
  transition: all 0.25s ease !important;
}

.slides-overview-dialog .overview-card:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3) !important;
}

.slides-overview-dialog .overview-card.active {
  border: 2px solid var(--primary-color, #6366f1) !important;
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.25) !important;
}

.slides-overview-dialog .card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.slides-overview-dialog .card-title {
  margin: 0 !important;
}

.slides-overview-dialog .card-effect {
  font-style: italic;
  padding-left: 1rem;
  border-left: 3px solid var(--accent-color, #ec4899);
  margin: 0.5rem 0;
}

.slides-overview-dialog .card-bullets {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0;
}

.slides-overview-dialog .card-bullets li {
  font-size: 0.85rem;
  color: var(--text-secondary, #cbd5e1);
  padding: 0.2rem 0 0.2rem 1.25rem;
  position: relative;
  line-height: 1.4;
}

.slides-overview-dialog .card-bullets li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--primary-color, #6366f1);
}

/* Light theme for dialogs */
[data-theme="light"] .slides-summary-dialog .summary-item,
[data-theme="light"] .slides-overview-dialog .overview-card {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .slides-summary_dialog .summary-title,
[data-theme="light"] .slides-overview-dialog .card-title {
  color: #0f172a;
}

[data-theme="light"] .slides-summary_dialog .summary-effect,
[data-theme="light"] .slides-overview-dialog .card-effect {
  color: #ff6b35;
  border-left-color: #ff6b35;
}

[data-theme="light"] .slides-overview-dialog .overview-header-info {
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.08), rgba(247, 147, 30, 0.05));
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .slides-overview-dialog .overview-header-info h2 {
  color: #0f172a;
}

/* ===========================================
   IMAGE PROMPT BUTTON (MudIconButton)
   =========================================== */
.image-prompt-btn {
  margin-right: 0.6rem;
  height: 40px;
  width: 40px;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
}

/* FIX: Image prompt icon - Tutti i temi */
.presenter-mode .image-prompt-btn {
  background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%) !important;
  color: white !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3) !important;
}

/* FIX: Icona interna - TUTTI I TEMI */
.presenter-mode .image-prompt-btn .mud-icon-root,
.presenter-mode .image-prompt-btn .mud-icon-root svg,
.presenter-mode .image-prompt-btn .mud-button-icon-start,
.presenter-mode .image-prompt-btn .mud-button-icon,
.presenter-mode .image-prompt-btn svg,
.presenter-mode .image-prompt-btn .mud-button-root {
  background: transparent !important;
  background-color: transparent !important;
  color: white !important;
  fill: white !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Light theme - FIX COMPLETO */
[data-theme="light"] .presenter-mode .image-prompt-btn {
  background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%) !important;
  color: white !important;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3) !important;
  border: none !important;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
}

[data-theme="light"] .presenter-mode .image-prompt-btn:hover {
  background: linear-gradient(135deg, #e55a2b 0%, #e8851a 100%) !important;
  box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4) !important;
}

/* FIX: Tooltip in modalità light */
[data-theme="light"] .mud-tooltip {
  background: rgba(0, 0, 0, 0.9) !important;
  color: white !important;
}

[data-theme="light"] .mud-tooltip .mud-tooltip-content {
  color: white !important;
  background: transparent !important;
}

/* FIX: Tooltip leggibile - TUTTI I TEMI */
.mud-tooltip {
  background: rgba(15, 23, 42, 0.95) !important;
  color: white !important;
  font-size: 0.875rem !important;
  padding: 0.5rem 0.75rem !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
  backdrop-filter: blur(10px) !important;
  max-width: 300px !important;
  word-wrap: break-word !important;
}

.mud-tooltip .mud-tooltip-content {
  color: white !important;
  background: transparent !important;
}

/* FIX: Tooltip in modalità light - PIÙ SCURO E LEGGIBILE */
[data-theme="light"] .mud-tooltip {
  background: rgba(15, 23, 42, 0.95) !important;
  color: white !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

[data-theme="light"] .mud-tooltip .mud-tooltip-content {
  color: white !important;
  background: transparent !important;
}

.presenter-status {
  position: fixed;
  bottom: 4px;
  right: 20px;
  display: flex;
  gap: 10px;
  z-index: 1000;
}

.connection-badge {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
}

  .connection-badge.connected {
    background: #10b981;
    color: white;
  }

  .connection-badge.disconnected {
    background: #ef4444;
    color: white;
    font-size: 0.6rem;
  }

.viewer-count {
  padding: 8px 16px;
  border-radius: 20px;
  background: #3b82f6;
  color: white;
  font-size: 14px;
  font-weight: 500;
}

/* ===========================================
   TIMER INTEGRATO NELLA BARRA CONTROLLI
   =========================================== */
.timer-in-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    max-width: 400px;
}

/* Integrazione hamburger menu nel titolo */
.title-with-menu {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.title-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    min-width: 0;
}

/* Gruppo controlli destra - Allineamento perfetto */
.controls-right-group {
    display: flex;
    align-items: center
}

/* Allineamento prompt icon con altri controlli */
.image-prompt-btn {
    margin-right: 0.6rem !important;
    height: 40px !important;
    width: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    align-self: center !important;
}

/* Status badges group - Orizzontale per ottimizzare spazio */
.status-badges-group {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.connection-badge,
.viewer-badge,
.presenter-badge,
.sync-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}

.connection-badge.connected {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.3), rgba(5, 150, 105, 0.3));
    border-color: rgba(16, 185, 129, 0.5);
    color: #10b981;
}

.connection-badge.disconnected {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(220, 38, 38, 0.3));
    border-color: rgba(239, 68, 68, 0.5);
    color: #ef4444;
}

.presenter-badge {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.3), rgba(219, 39, 119, 0.3));
    border-color: rgba(236, 72, 153, 0.5);
    color: #ec4899;
}

.sync-badge {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), rgba(21, 128, 61, 0.3));
    border-color: rgba(34, 197, 94, 0.5);
    color: #22c55e;
}

.viewer-badge {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(79, 70, 229, 0.3));
    border-color: rgba(99, 102, 241, 0.5);
    color: #6366f1;
}

/* Responsive per mobile */
@media (max-width: 768px) {
  .title-with-menu {
    flex-direction: column;
    gap: 0.5rem;
  }

  .status-badges-group {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
  }
}

/* Dark Brand theme */
[data-theme="dark-brand"] .presenter-mode .image-prompt-btn {
  background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%) !important;
  color: white !important;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3) !important;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
}

[data-theme="dark-brand"] .presenter-mode .image-prompt-btn:hover {
  background: linear-gradient(135deg, #e55a2b 0%, #e8851a 100%) !important;
  box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4) !important;
}
