/* ---------------------------------------
   Color Variables
-----------------------------------------*/
:root {
  --sea-salt: #F1F2EB;
  --cloud-white: #FAFAF6;
  --pearl-white: #FEFDFB;
  --reseda-green: #5C7457;
  --cambridge-green: #9BB096;
  --warm-gray: #4F4F4F;
  --muted-accent: #E6E2D6;
  --contrasting-accent: #FFE3C8;
  
  /* Device Breakpoints */
  --breakpoint-xs: 0;
  --breakpoint-sm: 576px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 992px;
  --breakpoint-xl: 1200px;
}

/* ---------------------------------------
   Global Base
-----------------------------------------*/
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  /* Light gradient from Sea Salt to Cloud White */
  background: linear-gradient(135deg, var(--sea-salt), var(--cloud-white));
  font-family: "Helvetica Neue", Arial, sans-serif;
  color: var(--warm-gray);
}

/* Main container */
.container {
  margin-top: 2rem;
  margin-bottom: 2rem;
  /* Use Pearl White for a slightly brighter container background */
  background-color: var(--pearl-white);
  color: var(--warm-gray);
  border-radius: 1rem;
  /* Subtle modern shadow */
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
  padding: 2rem;
}

/* Container responsive adjustments */
@media (max-width: 576px) {
  .container {
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 0.75rem;
  }
}

/* If you need a container with fluid width but light styling: */
.dark-container-fluid {
  width: 100%;
  padding: 2rem;
  background-color: var(--pearl-white);
  color: var(--warm-gray);
  border-radius: 1rem;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

@media (max-width: 576px) {
  .dark-container-fluid {
    padding: 1rem;
    border-radius: 0.75rem;
  }
}

/* ---------------------------------------
   Navbar
-----------------------------------------*/
.custom-navbar {
  background-color: var(--reseda-green) !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.custom-navbar .navbar-brand {
  color: var(--pearl-white) !important;
  font-weight: 600;
}
.custom-navbar .nav-link {
  color: var(--pearl-white) !important;
  margin-right: 1rem;
  transition: color 0.3s ease;
}
.custom-navbar .nav-link:hover {
  text-decoration: underline;
}

/* Responsive navbar adjustments */
@media (max-width: 991px) {
  .custom-navbar .navbar-toggler {
    border-color: var(--pearl-white);
  }
  
  .custom-navbar .navbar-collapse {
    padding-top: 0.5rem;
  }
  
  .custom-navbar .nav-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 0;
  }
  
  .custom-navbar .nav-item:last-child {
    border-bottom: none;
  }
  
  .custom-navbar .nav-link {
    padding: 0.5rem 0;
  }
}

/* ---------------------------------------
   Headers & Titles
-----------------------------------------*/
h1, h2, h3, h4, h5 {
  color: var(--warm-gray);
  font-weight: 600;
  margin-top: 0;
}

/* Responsive typography */
@media (max-width: 576px) {
  h1 {
    font-size: 1.75rem;
  }
  h2 {
    font-size: 1.5rem;
  }
  h3 {
    font-size: 1.25rem;
  }
  h4, h5 {
    font-size: 1.1rem;
  }
}

/* ---------------------------------------
   Buttons
-----------------------------------------*/
.btn {
  border-radius: 6px;
  transition: background-color 0.3s ease;
  /* Default text color for generic buttons */
  color: var(--warm-gray);
  background-color: var(--cambridge-green);
  border: none;
}

/* "Add Player" button */
.btn.add_player_button {
  background-color: var(--reseda-green) !important;
  color: var(--pearl-white) !important;
  border: none;
}
.btn.add_player_button:hover {
  background-color: #4a624c !important; /* slightly darker than var(--reseda-green) */
}

/* Danger button override */
.btn.btn-danger {
  background-color: #dc3545;
  border-color: #dc3545;
  color: #fff;
}
.btn.btn-danger:hover {
  background-color: #bb2d3b;
}

/* .btn-primary: consistent green for "primary" actions */
.btn.btn-primary {
  background-color: var(--reseda-green);
  color: var(--pearl-white) !important;
  border: none;
}
.btn.btn-primary:hover {
  background-color: #4a624c;
}

.btn-green {
  background-color: var(--reseda-green) !important; 
  color: var(--pearl-white) !important;
  border: none;
}
.btn-green:hover {
  background-color: #4a624c !important; 
}

/* Responsive button adjustments */
@media (max-width: 576px) {
  .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
  }
  
  .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }
}

/* ---------------------------------------
   Table
-----------------------------------------*/
.table {
  border-collapse: separate;
  border-spacing: 0 0.6rem;
  color: var(--warm-gray);
  background: transparent;
  border: none;
}
.table-striped > tbody > tr:nth-of-type(odd) {
  background-color: var(--muted-accent); /* Soft neutral for striping */
}
.table,
.table td,
.table th {
  border: none !important;
}
.new-player-row {
  background-color: var(--contrasting-accent);
  transition: background-color 2s ease-out;
}
.table thead th {
  background-color: var(--reseda-green);
  color: var(--pearl-white);
  border: none;
  font-weight: 600;
  text-align: center;
}
.table tbody tr {
  background-color: var(--pearl-white);
  border-radius: 8px;
  overflow: hidden; /* ensure radius on corners */
}
.table tbody tr:hover {
  background-color: var(--muted-accent);
}
.table td {
  text-align: center;
  vertical-align: middle;
  padding: 0.75rem 1rem;
}
.table td a,
.table td button {
  color: var(--warm-gray);
  text-align: center;
  vertical-align: middle;
}
/* Icon style in table cells */
.table td i {
  font-size: 1.5rem;
  display: inline-block;
}

/* Responsive table adjustments */
@media (max-width: 767px) {
  .table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .table td {
    padding: 0.5rem 0.75rem;
  }
  
  /* Adjust column visibility based on importance */
  .table .d-none-sm {
    display: none;
  }
}

/* ---------------------------------------
   Cards
-----------------------------------------*/
.card {
  background-color: var(--pearl-white) !important;
  color: var(--warm-gray) !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important; /* subtle border */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important; /* slight pop */
}

/* Ensure card-body also has correct background */
.card .card-body {
  background-color: var(--cloud-white) !important;
}
/* Ensure form fields inside cards also match the theme */
.card .form-control,
.card .form-control-file {
  background-color: var(--sea-salt) !important;
  color: var(--warm-gray) !important;
  border: 1px solid #ccc !important;
}
.card .form-control:focus {
  border-color: #999;
  box-shadow: 0 0 5px rgba(153,153,153,0.5);
}
.card .card-title {
  color: var(--warm-gray);
  font-weight: 600;
}

/* Responsive card adjustments */
@media (max-width: 576px) {
  .card .card-body {
    padding: 0.75rem;
  }
  
  .card .card-title {
    font-size: 1rem;
  }
  
  .player-card .card-body {
    padding: 0.75rem;
  }
}

.text-cambridge-green {
  color: var(--cambridge-green) !important;
}

.text-reseda-green {
  color: var(--reseda-green) !important;
}

/* Utility class for a minimal dark green + white icon button */
.btn-icon-green {
  background-color: var(--reseda-green) !important;
  color: #fff !important;
  padding: 4px 8px; /* or as you prefer for spacing */

  display: inline-block;
  /* Align icon center if needed */
  line-height: 1.2;
  text-align: center;
  transition: background-color 0.2s ease;
}

.btn-icon-green:hover {
  background-color: #4a624c !important; /* Slightly darker than var(--reseda-green) */
  color: #fff !important;
}

/* ---------------------------------------
   Modal (Light Theme)
-----------------------------------------*/
.modal-content {
  background-color: var(--pearl-white); 
  color: var(--warm-gray);
  border: none;
  border-radius: 8px;
}
.modal-header,
.modal-body,
.modal-footer {
  background: transparent;
  border: none;
}
.modal-header .modal-title {
  color: var(--warm-gray);
  font-weight: 600;
}
.modal-header .close {
  color: var(--warm-gray);
  opacity: 0.8;
}
.modal-header .close:hover {
  color: var(--warm-gray);
  opacity: 1;
}
/* Form controls inside modal */
.modal-content .form-control {
  background-color: var(--sea-salt);
  color: var(--warm-gray);
  border: 1px solid #ccc;
  border-radius: 4px;
}
.modal-content .form-control:focus {
  border-color: #999;
  box-shadow: 0 0 5px rgba(153,153,153,0.5);
}
.modal-content label {
  color: var(--warm-gray);
}

/* Analysis Modal Height Fix & Scrolling */
#allAnalysisPlayerModal .modal-body {
  max-height: 70vh; /* 70% of viewport height */
  overflow-y: auto; /* Enable vertical scrolling */
}

/* Custom scrollbar styling for the analysis modal */
#allAnalysisPlayerModal .modal-body::-webkit-scrollbar {
  width: 8px;
}

#allAnalysisPlayerModal .modal-body::-webkit-scrollbar-track {
  background: var(--sea-salt);
  border-radius: 10px;
}

#allAnalysisPlayerModal .modal-body::-webkit-scrollbar-thumb {
  background: var(--cambridge-green);
  border-radius: 10px;
}

#allAnalysisPlayerModal .modal-body::-webkit-scrollbar-thumb:hover {
  background: var(--reseda-green);
}

/* Sticky filter section */
#allAnalysisPlayerModal .filter-section {
  position: sticky;
  top: 0;
  background-color: var(--pearl-white);
  padding-top: 10px;
  padding-bottom: 10px;
  z-index: 1;
  border-bottom: 1px solid var(--muted-accent);
}

/* Enhanced sticky filter section - more specific and forceful */
#allAnalysisPlayerModal .modal-body .filter-section {
  position: sticky !important;
  top: 0 !important;
  background-color: var(--pearl-white) !important;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
  margin-top: 0 !important;
  z-index: 10 !important;
  border-bottom: 2px solid var(--muted-accent) !important;
  /* Add a subtle shadow for better visual separation while scrolling */
  box-shadow: 0 4px 6px -6px rgba(0, 0, 0, 0.1) !important;
}

/* Responsive modal adjustments */
@media (max-width: 576px) {
  #allAnalysisPlayerModal .modal-body {
    max-height: 80vh; /* More vertical space on mobile */
    padding: 0.75rem;
  }
  
  .modal-header {
    padding: 0.75rem;
  }
  
  .modal-footer {
    padding: 0.75rem;
  }
  
  .filter-section {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
  
  .filter-section h5 {
    margin-bottom: 0.5rem;
  }
  
  .filter-section div {
    width: 100%;
  }
  
  .filter-section select {
    width: 100% !important;
  }
}

/* ---------------------------------------
   Responsive Utilities
-----------------------------------------*/
/* Display utilities */
.d-none {
  display: none !important;
}
.d-block {
  display: block !important;
}
.d-flex {
  display: flex !important;
}
.d-inline-block {
  display: inline-block !important;
}

/* Responsive display classes */
@media (min-width: 576px) {
  .d-sm-none {
    display: none !important;
  }
  .d-sm-block {
    display: block !important;
  }
  .d-sm-flex {
    display: flex !important;
  }
  .d-sm-inline-block {
    display: inline-block !important;
  }
}

@media (min-width: 768px) {
  .d-md-none {
    display: none !important;
  }
  .d-md-block {
    display: block !important;
  }
  .d-md-flex {
    display: flex !important;
  }
  .d-md-inline-block {
    display: inline-block !important;
  }
  .d-md-table-cell {
    display: table-cell !important;
  }
}

@media (min-width: 992px) {
  .d-lg-none {
    display: none !important;
  }
  .d-lg-block {
    display: block !important;
  }
  .d-lg-flex {
    display: flex !important;
  }
  .d-lg-inline-block {
    display: inline-block !important;
  }
  .d-lg-table-cell {
    display: table-cell !important;
  }

  .button-laptop-larger {
    padding: 0.375rem 0.75rem;
    font-size: 0.95rem;
  }
  
  .button-laptop-larger i {
    font-size: 1.1rem;
    margin-right: 0.25rem;
  }
  
  /* Ensure the buttons have good spacing */
  .button-laptop-larger.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
  }
  
  /* Make icon buttons a bit larger too */
  .btn-icon-green {
    padding: 6px 10px;
  }
  
  .btn-icon-green i {
    font-size: 1.2rem;
  }
}

/* Ensure all buttons in player cards are vertically centered */
.player-card .d-flex.align-items-center {
  min-height: 38px; /* Provides consistent height for alignment */
}

/* Better spacing between buttons */
.player-card .btn.mr-1 {
  margin-right: 0.375rem !important;
}

/* Make sure icon and text are aligned */
.player-card .btn i {
  vertical-align: middle;
}

.player-card .btn span {
  vertical-align: middle;
}

/* ---------------------------------------
   Utility Classes
-----------------------------------------*/
.shadow-sm {
  box-shadow: 0 1px 2px rgba(0,0,0,0.1) !important;
}

/* Flex utilities */
.flex-column {
  flex-direction: column !important;
}
.flex-row {
  flex-direction: row !important;
}
.justify-content-between {
  justify-content: space-between !important;
}
.justify-content-center {
  justify-content: center !important;
}
.align-items-center {
  align-items: center !important;
}
.align-items-start {
  align-items: flex-start !important;
}

/* Responsive flex utilities */
@media (min-width: 576px) {
  .flex-sm-row {
    flex-direction: row !important;
  }
  .flex-sm-column {
    flex-direction: column !important;
  }
}

@media (min-width: 768px) {
  .flex-md-row {
    flex-direction: row !important;
  }
  .flex-md-column {
    flex-direction: column !important;
  }
  .align-items-md-center {
    align-items: center !important;
  }
}

/* Width utilities */
.w-100 {
  width: 100% !important;
}
.w-auto {
  width: auto !important;
}

@media (min-width: 768px) {
  .w-md-auto {
    width: auto !important;
  }
}

/* Spacing utilities */
.mb-0 {
  margin-bottom: 0 !important;
}
.mb-1 {
  margin-bottom: 0.25rem !important;
}
.mb-2 {
  margin-bottom: 0.5rem !important;
}
.mb-3 {
  margin-bottom: 1rem !important;
}
.mb-4 {
  margin-bottom: 1.5rem !important;
}
.ml-auto {
  margin-left: auto !important;
}
.mr-1 {
  margin-right: 0.25rem !important;
}
.mr-2 {
  margin-right: 0.5rem !important;
}
.ml-1 {
  margin-left: 0.25rem !important;
}
.mt-1 {
  margin-top: 0.25rem !important;
}
.mt-2 {
  margin-top: 0.5rem !important;
}
.mt-3 {
  margin-top: 1rem !important;
}

/* Responsive margin utilities */
@media (min-width: 768px) {
  .mb-md-0 {
    margin-bottom: 0 !important;
  }
}

/* Text utilities */
.text-truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Implement truncate for tablets */
@media (max-width: 991px) {
  .truncate-md {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: inline-block;
  }
}

/* Fix for mobile-specific text alignment */
@media (max-width: 576px) {
  .text-center-xs {
    text-align: center !important;
  }
}

/* ---------------------------------------
   Existing / Old Login Styles
   (Keeping original gradient + styling)
-----------------------------------------*/
.input_user, .input_pass {
  font-size: 1rem;
}
.input_user:focus, .input_pass:focus {
  box-shadow: none;
  outline: 0;
}
.login_btn:focus {
  box-shadow: none;
  outline: 0;
}
.login_btn:hover {
  color: white;
  background-color: #949494;
}
.login_btn {
  width: 100%;
  height: 50px;
  background: #808080;
  color: white;
  font-size: 22px;
  font-weight: bold;
  border: 3px solid #d0d0d0;
  border-radius: 5px;
}
.input-group-append {
  background-color: black;
  width: 45px;
  display: flex;
  justify-content: center;
}
.input-group {
  margin-bottom: 15px;
}
input {
  filter: none;
}
input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px white inset;
}
.input-group-text {
  background: black;
  color: white;
  border: 0;
  border-radius: 0;
  padding: 0;
  display: flex;
  align-items: center;
}
.input-group-text .fa-user,
.input-group-text .fa-key {
  color: white;
  font-size: 1.5rem;
}
.input-group-text {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid #d0d0d0;
  border-radius: 5px;
  color: #808080;
}
.form-control {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid #d0d0d0;
  border-radius: 5px;
  color: #5a5a5a;
}
.form-control::placeholder {
  color: #9e9e9e;
}
.form-control:focus {
  border-color: #a8a8a8;
  box-shadow: 0 0 8px 0 rgba(168, 168, 168, 0.5);
}
.fas {
  color: #808080;
}
.input-group-text,
.form-control {
  padding: 10px;
}

/* Make login elements more touch-friendly on mobile */
@media (max-width: 576px) {
  .login_btn {
    height: 45px;
    font-size: 18px;
  }
  
  .input-group-text,
  .form-control {
    padding: 8px;
  }
}

/*************** LOGIN SCREEN ***************/
.login-body .login-container {
  margin-top: -3%;
}
.login-body {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  position: absolute;
  text-align: center;
  margin: 0;
  height: 100vh;
  /* Keeping your original dark radial gradient */
  background-image: radial-gradient(
    circle,
    #eeeeee,
    #e4e4e4,
    #dadada,
    #d0d0d0,
    #c6c6c6,
    #bcbcbc,
    #b2b2b2,
    #a8a8a8,
    #9e9e9e,
    #949494,
    #8a8a8a,
    #808080,
    #666666,
    #4d4d4d,
    #333333
  );
}

/* Responsive login adjustments */
@media (max-width: 576px) {
  .login-body .login-container {
    width: 90%;
    margin-top: 0;
  }
}

/* ---------------------------------------
   NEW: Floating Panels & Analysis Cards
-----------------------------------------*/

/* Large floating container for Players / Latest Analyses */
.floating-panel {
  /* Light with slight transparency for "glass" effect */
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 1rem;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

/* Responsive floating panel */
@media (max-width: 576px) {
  .floating-panel {
    padding: 1rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
  }
}

/* Similar to .card-body but for floating panels */
.panel-body {
  padding: 1rem 1.2rem;
}

/* Responsive panel body */
@media (max-width: 576px) {
  .panel-body {
    padding: 0.75rem;
  }
}

/* Each "latest analysis" item as a smaller floating card */
.analysis-card {
  background-color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 0.5rem;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
  padding: 0.5rem;
}

.analysis-card-body {
  padding: 0.5rem;
}

.analysis-card-body .card-title {
  margin-bottom: 0.3rem;
  font-size: 1rem;
  color: var(--warm-gray);
  text-transform: uppercase;
}

.text-truncate-note {
  white-space: nowrap;     /* Prevents text from wrapping */
  overflow: hidden;        /* Hides overflowing text */
  text-overflow: ellipsis; /* Adds "..." when text is too long */
  max-width: 180px;        /* Adjust based on available space */
  display: inline-block;   /* Ensures ellipsis works */
}

/* Responsive text truncation */
@media (max-width: 576px) {
  .text-truncate-note {
    max-width: 120px;
  }
}

/* ---------------------------------------
   Grid System
-----------------------------------------*/
.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -15px;
  margin-left: -15px;
}

.col, .col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12,
.col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12,
.col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12,
.col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
  position: relative;
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
}

/* Default column widths */
.col {
  flex-basis: 0;
  flex-grow: 1;
  max-width: 100%;
}

.col-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
.col-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
.col-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
.col-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }

/* Small devices (576px and up) */
@media (min-width: 576px) {
  .col-sm-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
  .col-sm-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
  .col-sm-3 { flex: 0 0 25%; max-width: 25%; }
  .col-sm-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
  .col-sm-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
  .col-sm-6 { flex: 0 0 50%; max-width: 50%; }
  .col-sm-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
  .col-sm-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
  .col-sm-9 { flex: 0 0 75%; max-width: 75%; }
  .col-sm-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
  .col-sm-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
  .col-sm-12 { flex: 0 0 100%; max-width: 100%; }
}

/* Medium devices (768px and up) */
@media (min-width: 768px) {
  .col-md-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
  .col-md-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
  .col-md-3 { flex: 0 0 25%; max-width: 25%; }
  .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
  .col-md-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
  .col-md-6 { flex: 0 0 50%; max-width: 50%; }
  .col-md-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
  .col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
  .col-md-9 { flex: 0 0 75%; max-width: 75%; }
  .col-md-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
  .col-md-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
  .col-md-12 { flex: 0 0 100%; max-width: 100%; }
}

/* Large devices (992px and up) */
@media (min-width: 992px) {
  .col-lg-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
  .col-lg-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
  .col-lg-3 { flex: 0 0 25%; max-width: 25%; }
  .col-lg-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
  .col-lg-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
  .col-lg-6 { flex: 0 0 50%; max-width: 50%; }
  .col-lg-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
  .col-lg-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
  .col-lg-9 { flex: 0 0 75%; max-width: 75%; }
  .col-lg-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
  .col-lg-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
  .col-lg-12 { flex: 0 0 100%; max-width: 100%; }
}

/* ---------------------------------------
   Mobile-Specific Overrides
-----------------------------------------*/
@media (max-width: 576px) {
  /* Stack buttons in player cards */
  .player-card .d-flex {
    flex-wrap: wrap;
  }
  
  /* Give more space for player name */
  .player-card .card-title {
    max-width: 100% !important;
    margin-bottom: 0.5rem;
  }
  
  /* Ensure buttons stack properly on mobile */
  .player-card .btn {
    margin-bottom: 0.5rem;
    margin-right: 0.25rem !important;
  }
  
  /* Better button spacing in player details */
  .player-card .d-flex.align-items-center .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }
  
  /* Ensure progress bars are visible but not too wide */
  .progress {
    width: 50% !important;
  }
  
  /* Make sure icons and text align well */
  .fa, .fas {
    vertical-align: middle;
  }
}

/* ---------------------------------------
   Specific Component Responsiveness
-----------------------------------------*/
/* Player detail page: Analysis and info sections */
@media (max-width: 767px) {
  /* Analysis section on player detail */
  .card-body p-3 {
    padding: 0.75rem !important;
  }
  
  /* Three column layout in analyses should stack */
  .card-body .col-6,
  .card-body .col-3 {
    flex: 0 0 100%;
    max-width: 100%;
    margin-bottom: 0.5rem;
  }
  
  /* Better spacing for the action buttons */
  .card-body .col-3:last-child {
    text-align: right;
  }
}

/* Adjust navbar spacing for consistency */
.navbar-toggler {
  border-color: var(--pearl-white) !important;
  color: var(--pearl-white) !important;
}

.navbar-toggler-icon {
  color: var(--pearl-white) !important;
}

/* ---------------------------------------
   Progress Bar Responsiveness
-----------------------------------------*/
.progress {
  display: flex;
  height: 1rem;
  overflow: hidden;
  font-size: 0.75rem;
  background-color: var(--sea-salt);
  border-radius: 0.25rem;
}

.progress-bar {
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
  text-align: center;
  background-color: var(--reseda-green);
  transition: width 0.6s ease;
}

@media (max-width: 767px) {
  .progress {
    height: 0.75rem;
    font-size: 0.65rem;
  }
}