:root { color-scheme: dark light; }
body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  margin: 0;
  padding: 24px;
  background: #0b0e13;
  color: #e8eef9;
}

/* TV Login Banner */
.tv-login-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #e5a00d, #d4940c);
  padding: 12px 20px;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.tv-banner-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  max-width: 1200px;
  margin: 0 auto;
  font-weight: 500;
}

.tv-login-btn {
  background: rgba(255,255,255,0.2);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.tv-login-btn:hover {
  background: rgba(255,255,255,0.3);
  transform: translateY(-1px);
}

body.has-tv-banner {
  padding-top: 80px;
}

/* Authentication Styles */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  max-width: 400px;
  width: 100%;
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  text-align: center;
}

.auth-card h1 {
  color: #60a5fa;
  margin-bottom: 8px;
}

.auth-card > p {
  color: #9ca3af;
  margin-bottom: 32px;
}

.auth-form h2 {
  margin-bottom: 24px;
  color: #e8eef9;
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  color: #e8eef9;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 12px;
  border: 1px solid #374151;
  border-radius: 8px;
  background: #0f172a;
  color: #e8eef9;
  font-size: 1rem;
  box-sizing: border-box;
}

.form-group input:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.auth-button {
  width: 100%;
  background: #60a5fa;
  color: #111827;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-bottom: 16px;
}

.auth-button:hover {
  background: #3b82f6;
}

.auth-switch {
  margin: 0;
  color: #9ca3af;
  font-size: 0.9rem;
}

.auth-switch a {
  color: #60a5fa;
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}

.status {
  margin-top: 16px;
  padding: 12px;
  border-radius: 8px;
  font-size: 0.9rem;
}

.status.success {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.status.error {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Legacy Plex Login Styles */
.login-container {
  max-width: 400px;
  margin: 80px auto;
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  text-align: center;
}

.pin-code {
  font-size: 2rem;
  font-weight: bold;
  margin: 24px 0;
  color: #60a5fa;
  letter-spacing: 2px;
}

.login-button {
  background: #60a5fa;
  color: #111827;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.login-button:hover {
  background: #3b82f6;
}

.card {
  max-width: 720px;
  margin: 0 auto;
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

.row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: stretch;
  min-height: calc(100vh - 48px - 42px); /* viewport height minus padding and border */
}

.poster {
  height: 100%;
  width: auto;
  border-radius: 12px;
  aspect-ratio: 2/3;
  object-fit: contain;
  background: #0f172a;
  max-height: calc(100vh - 48px - 42px);
}

.title {
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1.2;
  margin: 0 0 6px;
}

.meta {
  opacity: .8;
  font-size: .9rem;
  margin-bottom: 12px;
}

.meta + .meta {
  margin-top: -6px;
}

.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #374151;
  font-size: .8rem;
  margin-right: 8px;
  margin-bottom: 6px;
}

.pill.rating {
  background: #1f2937;
  border-color: #374151;
}

.imdb-rating {
  display: inline-flex;
  align-items: center;
  background: #000000;
  border: none !important;
  font-family: Roboto, Arial, sans-serif;
  color: white;
  padding: 4px 8px !important;
  gap: 6px;
}

.imdb-rating img {
  height: 14px;
  width: auto;
}

.imdb-rating span {
  color: white;
  font-weight: bold;
  font-size: 12px;
  line-height: 1;
}

#contentRating {
  color: #60a5fa;
  border-color: #60a5fa;
}

.bar {
  height: 10px;
  background: #0f172a;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #1f2937;
}

.fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #60a5fa, #34d399);
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
  font-variant-numeric: tabular-nums;
}

.muted { opacity: .8; }
.empty { 
  text-align: center; 
  padding: 40px 10px; 
}

.slideshow {
  max-width: 600px;
  margin: 0 auto;
}

.slideshow-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.slideshow-info {
  text-align: left;
  width: 100%;
}

.summary {
  line-height: 1.5;
  opacity: 0.8;
  margin-top: 12px;
}

#slideshow-poster {
  max-width: 300px;
  width: 100%;
  opacity: 0;
}

.footer { 
  text-align: center; 
  margin-top: 18px; 
  opacity: .6; 
  font-size: .85rem; 
}

/* User Menu */
.user-menu {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: rgba(17, 24, 39, 0.9);
  border: 1px solid #374151;
  border-radius: 12px;
  color: #e8eef9;
  font-size: 0.9rem;
}

.menu-button {
  padding: 6px 12px;
  border: 1px solid #374151;
  border-radius: 6px;
  background: #1f2937;
  color: #e8eef9;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.menu-button:hover {
  background: #374151;
}

.menu-button.logout {
  background: #dc2626;
  border-color: #dc2626;
  color: white;
}

.menu-button.logout:hover {
  background: #b91c1c;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
}

.modal-content {
  background-color: #111827;
  margin: 15% auto;
  padding: 32px;
  border: 1px solid #1f2937;
  border-radius: 20px;
  width: 90%;
  max-width: 500px;
  position: relative;
  color: #e8eef9;
}

.close {
  color: #9ca3af;
  float: right;
  font-size: 28px;
  font-weight: bold;
  position: absolute;
  right: 20px;
  top: 20px;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: #e8eef9;
}

.modal-content h2 {
  margin-top: 0;
  margin-bottom: 16px;
  color: #60a5fa;
}

.modal-content p {
  margin-bottom: 20px;
  color: #d1d5db;
}

/* =============================================================================
   ADMIN INTERFACE STYLES
   ============================================================================= */

/* Admin Page Layout */
.admin-page {
  background: #0f172a;
  padding: 0;
  min-height: 100vh;
}

.admin-header {
  background: #111827;
  border-bottom: 1px solid #1f2937;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 0;
}

.admin-nav h1 {
  margin: 0;
  color: #60a5fa;
  font-size: 1.5rem;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-button {
  background: #374151;
  color: #e8eef9;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.nav-button:hover {
  background: #4b5563;
  transform: translateY(-1px);
}

.user-info {
  color: #9ca3af;
  font-size: 0.9rem;
}

.logout-button {
  background: #dc2626;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.logout-button:hover {
  background: #b91c1c;
  transform: translateY(-1px);
}

/* Admin Container */
.admin-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
}

.admin-section {
  margin-bottom: 48px;
}

.admin-section h2 {
  color: #e8eef9;
  margin-bottom: 24px;
  font-size: 1.5rem;
  font-weight: 600;
}

.config-card {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Status Indicators */
.status-indicator {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  background: #0f172a;
  border-radius: 8px;
  border: 1px solid #1f2937;
}

.status-icon {
  font-size: 1.2rem;
}

.status-text {
  color: #d1d5db;
  font-weight: 500;
}

.status-connected {
  color: #10b981;
  font-weight: 600;
}

/* Server Info */
.server-info {
  background: #0f172a;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 24px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #1f2937;
}

.info-row:last-child {
  border-bottom: none;
}

.info-row strong {
  color: #e8eef9;
}

.info-row span {
  color: #9ca3af;
}

/* Buttons */
.config-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.test-button {
  background: #059669;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.test-button:hover:not(:disabled) {
  background: #047857;
  transform: translateY(-1px);
}

.test-button:disabled {
  background: #374151;
  cursor: not-allowed;
  transform: none;
}

.reconfig-button {
  background: #d97706;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.reconfig-button:hover {
  background: #b45309;
  transform: translateY(-1px);
}

.remove-button {
  background: #dc2626;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.remove-button:hover:not(:disabled) {
  background: #b91c1c;
  transform: translateY(-1px);
}

.remove-button:disabled {
  background: #6b7280;
  cursor: not-allowed;
  transform: none;
}

.setup-button {
  background: #60a5fa;
  color: #111827;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.setup-button:hover {
  background: #3b82f6;
  transform: translateY(-1px);
}

/* PIN Display */
.pin-instructions {
  text-align: center;
  background: #0f172a;
  border-radius: 8px;
  padding: 24px;
  margin-top: 20px;
}

.pin-instructions h4 {
  color: #60a5fa;
  margin-bottom: 16px;
}

.plex-link {
  color: #60a5fa;
  text-decoration: none;
  font-weight: 600;
}

.plex-link:hover {
  text-decoration: underline;
}

.pin-code-display {
  margin: 24px 0;
}

.pin-code-display .pin-code {
  display: inline-block;
  background: #1f2937;
  color: #60a5fa;
  font-size: 2rem;
  font-weight: bold;
  font-family: 'Courier New', monospace;
  padding: 16px 32px;
  border-radius: 8px;
  letter-spacing: 0.5rem;
  border: 2px solid #374151;
}

.auth-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #9ca3af;
}

/* Loading Spinner */
.loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #374151;
  border-top: 2px solid #60a5fa;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Settings */
.setting-group {
  margin-bottom: 32px;
}

.setting-group h3 {
  color: #e8eef9;
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #1f2937;
}

.setting-row:last-child {
  border-bottom: none;
}

.setting-row label {
  color: #d1d5db;
  font-weight: 500;
}

.setting-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #60a5fa;
}

.setting-row input[type="number"] {
  background: #0f172a;
  border: 1px solid #374151;
  color: #e8eef9;
  padding: 6px 12px;
  border-radius: 4px;
  width: 100px;
}

.setting-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.save-button {
  background: #059669;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.save-button:hover {
  background: #047857;
  transform: translateY(-1px);
}

.reset-button {
  background: #6b7280;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.reset-button:hover {
  background: #4b5563;
  transform: translateY(-1px);
}

/* Quick Actions */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.quick-button {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 24px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.quick-button:hover {
  background: #1f2937;
  border-color: #374151;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.button-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.button-text {
  color: #e8eef9;
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.button-desc {
  color: #9ca3af;
  font-size: 0.9rem;
}

/* Account Actions */
.account-info {
  background: #0f172a;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 24px;
}

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

.export-button {
  background: #374151;
  color: #e8eef9;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.export-button:hover {
  background: #4b5563;
  transform: translateY(-1px);
}

.danger-button {
  background: #dc2626;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.danger-button:hover {
  background: #b91c1c;
  transform: translateY(-1px);
}

/* Player Selection */
.player-options {
  margin-top: 20px;
}

.current-filter {
  color: #9ca3af;
  font-weight: normal;
}

.current-filter.filtered {
  color: #10b981;
  font-weight: 600;
}

.player-list {
  margin: 20px 0;
  background: #0f172a;
  border-radius: 8px;
  padding: 20px;
  max-height: 400px;
  overflow-y: auto;
}

.loading-players {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 20px;
  color: #9ca3af;
}

.player-error, .no-players {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  color: #9ca3af;
}

.error-icon, .info-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.error-text, .info-text {
  flex: 1;
}

.error-text strong, .info-text strong {
  color: #e8eef9;
  display: block;
  margin-bottom: 4px;
}

.error-text p, .info-text p {
  margin: 0;
  color: #9ca3af;
  font-size: 0.9rem;
}

.player-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  margin-bottom: 12px;
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.player-item:last-child {
  margin-bottom: 0;
}

.player-item:hover {
  background: #374151;
  border-color: #4b5563;
}

.player-item.selected-player {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}

.player-info {
  flex: 1;
}

.player-main {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.player-name {
  color: #e8eef9;
  font-weight: 600;
  font-size: 1rem;
}

.player-status {
  color: #10b981;
  font-size: 0.8rem;
  background: rgba(16, 185, 129, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.player-now-playing {
  color: #60a5fa;
  font-size: 0.95rem;
  font-weight: 500;
  margin: 6px 0;
  padding: 6px 10px;
  background: rgba(96, 165, 250, 0.1);
  border-radius: 6px;
  border-left: 3px solid #60a5fa;
  font-style: italic;
}

.player-details {
  display: flex;
  gap: 16px;
}

.player-product, .player-platform {
  color: #9ca3af;
  font-size: 0.9rem;
}

.select-player-btn {
  background: #60a5fa;
  color: #111827;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.select-player-btn:hover {
  background: #3b82f6;
  transform: translateY(-1px);
}

.player-item.selected-player .select-player-btn {
  background: #10b981;
  color: white;
}

.player-item.selected-player .select-player-btn:hover {
  background: #059669;
}

.player-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

/* Library Selection Styles */
.library-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  margin-bottom: 12px;
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.library-item:last-child {
  margin-bottom: 0;
}

.library-item:hover {
  background: #374151;
  border-color: #4b5563;
}

.library-item.selected-library {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}

.library-icon {
  font-size: 2rem;
  line-height: 1;
}

.library-details {
  flex: 1;
}

.library-name {
  color: #e8eef9;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 4px;
}

.library-info {
  color: #9ca3af;
  font-size: 0.9rem;
}

.library-select {
  color: #10b981;
  font-size: 1.5rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.library-item.selected-library .library-select {
  opacity: 1;
}

.library-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.library-error, .no-libraries {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 8px;
}

.library-error .error-icon, .no-libraries .info-icon {
  font-size: 2rem;
}

.library-error .error-text, .no-libraries .info-text {
  flex: 1;
}

.library-error strong, .no-libraries strong {
  display: block;
  color: #e8eef9;
  margin-bottom: 4px;
}

.library-error p, .no-libraries p {
  color: #9ca3af;
  margin: 0;
  font-size: 0.9rem;
}

.loading-libraries {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 8px;
}

.loading-libraries .loading-spinner {
  width: 24px;
  height: 24px;
}

.refresh-button {
  background: #6b7280;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.refresh-button:hover {
  background: #4b5563;
  transform: translateY(-1px);
}

.clear-button {
  background: #d97706;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.clear-button:hover {
  background: #b45309;
  transform: translateY(-1px);
}

/* =============================================================================
   SERVER SELECTION STYLES
   ============================================================================= */

.server-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  margin-bottom: 12px;
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.server-item:last-child {
  margin-bottom: 0;
}

.server-item:hover {
  background: #374151;
  border-color: #4b5563;
}

.server-item.selected-server {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}

.server-item.unconfigured-server {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.05);
}

.server-info {
  flex: 1;
}

.server-main {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.server-name {
  color: #e8eef9;
  font-weight: 600;
  font-size: 1rem;
}

.server-protocol {
  color: #60a5fa;
  font-size: 0.8rem;
  background: rgba(96, 165, 250, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(96, 165, 250, 0.3);
}

.active-badge {
  color: #10b981;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(16, 185, 129, 0.3);
  margin-left: 8px;
}

.owned-badge {
  color: #3b82f6;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(59, 130, 246, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  margin-left: 8px;
}

.unconfigured-badge {
  color: #f59e0b;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(245, 158, 11, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(245, 158, 11, 0.3);
  margin-left: 8px;
}

.server-details {
  margin-top: 4px;
}

.server-url {
  color: #9ca3af;
  font-size: 0.9rem;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
}

.server-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.select-server-btn {
  background: #60a5fa;
  color: #111827;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.select-server-btn:hover {
  background: #3b82f6;
  transform: translateY(-1px);
}

.configure-server-btn {
  background: #f59e0b;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.configure-server-btn:hover {
  background: #d97706;
  transform: translateY(-1px);
}

.delete-server-btn {
  background: #ef4444;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.delete-server-btn:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

.current-filter.active-server {
  color: #10b981;
  font-weight: 600;
}

.add-button {
  background: #10b981;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.add-button:hover {
  background: #059669;
  transform: translateY(-1px);
}

.loading-servers, .server-error, .no-servers {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 8px;
  color: #9ca3af;
}

.server-error {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.server-error .error-icon {
  color: #ef4444;
  font-size: 1.2rem;
}

.server-error .error-text strong {
  color: #ef4444;
  display: block;
  margin-bottom: 4px;
}

.no-servers .info-icon {
  color: #60a5fa;
  font-size: 1.2rem;
}

.no-servers .info-text strong {
  color: #e8eef9;
  display: block;
  margin-bottom: 4px;
}

/* =============================================================================
   TV DISPLAY STYLES
   ============================================================================= */

/* TV Display Body */
.tv-display {
  background: #000;
  padding: 0;
  overflow: hidden;
}



/* Configuration Notice */
.config-notice {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.notice-content {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 16px;
  padding: 48px;
  text-align: center;
  max-width: 500px;
  margin: 20px;
}

.notice-content h2 {
  color: #60a5fa;
  margin-bottom: 24px;
  font-size: 1.8rem;
}

.notice-content p {
  color: #d1d5db;
  margin-bottom: 16px;
  font-size: 1.1rem;
  line-height: 1.6;
}

.config-link {
  color: #60a5fa;
  text-decoration: none;
  font-weight: 600;
}

.config-link:hover {
  text-decoration: underline;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.loading-content {
  text-align: center;
  color: #e8eef9;
}

.loading-spinner-large {
  width: 48px;
  height: 48px;
  border: 4px solid #374151;
  border-top: 4px solid #60a5fa;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .admin-container {
    padding: 20px 16px;
  }
  
  .admin-nav {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  
  .admin-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .config-actions {
    flex-direction: column;
  }
  
  .quick-actions {
    grid-template-columns: 1fr;
  }
  
  .notice-content {
    padding: 32px 24px;
    margin: 16px;
  }
}
