:root {
  --primary: #6200ea;
  --primary-light: #7c4dff;
  --primary-dark: #4a148c;
  --secondary: #03dac6;
  --error: #cf6679;
  --surface: #ffffff;
  --surface-hover: #f5f5f5;
  --on-surface: #121212;
  --on-primary: #ffffff;
  --shadow-light: 0 2px 5px rgba(0,0,0,0.08);
  --shadow-medium: 0 4px 10px rgba(0,0,0,0.12);
  --shadow-heavy: 0 8px 30px rgba(0,0,0,0.18);
  --radius-small: 6px;
  --radius-medium: 12px;
  --font-main: 'Inter', 'Fira Sans', system-ui, sans-serif;
  --transition-fast: 180ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-medium: 240ms cubic-bezier(0.4, 0, 0.2, 1);
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --letter-spacing-tight: -0.01em;
  --letter-spacing-wide: 0.05em;
  --content-spacing: 16px;
}

body {
  font-family: var(--font-main);
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  --custom-bg-color: var(--primary-dark);
  background-color: var(--custom-bg-color);
  background-image: linear-gradient(135deg, var(--custom-bg-color) 0%, var(--primary) 100%);
  background-attachment: fixed;
  position: relative;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  overflow: auto;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.3;
  z-index: -1;
}

body.custom-background::before {
  opacity: 0.2;
}

body.custom-background {
  background-image: none;
}

.queue-box {
  background-color: var(--surface);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-medium);
  margin: 10px;
  padding: 20px;
  width: auto;
  min-width: 280px;
  max-width: 600px;
  flex: 1 1 auto;
  flex-grow: 1;
  position: relative;
  transition: transform var(--transition-medium), box-shadow var(--transition-medium), opacity var(--transition-fast);
  border: 2px solid transparent;
  cursor: grab;
  box-sizing: border-box;
  min-height: 150px;
  align-self: flex-start;
  user-select: none;
}

.queue-box:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-heavy);
  border-color: transparent;
  background-color: var(--surface-hover);
}

.queue-box.dragging {
  cursor: grabbing;
  opacity: 0.5;
  transform: scale(0.95) rotate(-2deg);
  box-shadow: 0 8px 32px rgba(98,0,234,0.25), var(--shadow-heavy);
  z-index: 1000;
  transition: transform 0.2s cubic-bezier(0.4,0,0.2,1), box-shadow 0.2s, opacity 0.2s;
}

.queue-box.over {
  border: 2px dashed var(--primary);
  background-color: var(--surface-hover);
  transform: translateY(5px);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.queue-box.swap-target {
  border: 2.5px solid var(--secondary);
  box-shadow: 0 0 0 4px rgba(3,218,198,0.15), 0 8px 32px rgba(3,218,198,0.10);
  background-color: rgba(3,218,198,0.07);
  transition: border 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.queue-box.swap-flash {
  animation: swapFlash 0.3s;
}

@keyframes swapFlash {
  0% { box-shadow: 0 0 0 8px rgba(98,0,234,0.25); }
  100% { box-shadow: none; }
}

.queue-box-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  padding: 10px;
  gap: 10px;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  margin: 20px auto;
  min-height: 100vh;
}

.queue-header {
  font-size: 20px;
  color: var(--on-surface);
  text-align: center;
  margin-bottom: var(--content-spacing);
  font-weight: var(--font-weight-semibold);
  position: relative;
  padding-bottom: 12px;
  letter-spacing: var(--letter-spacing-tight);
}

.queue-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background-color: var(--primary);
  border-radius: 2px;
  opacity: 0.8;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: auto;
  text-align: center;
  grid-gap: 12px;
  padding: 15px;
  background-color: var(--surface);
  border-radius: var(--radius-small);
  box-sizing: border-box;
}

.stat {
  padding: 15px 10px;
  border-radius: var(--radius-small);
  background-color: rgba(0, 0, 0, 0.03);
  border: none;
  height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: transform var(--transition-fast), background-color var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.stat::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 40%;
  height: 3px;
  background-color: var(--primary-light);
  border-radius: 3px;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.stat:hover {
  background-color: rgba(0, 0, 0, 0.05);
  transform: translateY(-3px);
  box-shadow: var(--shadow-light);
}

.stat:hover::before {
  opacity: 1;
}

.stat-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--on-surface);
  margin-bottom: 5px;
}

.stat-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.6);
}

.dark-mode .stat-label {
  color: rgba(255, 255, 255, 0.7);
}

.stat-red {
  background: linear-gradient(135deg, #ff5252 0%, #ff1744 100%);
  color: white;
  animation: alert-pulse 2s ease infinite;
  border: none;
  position: relative;
  overflow: hidden;
}

.stat-red::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.2),
    rgba(255, 255, 255, 0.1)
  );
  z-index: 1;
  transform: translateX(-100%);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  100% { transform: translateX(100%); }
}

.stat-red .stat-value,
.stat-red .stat-label {
  color: white;
}

.error-message {
  color: red;
  text-align: center;
  padding: 10px;
}

.queue-box.error {
  border: 2px solid red;
}

.caller-info {
  animation: blink 1s linear infinite;
  margin-top: 1px;
  font-size: 0.9em;
  text-align: center;
  box-sizing: border-box;
}

.call-box,
.chat-box {
  background-color: var(--primary-light);
  padding: 6px;
  margin: 5px 0;
  border-radius: var(--radius-small);
  color: var(--on-primary);
  font-size: 0.9em;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all var(--transition-fast);
  border-left: 3px solid var(--primary);
}

.call-box:hover,
.chat-box:hover {
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.loader {
  border: 6px solid #f3f3f3;
  border-top: 6px solid #3498db;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: auto;
  display: none;
}

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

  100% {
    transform: rotate(360deg);
  }
}

#mode-toggle {
  background-color: var(--primary);
  color: var(--on-primary);
  border: none;
  border-radius: var(--radius-small);
  padding: 10px 16px;
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-light);
  position: relative;
  overflow: hidden;
}

#mode-toggle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

#mode-toggle:hover {
  background-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

#mode-toggle:active::after {
  animation: ripple 0.6s ease-out;
}

@keyframes ripple {
  0% { transform: scale(0, 0); opacity: 0.8; }
  100% { transform: scale(30, 30); opacity: 0; }
}

.close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  z-index: 10;
  opacity: 0;
  transform: scale(0.8);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  box-shadow: var(--shadow-light);
}

.queue-box:hover .close-button {
  opacity: 1;
  transform: scale(1);
}

.close-button:hover {
  background-color: var(--error);
  transform: scale(1.1);
}

.screenshot-button {
  position: absolute;
  top: 10px;
  right: 45px;
  background-color: #017a6b;
  color: white;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  z-index: 10;
  opacity: 0;
  transform: scale(0.8);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: var(--shadow-light);
}

.queue-box:hover .screenshot-button {
  opacity: 1;
  transform: scale(1);
}

.screenshot-button:hover {
  background-color: #015a4f;
  transform: scale(1.1);
}

.screenshot-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: scale(0.9);
}

/* Capturing state for queue box */
.queue-box.capturing {
  animation: screenshot-flash 0.4s ease-in-out;
  border: 2px solid var(--secondary);
  box-shadow: 0 0 20px rgba(3, 218, 198, 0.3);
}

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

/* Screenshot notifications */
.screenshot-notification {
  background-color: var(--surface);
  color: var(--on-surface);
  padding: 12px 16px;
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-heavy);
  font-size: 14px;
  font-weight: var(--font-weight-medium);
  opacity: 0;
  transform: translateY(10px);
  transition: all var(--transition-fast);
  border: 1px solid rgba(0, 0, 0, 0.1);
  pointer-events: none;
}

.screenshot-notification.show {
  opacity: 1;
  transform: translateY(0);
}

.screenshot-notification.success {
  background-color: #d4edda;
  color: #155724;
  border-color: #c3e6cb;
}

.screenshot-notification.error {
  background-color: #f8d7da;
  color: #721c24;
  border-color: #f5c6cb;
}

.dark-mode .screenshot-notification {
  background-color: #2a2d2e;
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .screenshot-notification.success {
  background-color: rgba(40, 167, 69, 0.2);
  color: #28a745;
  border-color: rgba(40, 167, 69, 0.3);
}

.dark-mode .screenshot-notification.error {
  background-color: rgba(220, 53, 69, 0.2);
  color: #dc3545;
  border-color: rgba(220, 53, 69, 0.3);
}

.add-queue-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  background-color: #4a148c;
  padding: 10px;
  border-radius: 5px;
  font-size: 1.6em;
}

#queue-dropdown {
  appearance: none;
  padding: 10px 14px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-small);
  background-color: var(--surface);
  color: var(--on-surface);
  font-size: 1em;
  box-shadow: var(--shadow-light);
  transition: all var(--transition-fast);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236200ea'%3E%3Cpath d='M7,10L12,15L17,10H7Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 20px;
  padding-right: 35px;
}

#queue-dropdown:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(98, 0, 234, 0.1);
}

#add-queue-button, 
#mode-toggle {
  background-color: var(--primary);
  color: var(--on-primary);
  border: none;
  border-radius: var(--radius-small);
  padding: 10px 16px;
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-light);
  position: relative;
  overflow: hidden;
}

#add-queue-button::after, 
#mode-toggle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

#add-queue-button:hover, 
#mode-toggle:hover {
  background-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

#add-queue-button:active::after,
#mode-toggle:active::after {
  animation: ripple 0.6s ease-out;
}

@keyframes ripple {
  0% { transform: scale(0, 0); opacity: 0.8; }
  100% { transform: scale(30, 30); opacity: 0; }
}

#notification-area {
  color: red;
  text-align: center;
  font-size: 20px;
  margin-bottom: 10px;
  padding: 5px;
  border-radius: 5px;
}

.user-details-container {
  padding: 2px;
  border-top: 1px solid #ccc;
}

.user-detail {
  padding: 5px;
  margin: 5px 0;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #000000;
  cursor: context-menu;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.call-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.call-stats-container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.call-icons {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 5px;
}

.incoming-calls-icon,
.outgoing-calls-icon {
  width: 20px;
  height: 20px;
  margin-left: 20px;
}

.call-icon {
  width: 100%;
  height: 100%;
}

#toggleCallStats {
  display: none;
}

#toggleUserDetails:checked ~ #toggleCallStats {
  display: block;
}

.queue-name {
  text-align: center;
}

#settings-icon-container {
  position: fixed;
  top: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  cursor: pointer;
  z-index: 1000;
  color: var(--on-surface);
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  padding: 12px;
  border-radius: 50px;
  box-shadow: var(--shadow-medium);
  transition: all var(--transition-medium);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

#settings-icon-container:hover {
  background-color: rgba(255, 255, 255, 1);
  transform: translateY(-2px);
  box-shadow: var(--shadow-heavy);
}

.dark-mode #settings-icon-container {
  background-color: rgba(20, 20, 30, 0.95);
  color: white;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-mode #settings-icon-container:hover {
  background-color: rgba(30, 30, 40, 1);
}

#settings-icon {
  width: 24px;
  height: 24px;
  margin-right: 8px;
}

#settings-label {
  font-size: 1.1em;
  font-weight: var(--font-weight-medium);
}

.settings-menu-hidden {
  display: none;
}

.settings-menu-visible {
  display: block;
}

#settings-menu {
  position: fixed;
  top: 80px;
  left: 20px;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  color: var(--on-surface);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-heavy);
  padding: 24px;
  z-index: 990;
  min-width: 280px;
  transform-origin: top left;
  animation: scaleIn 0.2s ease forwards;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

#settings-menu h3 {
  margin-top: 0;
  font-weight: var(--font-weight-medium);
  font-size: 1.2rem;
  color: var(--on-surface);
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding-bottom: 10px;
}

.settings-section {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.settings-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.settings-section h4 {
  font-size: 1rem;
  font-weight: var(--font-weight-semibold);
  color: var(--primary);
  margin-top: 0;
  margin-bottom: 16px;
}

.setting-item {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-radius: var(--radius-small);
  transition: background-color var(--transition-fast);
}


.setting-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 8px;
  margin: 0 -8px 16px -8px;
}


.setting-item label {
  margin-right: 16px;
  font-weight: var(--font-weight-medium);
  color: var(--on-surface);
  flex: 1;
}

.setting-item input[type="checkbox"] {
  appearance: none;
  width: 40px;
  height: 20px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  position: relative;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.setting-item input[type="checkbox"]::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  background-color: white;
  transition: transform var(--transition-fast);
}

.setting-item input[type="checkbox"]:checked {
  background-color: var(--secondary);
}

.setting-item input[type="checkbox"]:checked::before {
  transform: translateX(20px);
}

.setting-item input[type="color"] {
  -webkit-appearance: none;
  appearance: none;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  background: transparent;
}

.setting-item input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.setting-item input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 50%;
  box-shadow: 0 0 0 2px white;
}

.dark-mode #settings-menu {
  background-color: rgba(0, 0, 0, 0.85);
  border-color: rgba(255, 255, 255, 0.08);
  color: white;
}

.dark-mode #settings-menu h3 {
  color: white;
  border-bottom-color: rgba(255, 255, 255, 0.15);
}

.dark-mode .setting-item label {
  color: white;
}

#queue-settings {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

#queue-dropdown {
  flex: 1;
}

#add-queue-button {
  white-space: nowrap;
}

.skeleton-pulse {
  animation: pulse 1.5s infinite ease-in-out;
  background: #eee;
  border-radius: 4px;
  min-height: 1em;
}

.skeleton .stat-value {
  height: 24px;
  width: 90%;
  margin: 0 auto;
  text-align: center;
}

.skeleton .stat-label {
  height: 16px;
  width: 70%;
  margin: 8px auto 0;
  text-align: center;
}

@keyframes pulse {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

/* Empty state styling */
#empty-state-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 2rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  max-width: 500px;
  margin: 4rem auto;
  animation: fadeIn 0.6s ease-out;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark-mode #empty-state-message {
  background: rgba(30, 30, 40, 0.85);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.1);
}

#empty-state-message h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: #5f259f;
  font-weight: 600;
}

.dark-mode #empty-state-message h2 {
  color: #a685ff;
}

#empty-state-message p {
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 400px;
  color: #555;
}

.dark-mode #empty-state-message p {
  color: #bbb;
}

.empty-state-icon {
  margin-bottom: 1.5rem;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: linear-gradient(135deg, #7c3aed, #5f259f);
  border-radius: 50%;
  color: white;
}

.arrow-pointer {
  position: fixed;
  top: 15px;
  left: 160px;
  font-size: 2.5rem;
  animation: bounceLeft 1.5s infinite;
  filter: drop-shadow(0 0 8px rgba(95, 37, 159, 0.5));
  z-index: 1000;
  pointer-events: none;
}

/* Settings icon attention animation*/
.attention-needed {
  animation: pulseShadow 2s infinite;
}

@keyframes pulseShadow {
  0% { box-shadow: 0 0 5px rgba(95, 37, 159, 0.7); }
  50% { box-shadow: 0 0 20px rgba(95, 37, 159, 0.9); }
  100% { box-shadow: 0 0 5px rgba(95, 37, 159, 0.7); }
}

.dark-mode .attention-needed {
  animation: pulseShadowDark 2s infinite;
}

@keyframes pulseShadowDark {
  0% { box-shadow: 0 0 5px rgba(166, 133, 255, 0.7); }
  50% { box-shadow: 0 0 20px rgba(166, 133, 255, 0.9); }
  100% { box-shadow: 0 0 5px rgba(166, 133, 255, 0.7); }
}

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

@keyframes bounceLeft {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-15px); }
}

/* Pulsing highlight for queue settings when no queues exist */
.highlight-queue-settings {
  position: relative;
  animation: pulseOutline 2s infinite;
  border-radius: 8px;
  z-index: 1;
}

.highlight-queue-settings::after {
  content: '';
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  border-radius: 12px;
  background: transparent;
  z-index: -1;
  box-shadow: 0 0 15px rgba(95, 37, 159, 0.7);
  animation: pulseGlow 2s infinite;
}

.dark-mode .highlight-queue-settings::after {
  box-shadow: 0 0 15px rgba(166, 133, 255, 0.7);
}

@keyframes pulseOutline {
  0% { outline: 1px solid rgba(95, 37, 159, 0.3); }
  50% { outline: 2px solid rgba(95, 37, 159, 0.7); }
  100% { outline: 1px solid rgba(95, 37, 159, 0.3); }
}

@keyframes pulseGlow {
  0% { opacity: 0.3; }
  50% { opacity: 0.8; }
  100% { opacity: 0.3; }
}

/* Dark mode styles */
.dark-mode {
  color: #ffffff;
}

.dark-mode .queue-box {
  background-color: #181a1b;
  border-color: #303436;
  box-shadow: 0 8px 8px rgba(0, 0, 0, 0.1);
}

.dark-mode .queue-box:hover {
  border-color: #303436;
}

.dark-mode .queue-header {
  color: #ffffff;
}

.dark-mode .stats {
  background-color: #1b1e1f;
  border-color: #303436;
}

.dark-mode .stat {
  background-color: #212425;
  border-color: #303436;
}

.dark-mode .stat-value {
  color: #ffffff;
}

.dark-mode .stat-label {
  color: #ffffff;
}

.dark-mode .stat:hover {
  background-color: #282b2e;
  border-color: #303436;
}

.dark-mode .stat-red {
  background-color: #dc3545;
}

.dark-mode .caller-info {
  border-color: #303436;
}

.dark-mode .user-detail {
  color: #fff;
}

.dark-mode .call-box {
  color: #fff;
}

@media (max-width: 900px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 400px) {
  .stats {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 900px) {
  .queue-box {
    flex-basis: calc(50% - 10px);
  }
}

@media (min-width: 601px) {
  .queue-box-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
  }
}

@keyframes alert-pulse {
  0% { opacity: 0.9; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.02); }
  100% { opacity: 0.9; transform: scale(1); }
}

@keyframes skeletonGradient {
  0% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.skeleton .queue-header {
  height: 28px;
  width: 70%;
  margin: 0 auto 20px;
  border-radius: var(--radius-small);
}

.skeleton .stat-value {
  height: 30px;
  width: 70%;
  margin: 0 auto 8px;
  border-radius: 4px;
}

.skeleton .stat-label {
  height: 14px;
  width: 90%;
  margin: 5px auto 0;
  border-radius: 4px;
}

.skeleton-pulse {
  background: linear-gradient(
    90deg,
    #eeeeee 0%,
    #dddddd 50%,
    #eeeeee 100%
  );
  background-size: 200% 100%;
  animation: skeletonGradient 1.5s ease-in-out infinite;
}

.dark-mode .skeleton-pulse {
  background: linear-gradient(
    90deg,
    #333333 0%,
    #444444 50%,
    #333333 100%
  );
  background-size: 200% 100%;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Status color picker menu */
.status-color-menu {
  position: fixed;
  background-color: #fff;
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-heavy);
  padding: 16px;
  z-index: 1100;
  width: 250px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid rgba(0,0,0,0.1);
}

.dark-mode .status-color-menu {
  background-color: #212425;
  color: #fff;
  border-color: rgba(255,255,255,0.1);
}

.status-color-header {
  font-weight: var(--font-weight-semibold);
  font-size: 14px;
  margin-bottom: 8px;
  text-align: center;
}

#status-color-picker {
  width: 100%;
  height: 50px;
  border: none;
  border-radius: var(--radius-small);
  cursor: pointer;
  margin-bottom: 8px;
}

.status-color-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

.status-color-actions button {
  flex: 1;
  padding: 8px 0;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-small);
  cursor: pointer;
  font-size: 12px;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.status-color-actions button:hover {
  background-color: var(--primary-light);
  transform: translateY(-1px);
}

#status-color-reset {
  background-color: #6c757d;
}

#status-color-reset:hover {
  background-color: #5a6268;
}

#status-color-close {
  background-color: var(--primary);
}

#status-color-close:hover {
  background-color: var(--primary-light);
}

/* Add cursor style to user details to indicate right-click functionality */
.user-detail {
  cursor: context-menu;
  position: relative;
}


/* Conditionally show off hours setting based on user details toggle */
.off-hours-setting {
  display: none;
  opacity: 0;
  height: 0;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  transition: opacity 0.3s ease, height 0.3s ease;
}

.off-hours-setting.visible {
  display: flex;
  opacity: 1;
  height: auto;
  margin-bottom: 16px !important;
  padding: 8px 0 !important;
  overflow: visible;
}

/* Draggable Clock Styles */
.draggable-clock {
  position: fixed;
  z-index: 999;
  background-color: var(--surface);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-medium);
  border: 2px solid transparent;
  cursor: grab;
  user-select: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
  min-width: 180px;
  max-width: 400px;
  min-height: 120px;
  transform-origin: center center;
}

.draggable-clock:hover {
  box-shadow: var(--shadow-heavy);
  transform: translateY(-2px);
  background-color: var(--surface-hover);
}

.draggable-clock:active,
.draggable-clock.dragging {
  cursor: grabbing;
  transform: scale(1.05);
  box-shadow: 0 15px 50px rgba(98, 0, 234, 0.2);
  z-index: 1001;
}

.clock-face {
  padding: 20px;
  text-align: center;
}

.clock-time {
  font-size: 2rem;
  font-weight: var(--font-weight-bold);
  color: var(--primary);
  font-family: var(--font-main);
  margin-bottom: 8px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  letter-spacing: var(--letter-spacing-tight);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

.clock-date {
  font-size: 0.9rem;
  color: var(--on-surface);
  font-weight: var(--font-weight-medium);
  opacity: 0.8;
}

/* Dark mode clock styles */
.dark-mode .draggable-clock {
  background-color: #181a1b;
  border-color: #303436;
  box-shadow: 0 8px 8px rgba(0, 0, 0, 0.1);
}

.dark-mode .draggable-clock:hover {
  background-color: #282b2e;
  border-color: #303436;
}

.dark-mode .clock-time {
  color: var(--primary-light);
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.1);
}

.dark-mode .clock-date {
  color: rgba(255, 255, 255, 0.8);
}

.dark-mode .draggable-clock:active,
.dark-mode .draggable-clock.dragging {
  box-shadow: 0 15px 50px rgba(124, 77, 255, 0.25);
}

/* Clock tip visibility */
.clock-tip {
  display: none;
}

.clock-tip.visible {
  display: flex;
}

/* Resize handles for clock */
.resize-handle {
  position: absolute;
  background: var(--primary);
  opacity: 0;
  transition: opacity var(--transition-fast);
  z-index: 1002;
}

.draggable-clock:hover .resize-handle {
  opacity: 0.7;
}

.resize-handle:hover {
  opacity: 1 !important;
  background: var(--primary-light);
}

.resize-handle-nw {
  top: -5px;
  left: -5px;
  width: 12px;
  height: 12px;
  cursor: nw-resize;
  border-radius: 50% 0 50% 0;
}

.resize-handle-ne {
  top: -5px;
  right: -5px;
  width: 12px;
  height: 12px;
  cursor: ne-resize;
  border-radius: 0 50% 0 50%;
}

.resize-handle-sw {
  bottom: -5px;
  left: -5px;
  width: 12px;
  height: 12px;
  cursor: sw-resize;
  border-radius: 0 50% 0 50%;
}

.resize-handle-se {
  bottom: -5px;
  right: -5px;
  width: 12px;
  height: 12px;
  cursor: se-resize;
  border-radius: 50% 0 50% 0;
}

.draggable-clock.resizing {
  transition: none;
}

.draggable-clock.resizing .resize-handle {
  opacity: 1;
  background: var(--secondary);
}

/* Dark mode resize handles */
.dark-mode .resize-handle {
  background: var(--primary-light);
}

.dark-mode .resize-handle:hover {
  background: var(--secondary);
}

.dark-mode .draggable-clock.resizing .resize-handle {
  background: var(--secondary);
}

/* Clock context menu styles */
.clock-context-menu {
  position: fixed;
  background-color: var(--surface);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-heavy);
  padding: 20px;
  z-index: 1100;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 1px solid rgba(0,0,0,0.1);
  font-family: var(--font-main);
}

.dark-mode .clock-context-menu {
  background-color: #212425;
  color: #fff;
  border-color: rgba(255,255,255,0.1);
}

.clock-context-header {
  font-weight: var(--font-weight-semibold);
  font-size: 16px;
  text-align: center;
  color: var(--primary);
  border-bottom: 1px solid rgba(0,0,0,0.1);
  padding-bottom: 12px;
}

.dark-mode .clock-context-header {
  color: var(--primary-light);
  border-bottom-color: rgba(255,255,255,0.1);
}

.clock-setting-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.clock-setting-group label {
  font-weight: var(--font-weight-medium);
  font-size: 14px;
  color: var(--on-surface);
  display: flex;
  align-items: center;
  gap: 8px;
}

.dark-mode .clock-setting-group label {
  color: rgba(255,255,255,0.9);
}

.clock-setting-group input[type="color"] {
  width: 60px;
  height: 40px;
  border: none;
  border-radius: var(--radius-small);
  cursor: pointer;
  background: transparent;
}

.clock-setting-group input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.clock-setting-group input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: var(--radius-small);
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px rgba(0,0,0,0.1);
}

.clock-setting-group input[type="checkbox"] {
  appearance: none;
  width: 18px;
  height: 18px;
  background-color: rgba(0,0,0,0.1);
  border-radius: 4px;
  position: relative;
  cursor: pointer;
  transition: background-color var(--transition-fast);
  flex-shrink: 0;
}

.clock-setting-group input[type="checkbox"]::before {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background-color: white;
  transition: transform var(--transition-fast);
}

.clock-setting-group input[type="checkbox"]:checked {
  background-color: var(--primary);
}

.clock-setting-group input[type="checkbox"]:checked::before {
  transform: translate(-50%, -50%) scale(1);
}

.clock-setting-group select {
  padding: 8px 12px;
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: var(--radius-small);
  background-color: var(--surface);
  color: var(--on-surface);
  font-family: var(--font-main);
  font-size: 14px;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.clock-setting-group select:focus {
  outline: none;
  border-color: var(--primary);
}

.dark-mode .clock-setting-group select {
  background-color: #2a2d2e;
  border-color: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.9);
}

.clock-context-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid rgba(0,0,0,0.1);
}

.dark-mode .clock-context-actions {
  border-top-color: rgba(255,255,255,0.1);
}

.clock-context-actions button {
  flex: 1;
  padding: 10px 16px;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-small);
  cursor: pointer;
  font-size: 14px;
  font-family: var(--font-main);
  font-weight: var(--font-weight-medium);
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.clock-context-actions button:hover {
  background-color: var(--primary-light);
  transform: translateY(-1px);
}

.clock-context-actions button:first-child {
  background-color: #6c757d;
}

.clock-context-actions button:first-child:hover {
  background-color: #5a6268;
}

/* Tip styling */
.settings-tip {
  margin-top: 16px;
  background-color: rgba(98, 0, 234, 0.08);
  border-radius: var(--radius-small);
  padding: 6px;
  display: flex;
  align-items: flex-start;
  gap: 5px;
  position: relative;
}

.tip-icon {
  font-size: 12px;
  line-height: 1;
  display: block;
}

.settings-tip p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--on-surface);
}

.dark-mode .settings-section {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .settings-tip {
  background-color: rgba(124, 77, 255, 0.15);
}

.dark-mode .settings-tip p {
  color: rgba(255, 255, 255, 0.9);
}

/* Attribution styling */
.settings-attribution {
  font-size: 9px;
  text-align: center;
  color: rgba(0, 0, 0, 0.35);
  margin-top: 20px;
  padding-top: 10px;
  letter-spacing: 0.7px;
  font-weight: 500;
  text-transform: uppercase;
  border-top: 1px dashed rgba(0, 0, 0, 0.07);
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.settings-attribution:hover {
  opacity: 1;
}

.dark-mode .settings-attribution {
  color: rgba(255, 255, 255, 0.35);
  border-top-color: rgba(255, 255, 255, 0.07);
}
