.default-palette {
  --single-audio-player-bg: #fff;
  --single-audio-text-color: #333;
  --single-audio-time-color: #555;
  --single-audio-primary-color: #007bff;
  --single-audio-primary-hover-color: #0056b3;
  --single-audio-secondary-color: #555;
  --single-audio-progress-bg: #e0e0e0;
  --single-audio-progress-fill: #007bff;
  --single-audio-buffered-color: #a0c4e4;
  --single-audio-volume-slider-bg: #ddd;
  --single-audio-volume-slider-thumb: #007bff;
  --single-audio-box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  --single-audio-button-bg: #007bff;
  --single-audio-button-hover-bg: #f0f0f0;
}

.audio-player.skin-twelve {
   background-color: var(--single-audio-player-bg);
   border-radius: 12px;
   box-shadow: var(--single-audio-box-shadow);
   padding: 25px;
   width: 100%;
   max-width: 600px; /* Wider to accommodate two-row layout */
   display: flex;
   flex-direction: column; /* Stack rows vertically */
   gap: 25px; /* Spacing between the two main rows */
   box-sizing: border-box;
   overflow: hidden;
}

/* Top Row Section */
.audio-player.skin-twelve .audio-player-top-row-section {
   display: flex;
   flex-direction: column;
   gap: 20px;
   padding-bottom: 20px;
   border-bottom: 1px solid var(--single-audio-progress-bg);
}

.audio-player.skin-twelve .audio-player-song-metadata {
   display: flex;
   align-items: center;
   gap: 15px;
}

.audio-player.skin-twelve .audio-player-song-thumbnail {
   width: 70px;
   height: 70px;
   background-color: var(--single-audio-progress-bg);
   border-radius: 8px;
   display: flex;
   justify-content: center;
   align-items: center;
   flex-shrink: 0;
   box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.audio-player.skin-twelve .audio-player-song-thumbnail svg {
   width: 45px;
   height: 45px;
   color: var(--single-audio-time-color);
}

.audio-player.skin-twelve .audio-player-song-details {
   flex-grow: 1;
   min-width: 0;
}

.audio-player.skin-twelve .audio-player-song-name {
   font-size: 1.5em;
   font-weight: 700;
   color: var(--single-audio-text-color);
   margin-bottom: 5px;
   white-space: nowrap;
   overflow: hidden;
   text-overflow: ellipsis;
}

.audio-player.skin-twelve .audio-player-artist-name {
   font-size: 1em;
   color: var(--single-audio-time-color);
}

.audio-player.skin-twelve .audio-player-progress-section {
   display: flex;
   flex-direction: column;
   gap: 8px;
}

.audio-player.skin-twelve .audio-player-progress-container {
   width: 100%;
   height: 6px;
   background-color: var(--single-audio-progress-bg);
   border-radius: 3px;
   cursor: pointer;
   overflow: hidden;
   position: relative; /* Essential for positioning buffered bar */
}

/* NEW: Buffered Bar Styles */
.audio-player.skin-twelve .audio-player-buffered-bar {
   position: absolute;
   top: 0;
   left: 0;
   height: 100%;
   width: 0%; /* Will be updated by JS */
   background-color: var(--single-audio-buffered-color);
   border-radius: 3px;
   z-index: 1; /* Behind the main progress bar */
}

.audio-player.skin-twelve .audio-player-progress-bar {
   position: absolute; /* Position within container */
   top: 0;
   left: 0;
   height: 100%;
   width: 0%;
   background-color: var(--single-audio-progress-fill);
   border-radius: 3px;
   transition: width 0.1s linear;
   z-index: 2; /* On top of the buffered bar */
}

.audio-player.skin-twelve .audio-player-time-display {
   font-size: 0.85em;
   color: var(--single-audio-time-color);
   display: flex;
   justify-content: end;
   gap: 5px;
}

/* Bottom Row Section */
.audio-player.skin-twelve .audio-player-bottom-row-section {
   display: flex;
   justify-content: space-between; /* Distribute main and utility controls */
   align-items: center;
   flex-wrap: wrap; /* Allow wrapping for responsiveness */
   gap: 20px; /* Spacing if wrapped */
}

.audio-player.skin-twelve .audio-player-playback-controls {
   display: flex;
   justify-content: center;
   align-items: center;
   gap: 15px;
   flex-grow: 1; /* Allow it to grow and take space */
   min-width: fit-content; /* Prevent shrinking too much */
}

.audio-player.skin-twelve .audio-player-control-btn {
   background: none;
   border: none;
   cursor: pointer;
   padding: 0;
   display: flex;
   justify-content: center;
   align-items: center;
   transition: all 0.2s ease;
   color: var(--single-audio-time-color);
}

/* Audio Player Button Common Styles */
.audio-player.skin-twelve .audio-player-btn {
   width: 50px;
   height: 50px;
   border-radius: 50%;
   background-color: var(--single-audio-button-hover-bg);
   box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
   display: flex;
   justify-content: center;
   align-items: center;
}

.audio-player.skin-twelve .audio-player-btn:hover {
   background-color: var(--single-audio-progress-bg);
   transform: translateY(-1px);
   box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.audio-player.skin-twelve .audio-player-btn:active {
   transform: translateY(0);
   box-shadow: 0 1px 5px rgba(0, 0, 0, 0.08);
}

.audio-player.skin-twelve .audio-player-btn svg {
   width: 26px;
   height: 26px;
   transition: color 0.2s ease;
}

.audio-player.skin-twelve .audio-player-btn:hover svg {
   color: var(--single-audio-text-color);
}

/* Primary Play/Pause Button */
.audio-player.skin-twelve .audio-player-play-pause-btn.audio-player-primary-btn {
   width: 65px;
   height: 65px;
   background-color: var(--single-audio-primary-color);
   box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4);
}

.audio-player.skin-twelve .audio-player-play-pause-btn.audio-player-primary-btn:hover {
   background-color: var(--single-audio-primary-hover-color);
   box-shadow: 0 6px 20px rgba(0, 123, 255, 0.6);
   transform: translateY(-2px);
}

.audio-player.skin-twelve .audio-player-play-pause-btn.audio-player-primary-btn:active {
   background-color: var(--single-audio-primary-color);
   box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
   transform: translateY(0);
}

.audio-player.skin-twelve .audio-player-play-pause-btn.audio-player-primary-btn svg {
   width: 35px;
   height: 35px;
   color: var(--single-audio-player-bg);
}

/* Subtle Mute/Unmute Button */
.audio-player.skin-twelve .audio-player-mute-unmute-btn.audio-player-subtle-btn {
   width: 45px;
   height: 45px;
   background: none;
   box-shadow: none;
}

.audio-player.skin-twelve .audio-player-mute-unmute-btn.audio-player-subtle-btn:hover {
   background-color: var(--single-audio-progress-bg);
   box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.audio-player.skin-twelve .audio-player-mute-unmute-btn.audio-player-subtle-btn:active {
   box-shadow: 0 1px 5px rgba(0, 0, 0, 0.08);
}

.audio-player.skin-twelve .audio-player-mute-unmute-btn.audio-player-subtle-btn svg {
   width: 22px;
   height: 22px;
}

/* Utility Controls (Volume & Playback Speed) */
.audio-player.skin-twelve .audio-player-utility-controls {
   display: flex;
   align-items: center;
   gap: 15px;
   flex-grow: 1; /* Allow it to grow, but usually won't on wide screens */
   justify-content: flex-end; /* Push to the right */
}

.audio-player.skin-twelve .audio-player-volume-controls {
   display: flex;
   align-items: center;
   gap: 8px;
}

.audio-player.skin-twelve .audio-player-volume-slider {
   width: 120px;
   -webkit-appearance: none;
   appearance: none;
   height: 4px;
   background-color: var(--single-audio-volume-slider-bg);
   border-radius: 2px;
   outline: none;
   transition: background-color 0.2s;
}

.audio-player.skin-twelve .audio-player-volume-slider::-webkit-slider-thumb {
   -webkit-appearance: none;
   appearance: none;
   width: 16px;
   height: 16px;
   background-color: var(--single-audio-volume-slider-thumb);
   border-radius: 50%;
   cursor: grab;
   box-shadow: 0 0 0 3px var(--single-audio-player-bg), 0 2px 5px rgba(0, 0, 0, 0.08);
   transition: all 0.2s ease;
}

.audio-player.skin-twelve .audio-player-volume-slider::-webkit-slider-thumb:active {
   transform: scale(1.1);
   box-shadow: 0 0 0 4px var(--single-audio-player-bg), 0 3px 8px rgba(0, 0, 0, 0.15);
}

.audio-player.skin-twelve .audio-player-volume-slider::-moz-range-thumb {
   width: 16px;
   height: 16px;
   background-color: var(--single-audio-volume-slider-thumb);
   border-radius: 50%;
   cursor: grab;
   box-shadow: 0 0 0 3px var(--single-audio-player-bg), 0 2px 5px rgba(0, 0, 0, 0.08);
   transition: all 0.2s ease;
}
.audio-player.skin-twelve .audio-player-volume-slider::-moz-range-thumb:active {
   transform: scale(1.1);
   box-shadow: 0 0 0 4px var(--single-audio-player-bg), 0 3px 8px rgba(0, 0, 0, 0.15);
}

/* Playback Speed Select */
.audio-player.skin-twelve .audio-player-playback-speed-controls {
   display: flex;
   align-items: center;
}

.audio-player.skin-twelve .audio-player-select {
   background-color: var(--single-audio-button-hover-bg);
   border: 1px solid var(--single-audio-progress-bg);
   border-radius: 6px;
   padding: 8px 12px;
   font-size: 0.9em;
   cursor: pointer;
   outline: none;
   color: var(--single-audio-text-color);
   appearance: none;
   -webkit-appearance: none;
   background-image: url('data:image/svg+xml;utf8,<svg fill="%236c757d" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
   background-repeat: no-repeat;
   background-position: right 8px center;
   background-size: 18px;
   transition: all 0.2s ease;
}

.audio-player.skin-twelve .audio-player-select:hover {
   border-color: var(--single-audio-primary-color);
   box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.audio-player.skin-twelve .audio-player-select option {
   background: var(--single-audio-player-bg);
   color: var(--single-audio-text-color);
}

/* Responsive adjustments for two-row layout */
@media (max-width: 768px) {
   .audio-player.skin-twelve {
       padding: 20px;
       gap: 20px;
       max-width: 450px;
   }

   .audio-player.skin-twelve .audio-player-song-metadata {
       flex-direction: column; /* Stack thumbnail and details */
       text-align: center;
       gap: 10px;
   }

   .audio-player.skin-twelve .audio-player-song-thumbnail {
       width: 60px;
       height: 60px;
   }
   .audio-player.skin-twelve .audio-player-song-thumbnail svg {
       width: 40px;
       height: 40px;
   }

   .audio-player.skin-twelve .audio-player-song-name {
       font-size: 1.3em;
   }
   .audio-player.skin-twelve .audio-player-artist-name {
       font-size: 0.9em;
   }

   .audio-player.skin-twelve .audio-player-bottom-row-section {
       flex-direction: column; /* Stack controls vertically */
       align-items: center;
       gap: 25px;
   }

   .audio-player.skin-twelve .audio-player-playback-controls {
       flex-grow: 0; /* Reset grow */
       min-width: unset;
       width: 100%;
       justify-content: center;
       gap: 12px;
   }

   .audio-player.skin-twelve .audio-player-btn {
       width: 45px;
       height: 45px;
   }
   .audio-player.skin-twelve .audio-player-btn svg {
       width: 22px;
       height: 22px;
   }
   .audio-player.skin-twelve .audio-player-play-pause-btn.audio-player-primary-btn {
       width: 60px;
       height: 60px;
   }
   .audio-player.skin-twelve .audio-player-play-pause-btn.audio-player-primary-btn svg {
       width: 32px;
       height: 32px;
   }

   .audio-player.skin-twelve .audio-player-utility-controls {
       flex-direction: column; /* Stack volume and speed */
       width: 100%;
       gap: 15px;
       justify-content: center; /* Center them when stacked */
   }
   .audio-player.skin-twelve .audio-player-volume-controls {
       justify-content: center;
   }
   .audio-player.skin-twelve .audio-player-volume-slider {
       width: 180px; /* Wider for easier touch */
   }
   .audio-player.skin-twelve .audio-player-select {
       padding: 7px 10px;
       font-size: 0.85em;
   }
}

@media (max-width: 480px) {
   .audio-player.skin-twelve {
       padding: 15px;
       gap: 15px;
   }

   .audio-player.skin-twelve .audio-player-song-thumbnail {
       width: 50px;
       height: 50px;
   }
   .audio-player.skin-twelve .audio-player-song-thumbnail svg {
       width: 35px;
       height: 35px;
   }

   .audio-player.skin-twelve .audio-player-song-name {
       font-size: 1.1em;
       white-space: normal;
   }
   .audio-player.skin-twelve .audio-player-artist-name {
       font-size: 0.8em;
   }

   .audio-player.skin-twelve .audio-player-btn {
       width: 40px;
       height: 40px;
   }
   .audio-player.skin-twelve .audio-player-btn svg {
       width: 18px;
       height: 18px;
   }
   .audio-player.skin-twelve .audio-player-play-pause-btn.audio-player-primary-btn {
       width: 55px;
       height: 55px;
   }
   .audio-player.skin-twelve .audio-player-play-pause-btn.audio-player-primary-btn svg {
       width: 28px;
       height: 28px;
   }

   .audio-player.skin-twelve .audio-player-volume-slider {
       width: 150px;
   }
}