/* Existing CSS */
.team-potential p {
  max-width: 908px;
  margin: var(--ls-paragraph-offset);
}

/* Heading tooltip icon */
.team-potential-heading-tooltip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.team-potential-heading-tooltip .tooltip-icon {
    margin-left: 0;
    margin-right: 6px;
}

/* SAFECIRCLES Logo tooltip icon - special styling for text instead of question mark */
#arks-logo-tooltip-icon {
    width: auto;
    min-width: 140px;
    height: 24px;
    padding: 0 10px;
    font-size: 11px;
    white-space: nowrap;
    font-weight: normal;
}

/* Google Slides container spacing */
.google-slides-container-wrapper {
    margin-bottom: 40px;
}

/* Progress Bar Styling */
.progress__bar-fill {
    width: 85%;
    border-radius: 10px;
    background-color: #E29635;
    color: white;
    text-align: center;
    padding: 5px 0;
    font-weight: bold;
    transition: width 0.3s ease;
}

/* Rotate hint for mobile devices */
.rotate-hint {
    display: none;
}

.rotate-hint::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.rotate-hint-icon {
    display: inline-block;
    font-size: 24px;
    animation: rotateDevice 2s ease-in-out infinite;
    transform-origin: center;
}

@keyframes rotateDevice {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(90deg);
    }
    50% {
        transform: rotate(90deg);
    }
    75% {
        transform: rotate(0deg);
    }
}

/* Mobile view only - show rotate hint */
@media screen and (max-width: 1200px) {
    .header-main__progress .progress .rotate-hint,
    .progress .rotate-hint,
    .rotate-hint {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        background: linear-gradient(135deg, #E29635 0%, #c7852a 100%) !important;
        color: #FFFFFF !important;
        border-radius: 12px;
        padding: 12px 16px;
        margin-bottom: 10px;
        text-align: center;
        font-size: var(--ls-font-small);
        font-weight: 600;
        box-shadow: 0 4px 12px rgba(226, 150, 53, 0.3);
        align-items: center;
        justify-content: center;
        gap: 12px;
        position: relative;
        overflow: hidden;
        width: 100%;
    }
    
    /* Reduce Safecircle analysis size for better readability on tablets and smaller screens */
    .team-potential canvas {
        width: 60% !important;
    }
    
    #team-potential-canvas {
        max-width: 60% !important;
        width: 60% !important;
        height: auto !important;
    }
    
    /* Canvas container - center and reduce size */
    .center div[style*="position: relative"][style*="display: inline-block"][style*="background-color: #f0f0f0"] {
        width: 60% !important;
        max-width: 60% !important;
        margin: 0 auto !important;
        display: block !important;
        text-align: center;
    }
    
    .center {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }
}

/* Print Button Styling - uses standard .button class from app.css */
/* Additional spacing for print button in header */
.header-main__progress .button {
    margin-left: 10px;
}

/* Visual Feedback: Loading States */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Visual Feedback: Hover Effects */
.tolerance-slider:hover {
    opacity: 0.9;
}

.tolerance-slider:focus {
    outline: 2px solid #52CEEC;
    outline-offset: 2px;
}

#tolerance-window-input:hover {
    border-color: #7dd4a8;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

#tolerance-window-input:focus {
    outline: 2px solid #52CEEC;
    outline-offset: 2px;
    border-color: #52CEEC;
}

/* Visual Feedback: Button Transitions */
button {
    transition: all 0.3s ease;
}

button:hover {
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

/* Visual Feedback: Canvas Transitions */
#team-potential-canvas {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#team-potential-canvas:hover {
    transform: scale(1.01);
}

/* Visual Feedback: Player Detail Modal */
.player-detail-modal {
    /* Animation removed - card appears directly */
}

.player-detail-content {
    /* Animation removed - card appears directly */
}

/* Visual Feedback: Progress Bar Animation */
.progress__bar-fill {
    animation: progressPulse 2s ease-in-out infinite;
}

@keyframes progressPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* PRIO 1 Tooltip Icon - Visual Feedback (only for heading icon, not box-end icon) */
.prio1-tooltip-icon {
    transition: all 0.3s ease;
    cursor: pointer;
    width: 48px !important;
    height: 48px !important;
    font-size: 32px !important;
}

.prio1-tooltip-icon:hover {
    background-color: #c7852a !important;
    transform: scale(1.15);
    box-shadow: 0 4px 8px rgba(199, 133, 42, 0.4);
}

.prio1-tooltip-container {
    position: relative;
}

/* PRIO 2 Tooltip Icon - Visual Feedback (only for heading icon, not box-end icon) */
.prio2-tooltip-icon {
    transition: all 0.3s ease;
    cursor: pointer;
    width: 48px !important;
    height: 48px !important;
    font-size: 32px !important;
}

.prio2-tooltip-icon:hover {
    background-color: #c7852a !important;
    transform: scale(1.15);
    box-shadow: 0 4px 8px rgba(199, 133, 42, 0.4);
}

.prio2-tooltip-container {
    position: relative;
}

/* PRIO 3 Tooltip Icon - Visual Feedback (only for heading icon, not box-end icon) */
.prio3-tooltip-icon {
    transition: all 0.3s ease;
    cursor: pointer;
    width: 48px !important;
    height: 48px !important;
    font-size: 32px !important;
}

.prio3-tooltip-icon:hover {
    background-color: #c7852a !important;
    transform: scale(1.15);
    box-shadow: 0 4px 8px rgba(199, 133, 42, 0.4);
}

.prio3-tooltip-container {
    position: relative;
}

/* PRIO 4 Tooltip Icon - Visual Feedback (only for heading icon) */
.prio4-tooltip-icon {
    transition: all 0.3s ease;
    cursor: pointer;
    width: 48px !important;
    height: 48px !important;
    font-size: 32px !important;
}

.prio4-tooltip-icon:hover {
    background-color: #c7852a !important;
    transform: scale(1.15);
    box-shadow: 0 4px 8px rgba(199, 133, 42, 0.4);
}

.prio4-tooltip-container {
    position: relative;
}

/* PRIO 1, 2, and 3 Tooltip Icons at box-end - original size (24px) */
#prio1-wie-weiter-tooltip-icon .tooltip-icon,
#prio2-integrator-tooltip-icon .tooltip-icon,
#prio3-integrator-tooltip-icon .tooltip-icon {
    width: 24px !important;
    height: 24px !important;
    font-size: 16px !important;
}

@media screen and (min-width: 769px) {
  .team-potential p {
    float: left;
  }
}

@media screen and (min-width: 769px) {
  .team-potential .custom-graph-info {
    float: right;
  }
}

@media screen and (max-width: 768px) {
  .team-potential .custom-graph-info {
    justify-content: center;
  }

  .team-potential canvas {
    width: 60%;
  }
}

.team-potential .custom-graph {
  clear: both;
}

@media (max-height: 763px) and (min-width: 1200px) {
  .team-potential .custom-graph-info {
    margin-top: -40px;
  }
  .team-potential .custom-graph {
    padding-top: 20px;
    padding-bottom: 108px;
  }
  .team-potential .custom-graph__status {
    top: 20px;
    height: calc(100% - 128px);
  }
}

/* New CSS for scaling down */
@media screen and (max-width: 768px) {
  .center {
    width: 100% !important;
    margin: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }
  .center p {
    float: none !important;
    display: block !important;
    text-align: center !important;
    width: 100% !important;
  }
  .center input {
    width: 99% !important;
    height: 99% !important;
  }
  .center canvas {
    width: 60% !important;
    height: auto !important;
    max-width: 60% !important;
  }
  .screen.auth p {
    font-size: 18px;
    line-height: 1.3;
    text-align: left;
  }
  .screen.auth button {
    font-size: 14px; /* Set the font size to 14px */
    padding: 5px 10px; /* Reduce padding to decrease button size */
    line-height: 1; /* Decrease line height for tighter spacing */
  }
  .screen.auth h1 {
    font-size: 28px;
  }
  .header-main * {
    font-size: 18px; /* Set the font size to 18px for all elements within the header */
  }
}

/* Tolerance Window Input Styling */
.tolerance-window-input-container {
  position: relative;
}

.tolerance-slider {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}

.tolerance-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #9FE2BF;
  border: 2px solid #FFFFFF;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: all 0.2s ease;
  position: relative;
  z-index: 2;
  margin-top: -18px; /* Center the thumb vertically: (60px - 50px) / 2 = 5px, but we need to account for the track */
}

.tolerance-slider::-webkit-slider-thumb:hover {
  background: #75CBE8;
  transform: scale(1.1);
  box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

.tolerance-slider::-moz-range-thumb {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #9FE2BF;
  border: 2px solid #FFFFFF;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: all 0.2s ease;
  position: relative;
  z-index: 2;
}

.tolerance-slider::-moz-range-thumb:hover {
  background: #75CBE8;
  transform: scale(1.1);
  box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

.tolerance-slider::-webkit-slider-runnable-track {
  height: 50px;
  background: transparent;
  border-radius: 5px;
}

.tolerance-slider::-moz-range-track {
  height: 50px;
  background: transparent;
  border-radius: 5px;
}

/* Mobile responsiveness for tolerance window input */
@media screen and (max-width: 768px) {
  .tolerance-window-input-container {
    padding: 15px !important;
  }
  
  .tolerance-window-input-container > div:first-child {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
  }
  
  .tolerance-window-input-container label {
    font-size: 16px !important;
  }
  
  #tolerance-window-input {
    width: 80px !important;
    height: 45px !important;
    font-size: 18px !important;
  }
  
  .safe-circles-overview {
    padding: 15px !important;
  }
  
  .safe-circles-overview > div {
    grid-template-columns: 1fr !important;
  }
}

/* Safe Circles Overview Styling */
.safe-circles-overview {
  transition: all 0.3s ease;
}

.circle-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-radius: 25px !important;
  overflow: hidden;
}

.circle-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
}

/* Smooth Animation for Canvas */
#team-potential-canvas {
  transition: opacity 0.3s ease;
}

/* Player Detail Modal */
.player-detail-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  /* Animation removed - modal appears directly */
}

.player-detail-content {
  background-color: #FFFFFF;
  border-radius: 15px;
  max-width: 600px;
  max-height: 80vh;
  width: 90%;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  position: relative;
  /* Animation removed - card appears directly */
}

.player-detail-header {
  background-color: #9FE2BF;
  color: #626262;
  padding: 20px;
  border-radius: 15px 15px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1;
}

.player-detail-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: bold;
}

.safe-circles-sticky {
  position: fixed;
  top: 120px;
  right: 24px;
  z-index: 1000;
  background: linear-gradient(135deg, #9FE2BF 0%, #7FD4A8 100%);
  color: #161449;
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 180px;
}

@media print {
  .safe-circles-sticky,
  .safecircles-info--sticky {
    display: none !important;
  }
}
.safe-circles-sticky__row {
  display: flex;
  gap: 16px;
  align-items: center;
}
.safe-circles-sticky__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.safe-circles-sticky__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
}
.safe-circles-sticky__value {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.safecircles-info {
  display: inline-block;
  margin-left: 10px;
  vertical-align: middle;
}
.safecircles-info--sticky {
  margin-left: 0;
  margin-top: 6px;
}
.safecircles-info--sticky summary {
  background: #ffffff;
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  padding: 6px 10px;
  display: inline-block;
}
.safecircles-info summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: #52CEEC;
  list-style: none;
}
.safecircles-info summary::-webkit-details-marker {
  display: none;
}
.safecircles-info[open] summary {
  color: #3bb5d4;
}
.safecircles-info__content {
  margin-top: 8px;
  padding: 10px 12px;
  background: #f5f5f5;
  border: 1px solid #e2e2e2;
  border-radius: 10px;
  font-size: 14px;
  color: #626262;
  max-width: 520px;
}

/* Peak highlight styles */
.safe-circles-sticky__item--peak {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  border-radius: 8px;
  padding: 4px 8px;
  animation: peak-pulse 1.5s ease-in-out infinite;
}
@keyframes peak-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4); }
  50% { box-shadow: 0 0 12px 4px rgba(255, 215, 0, 0.6); }
}
.safe-circles-sticky__peak-info {
  font-size: 10px;
  font-weight: 700;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}
.peak-star {
  color: #FFD700;
  text-shadow: 0 0 4px rgba(255, 215, 0, 0.8);
  margin-right: 4px;
}

/* Peak navigation buttons */
.safe-circles-sticky__peaks {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.peak-jump-btn {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.peak-jump-btn--circles {
  background: #9FE2BF;
  color: #333;
  border-color: #7FD4A8;
}
.peak-jump-btn--circles:hover {
  background: #7FD4A8;
  transform: scale(1.05);
}
.peak-jump-btn--connections {
  background: #E29635;
  color: #fff;
  border-color: #C87D20;
}
.peak-jump-btn--connections:hover {
  background: #C87D20;
  transform: scale(1.05);
}
.peak-jump-btn--active {
  border-color: #FFD700;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

/* Slider peak markers */
.slider-peak-marker {
  position: absolute;
  top: -20px;
  font-size: 16px;
  cursor: pointer;
  z-index: 10;
  transition: transform 0.2s ease;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.slider-peak-marker:hover {
  transform: translateX(-50%) scale(1.3);
}
.slider-peak-marker--circles {
  color: #9FE2BF;
}
.slider-peak-marker--connections {
  color: #E29635;
  top: auto;
  bottom: -20px;
}

@media screen and (max-width: 900px) {
  .safe-circles-sticky__peaks {
    flex-direction: column;
    gap: 4px;
  }
  .peak-jump-btn {
    font-size: 10px;
    padding: 3px 8px;
  }
  .slider-peak-marker {
    font-size: 14px;
    top: -16px;
  }
  .slider-peak-marker--connections {
    bottom: -16px;
    top: auto;
  }
  .safe-circles-sticky {
    top: auto;
    bottom: 20px;
    right: 16px;
    min-width: 140px;
    padding: 10px 12px;
  }
  .safe-circles-sticky__label {
    font-size: 12px;
  }
  .safe-circles-sticky__value {
    font-size: 24px;
  }
}

.player-detail-close {
  background: none;
  border: none;
  font-size: 36px;
  color: #626262;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.player-detail-close:hover {
  background-color: rgba(0, 0, 0, 0.1);
  transform: rotate(90deg);
}

.player-detail-body {
  padding: 20px;
}

.player-detail-avatar-section {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 2px solid #f0f0f0;
}

.player-detail-avatar-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 15px;
}

.player-detail-avatar-wrapper.boss::before {
  content: '';
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  border-radius: 50%;
  border: 4px solid #52CEEC;
  pointer-events: none;
  z-index: 1;
}

.player-detail-avatar-wrapper.boss::after {
  content: '';
  position: absolute;
  top: -16px;
  left: -16px;
  right: -16px;
  bottom: -16px;
  border-radius: 50%;
  border: 3px solid #52CEEC;
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
}

.player-detail-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #9FE2BF;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  position: relative;
  z-index: 2;
}

.player-detail-role {
  display: inline-block;
  padding: 8px 16px;
  background-color: #52CEEC;
  color: #FFFFFF;
  border-radius: 20px;
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 10px;
}

.player-detail-role.integrator {
  background-color: #9FE2BF;
}

.player-detail-boss-label {
  display: inline-block;
  padding: 6px 14px;
  background-color: #52CEEC;
  color: #FFFFFF;
  border-radius: 20px;
  font-weight: bold;
  font-size: 14px;
  margin-bottom: 10px;
  margin-top: 5px;
}
  color: #626262;
}

.player-detail-anchor {
  color: #626262;
  font-size: 14px;
  margin-top: 10px;
}

.player-detail-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 2px solid #f0f0f0;
}

.player-detail-stat {
  text-align: center;
  padding: 15px;
  background-color: #f5f5f5;
  border-radius: 10px;
}

.stat-label {
  display: block;
  font-size: 12px;
  color: #999;
  margin-bottom: 5px;
}

.stat-value {
  display: block;
  font-size: 24px;
  font-weight: bold;
  color: #626262;
}

.player-detail-section {
  margin-bottom: 20px;
}

.player-detail-section h3 {
  color: #626262;
  font-size: 18px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e0e0e0;
}

.player-detail-section-title-circles {
  color: #9FE2BF !important;
  font-weight: bold;
}

.player-detail-circle,
.player-detail-in-group {
  padding: 10px;
  margin-bottom: 8px;
  background-color: #f9f9f9;
  border-radius: 8px;
  border-left: 4px solid #9FE2BF;
}

.player-detail-circle-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  flex-wrap: wrap;
}

.player-detail-circle-tolerance {
  margin-left: auto;
  background-color: #E29635;
  color: #626262;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: bold;
  white-space: nowrap;
}

.player-detail-circle-color-indicator {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-block;
  border: 2px solid rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

/* Question mark overlay for player avatars */
#player-question-mark {
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(-50%) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
}

.player-detail-circle-members {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.player-detail-circle-member {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background-color: #f0f0f0;
  border-radius: 20px;
  font-size: 14px;
  color: #626262;
  transition: all 0.2s ease;
}

.player-detail-circle-member.integrator {
  background-color: #f0f0f0;
  border: 2px solid #9FE2BF;
  box-shadow: 0 0 0 2px rgba(159, 226, 191, 0.3);
  font-weight: 500;
}

.player-detail-circle-member.current-player {
  background-color: #e8f5e9;
  border: 2px solid #9FE2BF;
  font-weight: 600;
}

.player-detail-circle-member.integrator.current-player {
  background-color: #e8f5e9;
  border: 2px solid #9FE2BF;
  box-shadow: 0 0 0 2px rgba(159, 226, 191, 0.3);
}

.player-detail-circle-member-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #FFFFFF;
  flex-shrink: 0;
}

.player-detail-circle-member.integrator .player-detail-circle-member-avatar {
  border: 2px solid #9FE2BF;
}

.player-detail-circle-member-avatar-placeholder {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.player-detail-circle-member-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.player-detail-circle-member-name {
  white-space: nowrap;
  font-weight: 500;
}

.player-detail-circle-member-anchor {
  font-size: 11px;
  color: #999;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.player-detail-circle-member-badge {
  background-color: #9FE2BF;
  color: #626262;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  white-space: nowrap;
}

.player-detail-in-group {
  border-left-color: #FFD700;
  background-color: #fffef0;
  color: #8b6914;
  padding: 10px;
  margin-bottom: 8px;
  border-radius: 8px;
}

.player-detail-in-group-header {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(139, 105, 20, 0.2);
}

.player-detail-in-group-similarity {
  font-weight: bold;
  color: #8b6914;
  font-size: 14px;
}

.player-detail-in-group-tolerance {
  background-color: #E29635;
  color: #626262;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: bold;
  white-space: nowrap;
}

/* Mobile Responsiveness for Modal */
@media screen and (max-width: 768px) {
  .player-detail-content {
    width: 95%;
    max-height: 85vh;
    margin: 10px auto;
  }
  
  .player-detail-header {
    padding: 12px 15px;
  }
  
  .player-detail-header h2 {
    font-size: 18px;
  }
  
  .player-detail-close {
    font-size: 28px;
    width: 28px;
    height: 28px;
  }
  
  .player-detail-body {
    padding: 12px 15px;
  }
  
  .player-detail-avatar {
    width: 80px;
    height: 80px;
  }
  
  .player-detail-role {
    font-size: 14px;
    padding: 6px 12px;
  }
  
  .player-detail-anchor {
    font-size: 12px;
  }
  
  .player-detail-stats {
    grid-template-columns: 1fr;
    gap: 10px;
    padding-bottom: 15px;
    margin-bottom: 15px;
  }
  
  .player-detail-stat {
    padding: 12px;
  }
  
  .stat-label {
    font-size: 11px;
  }
  
  .stat-value {
    font-size: 20px;
  }
  
  .player-detail-section {
    margin-bottom: 15px;
  }
  
  .player-detail-section h3 {
    font-size: 16px;
    margin-bottom: 8px;
    padding-bottom: 8px;
  }
  
  .player-detail-circle,
  .player-detail-in-group {
    padding: 8px;
    margin-bottom: 6px;
  }
  
  .player-detail-circle-tolerance,
  .player-detail-in-group-tolerance {
    font-size: 12px;
    padding: 3px 10px;
  }
  
  .player-detail-circle-member {
    font-size: 12px;
    padding: 5px 10px;
  }
  
  .player-detail-circle-member-avatar,
  .player-detail-circle-member-avatar-placeholder {
    width: 20px;
    height: 20px;
  }
  
  .player-detail-circle-member-anchor {
    font-size: 10px;
  }
  
  .player-detail-circle-member-badge {
    font-size: 10px;
    padding: 2px 6px;
  }
  
  /* Mobile: Progress Bar */
  .progress__bar-fill {
    font-size: 12px;
    padding: 3px 0;
  }
  
  /* Mobile: Print Button - uses standard .button class from app.css */
  .header-main__progress .button {
    margin-left: 5px;
  }
  
  /* Mobile: Tolerance Window Input */
  .tolerance-window-input-container {
    padding: 15px !important;
  }
  
  #tolerance-window-input {
    width: 80px !important;
    height: 40px !important;
    font-size: 16px !important;
  }
  
  /* Mobile: Canvas - reduced size for better readability and navigation */
  #team-potential-canvas {
    max-width: 60% !important;
    width: 60% !important;
    height: auto !important;
  }
  
  /* Mobile: Canvas container - center and reduce size */
  .center div[style*="position: relative"][style*="display: inline-block"][style*="background-color: #f0f0f0"] {
    width: 60% !important;
    max-width: 60% !important;
    margin: 0 auto !important;
    display: block !important;
    text-align: center;
  }
  
  /* Mobile: Buttons */
  #min-value-button,
  #max-value-button {
    font-size: 28px !important;
  }
  
  /* Mobile: PRIO Buttons */
  .team-potential button {
    font-size: 14px;
    padding: 8px 12px;
  }
}

/* Mobile portrait mode - extra small screens */
@media screen and (max-width: 768px) and (orientation: portrait) {
  .player-detail-content {
    max-height: 80vh;
    margin: 5px auto;
  }
  
  .player-detail-header {
    padding: 10px 12px;
  }
  
  .player-detail-header h2 {
    font-size: 16px;
  }
  
  .player-detail-body {
    padding: 10px 12px;
  }
  
  .player-detail-avatar {
    width: 70px;
    height: 70px;
  }
  
  .player-detail-role {
    font-size: 13px;
    padding: 5px 10px;
  }
  
  .player-detail-anchor {
    font-size: 11px;
  }
  
  .stat-value {
    font-size: 18px;
  }
  
  .player-detail-section h3 {
    font-size: 15px;
  }
}

/* Very small screens - ensure modal is always visible and scrollable */
@media screen and (max-width: 480px) {
  .player-detail-content {
    width: 98%;
    max-height: 85vh;
    margin: 5px auto;
    border-radius: 12px;
  }
  
  .player-detail-header {
    padding: 8px 10px;
    border-radius: 12px 12px 0 0;
  }
  
  .player-detail-header h2 {
    font-size: 15px;
  }
  
  .player-detail-close {
    font-size: 24px;
    width: 24px;
    height: 24px;
  }
  
  .player-detail-body {
    padding: 8px 10px;
  }
  
  .player-detail-avatar {
    width: 60px;
    height: 60px;
  }
  
  .player-detail-role {
    font-size: 12px;
    padding: 4px 8px;
  }
  
  .player-detail-anchor {
    font-size: 11px;
  }
  
  .player-detail-stats {
    gap: 8px;
    padding-bottom: 12px;
    margin-bottom: 12px;
  }
  
  .player-detail-stat {
    padding: 10px;
  }
  
  .stat-label {
    font-size: 10px;
  }
  
  .stat-value {
    font-size: 16px;
  }
  
  .player-detail-section {
    margin-bottom: 12px;
  }
  
  .player-detail-section h3 {
    font-size: 14px;
    margin-bottom: 6px;
    padding-bottom: 6px;
  }
  
  .player-detail-circle,
  .player-detail-in-group {
    padding: 6px;
    margin-bottom: 5px;
  }
  
  .player-detail-circle-tolerance,
  .player-detail-in-group-tolerance {
    font-size: 11px;
    padding: 2px 8px;
  }
  
  .player-detail-circle-member {
    font-size: 11px;
    padding: 4px 8px;
  }
  
  .player-detail-circle-member-avatar,
  .player-detail-circle-member-avatar-placeholder {
    width: 18px;
    height: 18px;
  }
  
  .player-detail-circle-member-anchor {
    font-size: 9px;
  }
  
  .player-detail-circle-member-badge {
    font-size: 9px;
    padding: 1px 5px;
  }
}

/* Print Styles - Ensure canvas fits on page */
@media print {
  /* Hide elements that shouldn't be printed */
  .header-main__progress,
  .google-slides-container-wrapper,
  .button,
  .tooltip-icon,
  .tolerance-window-input-container,
  .safe-circles-overview {
    display: none !important;
  }
  
  /* Ensure canvas container fits on page */
  #team-potential-canvas {
    max-width: 100% !important;
    height: auto !important;
    page-break-inside: avoid;
    page-break-after: avoid;
  }
  
  /* Scale canvas to fit page width */
  div[style*="position: relative"][style*="display: inline-block"][style*="background-color: #f0f0f0"] {
    max-width: 100% !important;
    width: 100% !important;
    display: block !important;
    text-align: center;
    page-break-inside: avoid;
  }
  
  /* Ensure canvas scales proportionally */
  #team-potential-canvas {
    width: 100% !important;
    max-width: 1000px !important;
    height: auto !important;
    object-fit: contain;
  }
  
  /* Page setup */
  @page {
    size: A4 landscape;
    margin: 1cm;
  }
  
  /* Container adjustments */
  .container {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
  }
  
  /* Ensure text is readable */
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
  
  /* Hide interactive elements */
  .player-detail-modal,
  .question-mark-overlay {
    display: none !important;
  }
}
