:root {
  /* Color Palette */
  --primary-color: #2c3e50;      /* Dark blue-gray for primary elements */
  --secondary-color: #3498db;    /* Bright blue for accents and highlights */
  --tertiary-color: #1abc9c;     /* Teal for secondary accents */
  --text-color: #333333;         /* Dark gray for main text */
  --light-text: #7f8c8d;         /* Light gray for secondary text */
  --background-color: #ffffff;   /* White background */
  --light-bg: #f8f9fa;           /* Light gray background for sections */
  --code-bg: #f6f8fa;            /* Light background for code blocks */
  --border-color: #e9ecef;       /* Light gray for borders */
  --success-color: #2ecc71;      /* Green for success messages */
  --warning-color: #f39c12;      /* Orange for warnings */
  --danger-color: #e74c3c;       /* Red for errors */

  /* Typography */
  --heading-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  --body-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  --code-font: 'JetBrains Mono', 'Fira Code', 'Roboto Mono', 'Courier New', monospace;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2.5rem;

  /* Border Radius */
  --border-radius-sm: 0.25rem;
  --border-radius-md: 0.5rem;
  --border-radius-lg: 0.75rem;
  --border-radius: 0.5rem;  /* For backward compatibility */

  /* Box Shadow */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);  /* For backward compatibility */

  /* Transitions */
  --transition-speed: 0.2s;
}

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap');

* {
  box-sizing: border-box;
}

body {
  font-family: var(--body-font);
  color: var(--text-color);
  line-height: 1.6;
  background-color: var(--background-color);
  margin: 0;
  padding: 0;
  font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--heading-font);
  font-weight: 600;
  color: var(--primary-color);
  margin-top: 1.5em;
  margin-bottom: 0.75em;
  line-height: 1.3;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.75rem;
}

h4 {
  font-size: 1.5rem;
}

h5 {
  font-size: 1.25rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}

a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color var(--transition-speed) ease-in-out;
}

a:hover {
  color: var(--tertiary-color);
  text-decoration: none;
}

.img {
  overflow: hidden;
  background-position: center center;
  background-repeat: no-repeat;
  border-radius: var(--border-radius);
  transition: transform var(--transition-speed);
}

.img:hover {
  transform: scale(1.05);
}

.dropdown {
  position: relative;
  display: inline-block;
  padding: 2px;
}

/* Container */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

/* Header & Navigation */
header, .masthead {
  padding: var(--spacing-md) 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: var(--spacing-xl);
  text-align: center;
}

.page-header {
  margin-bottom: 0.5rem;
}

.site-title, .masthead-brand a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 700;
  font-size: 3.5rem;
  transition: all var(--transition-speed) ease-in-out;
  display: inline-block;
  letter-spacing: -0.5px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.site-title:hover, .masthead-brand a:hover {
  color: var(--secondary-color);
  text-decoration: none;
  transform: translateY(-2px);
}

.site-subtitle {
  color: var(--light-text);
  font-size: 1.2rem;
  font-weight: 300;
  margin-top: 0.5rem;
}

/* Footer styling */
.footer, footer {
  margin-top: var(--spacing-xl);
  padding: var(--spacing-sm) 0;
  background-color: var(--background-color);
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.footer a, footer a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-speed) ease-in-out;
}

.footer a:hover, footer a:hover {
  color: var(--secondary-color);
  text-decoration: none;
}

.text-muted {
  color: var(--light-text);
  font-size: 0.9rem;
}

/* Button styling */
.btn-primary, .btn-primary.btn-lg {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  border-radius: var(--border-radius-md);
  transition: all var(--transition-speed) ease-in-out;
  color: white !important;
  font-weight: 500;
  padding: var(--spacing-sm) var(--spacing-lg);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover, .btn-primary.btn-lg:hover {
  background-color: var(--secondary-color) !important;
  border-color: var(--secondary-color) !important;
  box-shadow: var(--shadow-md);
}

.btn-primary:focus, .btn-primary.btn-lg:focus {
  box-shadow: none;
  outline: none;
}

/* Tab styling */
.modern-tabs {
  margin-bottom: 1.5rem;
}

.nav-tabs {
  border-bottom: 2px solid var(--light-gray);
}

.nav-tabs .nav-link {
  color: var(--text-color);
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  padding: 0.75rem 1.5rem;
  font-weight: bold;
  transition: color var(--transition-speed), background-color var(--transition-speed);
  border: none;
  margin-right: 0.5rem;
}

.nav-tabs .nav-link:hover {
  background-color: var(--light-gray);
  color: var(--primary-color);
}

.nav-tabs .nav-link.active {
  color: var(--primary-color);
  font-weight: bold;
  background-color: transparent;
  border-bottom: 3px solid var(--primary-color);
}

.tab-content-container {
  padding: 1.5rem;
  background-color: var(--light-gray);
  border-radius: 0 0 var(--border-radius) var(--border-radius);
  margin-top: -1px;
}

.highlight-text {
  color: var(--primary-color);
  font-size: 1.2rem;
  font-weight: 500;
  margin-top: 1rem;
}

/* Table styling */
.table, .modern-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--spacing-lg) 0;
  box-shadow: var(--shadow-sm);
  border-radius: var(--border-radius-md);
  overflow: hidden;
}

.modern-table thead {
  background-color: var(--primary-color);
}

.modern-table thead th {
  color: white;
  font-weight: 600;
  border: none;
  padding: var(--spacing-sm) var(--spacing-md);
}

.modern-table tbody td {
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--border-color);
}

.modern-table tbody tr:nth-child(odd) {
  background-color: var(--light-bg);
}

.modern-table tbody tr:hover {
  background-color: rgba(52, 152, 219, 0.1);
}

/* Artist figure styling */
figure {
  margin-bottom: 1.5rem;
  transition: all var(--transition-speed);
}

figure:hover {
  transform: translateY(-5px);
  box-shadow: var(--box-shadow);
}

figcaption {
  margin-top: 0.5rem;
  text-align: center;
  font-weight: 500;
}

/* Enhanced artist styling */
.artist-link {
  text-decoration: none;
  display: block;
  color: var(--text-color);
}

.artist-figure {
  padding: 10px;
  border-radius: var(--border-radius);
  background-color: var(--light-gray);
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.img-container {
  overflow: hidden;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-bottom: 10px;
}

.artist-image {
  object-fit: cover;
  transition: transform var(--transition-speed);
}

.artist-figure:hover .artist-image {
  transform: scale(1.05);
}

.artist-name {
  font-weight: 600;
  color: var(--primary-color);
  transition: color var(--transition-speed);
}

.artist-figure:hover .artist-name {
  color: var(--secondary-color);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  h3 {
    font-size: 1.5rem;
  }

  h4 {
    font-size: 1.25rem;
  }

  .container {
    padding: 0 var(--spacing-md);
  }

  .site-title, .masthead-brand a {
    font-size: 2.5rem;
  }

  .profile-image {
    width: 150px;
    height: 150px;
  }
}

/* Recommender container styling */
.recommender-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 1.5rem;
  background-color: var(--light-gray);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--primary-color);
}

.artist-select {
  margin-bottom: 0.5rem;
}

.submit-button {
  padding: 0.75rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.button-text {
  display: inline-block;
  color: white;
}

.submit-button:hover .button-text {
  /* Removed transform to stabilize button */
}

/* Add a pulsing effect to the button when no artists are selected */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(44, 62, 80, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(44, 62, 80, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(44, 62, 80, 0);
  }
}

.submit-button:focus {
  animation: none;
  box-shadow: none;
  outline: none;
}

/* Utility Classes */
/* Global focus styles - remove all outlines and box-shadows */
*:focus {
  outline: none !important;
  box-shadow: none !important;
}

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

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

.text-muted {
  color: var(--light-text) !important;
}

.bg-light {
  background-color: var(--light-bg) !important;
}

.border-bottom {
  border-bottom: 1px solid var(--border-color) !important;
}

.rounded {
  border-radius: var(--border-radius-md) !important;
}

.shadow {
  box-shadow: var(--shadow-sm) !important;
}

.shadow-lg {
  box-shadow: var(--shadow-lg) !important;
}
/* InlineDropdown styling */
.inline-dropdown-container {
  background-color: var(--background-color);
  padding: var(--spacing-md);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--spacing-md);
  border: 1px solid var(--border-color);
}

.dropdown-text {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.dropdown-label {
  margin: 0 var(--spacing-sm);
  font-weight: 500;
  color: var(--text-color);
}

.custom-dropdown {
  margin: 0 var(--spacing-xs);
}

.dropdown-toggle {
  border-radius: var(--border-radius-md);
  padding: var(--spacing-xs) var(--spacing-md);
  transition: all var(--transition-speed) ease-in-out;
  font-weight: 500;
  border-color: var(--border-color) !important;
}

.dropdown-toggle:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--secondary-color) !important;
}

.dropdown-toggle:focus {
  box-shadow: none;
  outline: none;
}

.responsive-break {
  display: none;
}

/* Show the responsive break on mobile */
@media (max-width: 576px) {
  .responsive-break {
    display: block;
    width: 100%;
    height: var(--spacing-sm);
  }

  .dropdown-text {
    justify-content: flex-start;
  }

  .dropdown-label:first-child {
    margin-left: 0;
  }
}
