:root {
  --primary-color: #4cd7a5;
  --background-color: #e8f5f0;
  --text-color: #333;
  --card-background: rgba(255, 255, 255, 0.3);
  --hover-background: rgba(255, 255, 255, 0.5);
}

body {
  width: 100%;
  max-width: 100%;
  min-width: 320px;
  margin: 0 auto;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
}

.container {
  padding: clamp(12px, 3vw, 24px);
  max-width: 1200px;
  margin: 0 auto;
  animation: fadeIn 0.3s ease-in-out;
  margin-bottom: 16px;
}

.header {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  margin-bottom: clamp(16px, 4vw, 32px);
  padding: clamp(8px, 2vw, 16px);
  gap: clamp(8px, 2vw, 16px);
  position: relative;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  position: absolute;
  right: clamp(8px, 2vw, 16px);
  top: clamp(8px, 2vw, 16px);
}

.testimonials-btn {
  text-decoration: none;
  cursor: pointer;
  font-size: 1.2em;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.testimonials-btn:hover {
  text-decoration: none;
}

.language-section {
  display: flex;
  justify-content: center;
  margin: -8px 0 16px;
  padding: 0 16px;
  position: relative;
  z-index: 10;
}

.language-selector {
  appearance: none;
  background-color: var(--primary-color);
  color: white;
  padding: 8px 32px 8px 12px;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: background-color 0.3s ease, transform 0.2s ease;
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.language-selector:hover {
  background-color: #3fb892;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.language-selector:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(76, 215, 165, 0.3), 0 4px 8px rgba(0, 0, 0, 0.15);
}

.language-selector option {
  background-color: white;
  color: var(--text-color);
  padding: 8px;
}

/* RTL language support */
.language-selector option[value="ar"],
.language-selector option[value="ur"] {
  direction: rtl;
  text-align: right;
}

@media (max-width: 768px) {
  .language-section {
    margin: 0 0 16px;
    padding: 8px 16px;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .language-selector {
    width: 100%;
    max-width: 300px;
    padding: 10px 32px 10px 16px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .language-section {
    padding: 8px 12px;
  }

  .language-selector {
    max-width: 100%;
  }
}

.session-counter {
  background-color: var(--primary-color);
  color: white;
  padding: 12px 20px;
  border-radius: 50px;
  font-size: 18px;
}

.timer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.timer {
  font-size: clamp(2em, 5vw, 3.5em);
  font-weight: bold;
  color: #2ecc71;
  margin: 10px 0;
}

.timer-input {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  align-items: center;
}

.timer-input input {
  width: clamp(50px, 15vw, 80px);
  padding: 8px 5px;
  border: 2px solid #2ecc71;
  border-radius: 8px;
  text-align: center;
  font-size: 1.1em;
  background-color: rgba(46, 204, 113, 0.1);
  color: #2ecc71;
  transition: all 0.3s ease;
  font-weight: 500;
}

.timer-input input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.2);
  background-color: white;
}

.timer-input input:disabled {
  opacity: 0.7;
  background-color: rgba(46, 204, 113, 0.05);
  cursor: not-allowed;
}

.timer-input input::-webkit-inner-spin-button,
.timer-input input::-webkit-outer-spin-button {
  opacity: 1;
  height: 20px;
  cursor: pointer;
}

/* .timer-input::after {
  content: ':';
  color: #2ecc71;
  font-size: 1.5em;
  font-weight: bold;
  margin: 0 -5px;
} */

.timer-controls {
  display: flex;
  gap: 10px;
}

.timer-controls button {
  background: none;
  border: none;
  font-size: 1.5em;
  cursor: pointer;
  color: #2ecc71;
  padding: 5px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s;
}

.timer-controls button:hover {
  background-color: rgba(46, 204, 113, 0.1);
}

.refresh-btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sound-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(12px, 3vw, 24px);
}

.category {
  background-color: var(--card-background);
  border-radius: 12px;
  padding: 12px;
}

.category h3 {
  margin: 0 0 12px 0;
  font-size: 16px;
}

.sound-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: clamp(8px, 2vw, 16px);
}

.sound-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: var(--card-background);
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sound-option:hover {
  background-color: var(--hover-background);
  transform: translateY(-2px);
}

.sound-option.active {
  background-color: var(--primary-color);
  color: white;
}

.sound-option img {
  width: 24px;
  height: 24px;
  margin-bottom: 8px;
}

.sound-option span {
  font-size: 12px;
  text-align: center;
}

.active-sounds {
  margin-top: 16px;
  background-color: var(--card-background);
  border-radius: 12px;
  padding: 12px;
}

.active-sounds h3 {
  margin: 0 0 12px 0;
  font-size: 16px;
}

.sound-mixers {
  margin-top: 20px;
  display: none;
}

.sound-mixer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #f5f5f5;
  border-radius: 8px;
  margin-bottom: 8px;
}

.sound-mixer span {
  flex: 1;
  font-size: 14px;
}

.sound-mixer .volume-slider {
  flex: 2;
  height: 4px;
  -webkit-appearance: none;
  background: #ddd;
  border-radius: 2px;
}

.sound-mixer .volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: #2ecc71;
  border-radius: 50%;
  cursor: pointer;
}

.sound-mixer .remove-sound {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  padding: 4px 8px;
  font-size: 16px;
}

.sound-mixer .remove-sound:hover {
  color: #ff4444;
}

.timer-settings {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  animation: slideDown 0.3s ease;
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(46, 204, 113, 0.2);
}

.settings-header h3 {
  color: #2ecc71;
  margin: 0;
}

.close-settings {
  background: none;
  border: none;
  color: #95a5a6;
  font-size: 1.5em;
  cursor: pointer;
  padding: 5px;
  transition: color 0.3s;
}

.close-settings:hover {
  color: #7f8c8d;
}

.settings-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: #2ecc71;
  font-size: 1.5em;
  cursor: pointer;
  padding: 5px;
  transition: transform 0.3s ease;
  display: none;
}

.settings-btn:hover {
  transform: rotate(45deg);
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.setting-item:last-child {
  border-bottom: none;
}

.setting-item label {
  color: #666;
  font-size: 14px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .4s;
}

.slider.round {
  border-radius: 24px;
}

.slider.round:before {
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary-color);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.footer {
  padding: clamp(12px, 3vw, 24px);
  margin: 0 auto;
  max-width: 1200px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.footer .tabs {
  display: flex;
  gap: 8px;
  padding: 4px;
}

.footer .branding {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
}

.footer .tab {
  background: none;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  padding: 8px 16px;
  font-size: 14px;
  opacity: 0.7;
  transition: all 0.2s;
  border-radius: 6px;
}

.footer .tab:hover {
  opacity: 1;
  background-color: var(--card-background);
}

.footer .tab.active {
  opacity: 1;
  color: var(--primary-color);
  background-color: var(--card-background);
}

.branding {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.branding:hover {
  background: rgba(255, 255, 255, 0.2);
}

.brand-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.brand-name {
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-color);
  letter-spacing: 0.5px;
}

.tabs {
  display: flex;
  gap: 8px;
}

.tab {
  background: none;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.tab.active {
  background-color: var(--primary-color);
  color: white;
}

.settings-btn, .volume-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

input[type="range"] {
  -webkit-appearance: none;
  height: 4px;
  background: var(--primary-color);
  border-radius: 2px;
  width: 80px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: white;
  border-radius: 50%;
  cursor: pointer;
}

.sound-option .favorite-btn {
  display: none;  /* Hide all favorite buttons by default */
  background: none;
  border: none;
  color: #ccc;  /* Default gray color */
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  transition: transform 0.2s ease, color 0.2s ease;
}

/* Only show favorite buttons that are inside sound-option */
.sound-option .favorite-btn {
  display: inline-block;
}

.favorite-btn:hover {
  transform: scale(1.2);
}

.favorite-btn.active {
  color: #ffd700;  /* Yellow color when active */
}

/* Ensure no other favorite buttons appear outside sound-option */
.favorite-btn:not(.sound-option .favorite-btn) {
  display: none !important;
}

.content-sections {
  margin-top: 20px;
}

.section {
  padding: 15px;
  background: rgba(46, 204, 113, 0.1);
  border-radius: 8px;
  margin-bottom: 15px;
}

.section h3 {
  color: #2ecc71;
  margin-bottom: 15px;
}

.create-playlist {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.create-playlist input {
  flex: 1;
  padding: 8px;
  border: 2px solid #2ecc71;
  border-radius: 8px;
  background-color: white;
}

.create-playlist button {
  background: #2ecc71;
  border: none;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2em;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s;
}

.create-playlist button:hover {
  background-color: #27ae60;
}

.playlist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  background: white;
  border-radius: 8px;
  margin-bottom: 8px;
  border: 1px solid rgba(46, 204, 113, 0.2);
}

.playlist-item .playlist-name {
  font-weight: 500;
  color: #2c3e50;
}

.playlist-item .playlist-actions {
  display: flex;
  gap: 5px;
}

.playlist-item button {
  background: none;
  border: none;
  color: #2ecc71;
  cursor: pointer;
  padding: 5px;
  font-size: 1.1em;
}

.playlist-item button:hover {
  color: #27ae60;
}

.favorites-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.favorite-item {
  position: relative;
  padding: 15px;
  background: white;
  border-radius: 8px;
  text-align: center;
  border: 1px solid rgba(46, 204, 113, 0.2);
}

.favorite-item img {
  width: 30px;
  height: 30px;
  margin-bottom: 5px;
}

.favorite-item .remove-favorite {
  position: absolute;
  top: 5px;
  right: 5px;
  background: none;
  border: none;
  color: #e74c3c;
  cursor: pointer;
  font-size: 1.1em;
  padding: 5px;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* Update favorites tab styling */
.favorites-tab {
    padding: 16px;
}

.favorites-tab h3 {
    margin: 0 0 16px 0;
    color: var(--text-color);
    font-size: 18px;
}

.favorites-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

/* Update tab content visibility handling */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.session-state {
    font-size: 18px;
    font-weight: 500;
    color: var(--primary-color);
    padding: 12px 20px;
    border-radius: 50px;
    background: rgba(76, 215, 165, 0.1);
    transition: all 0.3s ease;
    min-width: 100px;
    text-align: center;
}

.session-state.flow {
    color: #2ecc71;
    background: rgba(46, 204, 113, 0.1);
    font-weight: 500;
}

.session-state.break {
    color: #3498db;
    background: rgba(52, 152, 219, 0.1);
    font-weight: 500;
}

.session-state.long-break {
    color: #9b59b6;
    background: rgba(155, 89, 182, 0.1);
    font-weight: 500;
}

/* Sound Selection Modal Styles */
.sound-selection-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
}

.sound-selection-modal .modal-content {
    background: white;
    border-radius: 12px;
    width: clamp(280px, 90%, 600px);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}

.sound-selection-modal .modal-header {
    padding: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sound-selection-modal .modal-header h3 {
    margin: 0;
    color: var(--text-color);
    font-size: 16px;
}

.sound-selection-modal .close-modal {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    padding: 4px 8px;
}

.sound-selection-modal .modal-body {
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sound-selection-modal .sound-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.sound-selection-modal .sound-checkbox:hover {
    background-color: rgba(76, 215, 165, 0.1);
}

.sound-selection-modal .sound-checkbox input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
}

.sound-selection-modal .sound-checkbox span {
    color: var(--text-color);
    font-size: 14px;
}

.sound-selection-modal .modal-footer {
    padding: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.sound-selection-modal .modal-footer button {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.sound-selection-modal .save-sounds {
    background-color: var(--primary-color);
    color: white;
}

.sound-selection-modal .save-sounds:hover {
    background-color: #27ae60;
}

.sound-selection-modal .cancel-sounds {
    background-color: #f5f5f5;
    color: var(--text-color);
}

.sound-selection-modal .cancel-sounds:hover {
    background-color: #e0e0e0;
}

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

/* Media Queries for larger screens */
@media (min-width: 768px) {
    .container {
        padding: 24px;
    }

    .header {
        justify-content: space-between;
    }

    .sound-section {
        display: grid;
        grid-template-columns: 250px 1fr;
        gap: 24px;
    }

    .sound-mixers {
        position: fixed;
        bottom: 24px;
        right: 24px;
        width: auto;
        max-width: 300px;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 32px;
    }

    .sound-categories {
        grid-template-columns: repeat(2, 1fr);
    }

    .timer-container {
        flex-direction: row;
        gap: 32px;
    }
}

/* Touch device optimizations */
@media (hover: none) {
    .sound-option {
        padding: clamp(12px, 3vw, 20px);
    }

    .timer-controls button {
        min-width: 48px;
        min-height: 48px;
    }

    .favorite-btn {
        padding: 12px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --background-color: #1a1a1a;
        --text-color: #ffffff;
        --card-background: rgba(255, 255, 255, 0.1);
        --hover-background: rgba(255, 255, 255, 0.15);
    }

    .timer-input input {
        background-color: rgba(46, 204, 113, 0.15);
    }
}

/* Print styles */
@media print {
    .sound-section,
    .sound-mixers,
    .timer-controls {
        display: none;
    }
}

/* Remove any styles that might be related to the header favorite button */
.header .favorite-btn {
    display: none; /* Add this to hide any existing header favorite buttons */
}

/* Remove any other favorite buttons that might appear outside sound-options */
.favorite-btn:not(.sound-option .favorite-btn) {
    display: none;
}

/* Hide any favorite buttons in the header */
.header button[class*="favorite"],
.header button[title*="Favorite"],
.header .favorite-btn {
    display: none !important;
}

/* Improve touch targets for mobile */
@media (max-width: 768px) {
    /* Make sound options easier to tap */
    .sound-option {
        position: relative;
        padding: 16px;
        padding-right: 70px; /* Make room for favorite button on the right */
        margin-bottom: 12px;
        background: var(--card-background);
        border-radius: 12px;
        display: flex;
        align-items: center;
    }

    .sound-option img {
        width: 32px;
        height: 32px;
        margin-right: 12px;
    }

    .sound-option span {
        flex: 1;
    }

    .sound-option .favorite-btn {
        position: absolute;
        right: 12px; /* Position on the right side */
        top: 50%; /* Center vertically */
        transform: translateY(-50%);
        width: 44px;
        height: 44px;
        background: var(--card-background);
        border-radius: 50%;
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        cursor: pointer;
        z-index: 5;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

    /* Active state styling */
    .sound-option .favorite-btn.active {
        color: #FFD700;
        background: var(--primary-color);
    }

    /* Visual feedback for touch */
    .sound-option .favorite-btn:active,
    .sound-option .favorite-btn.touch-active {
        transform: translateY(-50%) scale(0.95);
        opacity: 0.9;
    }

    /* Improve touch target area */
    .sound-option .favorite-btn::before {
        content: '';
        position: absolute;
        top: -8px;
        right: -8px;
        bottom: -8px;
        left: -8px;
        z-index: -1;
    }

    /* Make tab buttons more tappable */
    .tabs {
        display: flex;
        justify-content: space-between;
        width: 100%;
        gap: 8px;
        margin-bottom: 16px;
    }

    .tab {
        flex: 1;
        min-height: 44px; /* Apple's recommended minimum touch target size */
        padding: 12px 16px;
        font-size: 16px;
        border-radius: 8px;
        background: var(--card-background);
        border: none;
        color: var(--text-color);
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .tab.active {
        background: var(--primary-color);
        color: white;
        font-weight: 500;
    }

    .tab.touch-active {
        transform: scale(0.97);
        opacity: 0.9;
    }

    /* Add visual feedback for active state */
    .tab::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 3px;
        background: var(--primary-color);
        transform: scaleX(0);
        transition: transform 0.3s ease;
    }

    .tab.active::after {
        transform: scaleX(1);
    }

    /* Improve playlist button touch targets */
    .playlist-item {
        position: relative;
        display: flex;
        align-items: center;
        padding: 16px;
        margin-bottom: 12px;
        background: var(--card-background);
        border-radius: 8px;
        touch-action: manipulation;
    }

    .playlist-actions {
        display: flex;
        gap: 12px;
        margin-left: auto;
        z-index: 10; /* Increase z-index to ensure buttons are on top */
    }

    .playlist-actions button {
        position: relative;
        min-width: 48px; /* Slightly larger touch target */
        min-height: 48px;
        padding: 12px;
        margin: 0;
        border-radius: 8px;
        background: var(--card-background);
        border: none;
        font-size: 20px; /* Slightly larger font for better visibility */
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        isolation: isolate; /* Create new stacking context */
    }

    /* Add touch area padding */
    .playlist-actions button::before {
        content: '';
        position: absolute;
        top: -8px;
        right: -8px;
        bottom: -8px;
        left: -8px;
        z-index: -1;
    }
}

/* Support buttons in footer */
.support-links {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.support-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 24px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.coffee-btn {
    background-color: #FFDD00;
    color: #2D3436;
}

.about-btn {
    background-color: var(--primary-color);
    color: white;
}

/* Mobile optimization */
@media (max-width: 768px) {
    .support-links {
        width: 100%;
        justify-content: center;
    }

    .support-btn {
        flex: 1;
        max-width: 160px;
        font-size: 14px;
        padding: 12px 16px;
    }

    /* Touch feedback */
    .support-btn:active {
        transform: scale(0.95);
        opacity: 0.9;
    }
}

/* Hover effects (for non-touch devices) */
@media (hover: hover) {
    .coffee-btn:hover {
        background-color: #FFE83D;
        transform: translateY(-2px);
    }

    .about-btn:hover {
        background-color: #3DBE92;
        transform: translateY(-2px);
    }
}

/* Ad Section */
.ad-section {
    padding: 20px;
    margin: 20px 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.ad-container {
    max-width: 728px;
    margin: 0 auto;
}

/* Desktop default */
.ad-placeholder {
  width: 728px;
  height: 90px;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 2px dashed rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: flex;
  flex-direction: column;  /* Stack items vertically */
  align-items: center;
  justify-content: center;
  gap: 8px;  /* Add space between elements */
}

.ad-placeholder span {
  color: #ccc;  /* Default gray color */
  /* color: rgba(255, 255, 255, 0.3); */
  font-size: 14px;
}

.ad-placeholder div {
  /* color: rgba(255, 255, 255, 0.3); */
  color: #ccc;  /* Default gray color */
  font-size: 14px;
}

.ad-placeholder a {
  /* color: rgba(255, 255, 255, 0.3);  */
  color: #ccc;  /* Default gray color */
  text-decoration: none;
  transition: color 0.3s ease;
}

.ad-placeholder a:hover {
  color: rgba(255, 255, 255, 0.5);  /* Slightly brighter on hover */
}

/* Footer Updates */
.footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: transparent;
}

.support-links {
    display: flex;
    gap: 10px;
}

.legal-links {
    display: flex;
    gap: 15px;
    align-items: center;
}

.legal-links a {
    color: #2D3436;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.legal-links a:hover {
    color: #4cd7a5;
}

.separator {
    color: #2D3436;
}

.star-btn {
    font-size: 14px;
    padding: 8px 15px;
    background: linear-gradient(45deg, #FFD700, #FFA500);
    border: none;
    border-radius: 20px;
    color: #000;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.star-btn:hover {
    transform: scale(1.05);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.modal-content {
    background-color: var(--background-color);
    margin: 5% auto;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 80%;
    max-width: 800px;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.close {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-color);
}

.close:hover {
    color: var(--accent-color);
}

.about-content {
    padding: 20px;
}

.about-content h2 {
    color: var(--accent-color);
    margin-bottom: 20px;
    text-align: center;
}

.about-content section {
    margin-bottom: 30px;
}

.about-content h3 {
    color: var(--text-color);
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
}

.about-content p {
    line-height: 1.6;
    color: var(--text-color);
}

.about-content a {
    color: var(--accent-color);
    text-decoration: none;
}

.about-content a:hover {
    text-decoration: underline;
}

.attribution-list {
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.attribution-list p {
    margin: 8px 0;
    font-size: 0.9em;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .modal-content {
        margin: 10% auto;
        width: 90%;
        padding: 15px;
    }

    .about-content {
        padding: 10px;
    }

    .attribution-list {
        max-height: 150px;
    }
}

/* Testimonials Page Styles */
.testimonials-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.header h1 {
  margin: 0;
  display: inline-block;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}



.testimonial-card {
    max-width: 500px;
    width: 100%;
    background: white;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.testimonial-profile {
    margin-bottom: 16px;
}

.testimonial-profile img {
    width: 64px;
    height: 64px;
    border-radius: 32px;
    object-fit: cover;
}

.testimonial-name {
    font-size: 16px;
    color: #333;
    display: block;
    margin-bottom: 16px;
}

.testimonial-text {
    word-wrap: break-word;
    margin-bottom: 16px;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

.testimonial-source {
    font-size: 0.9em;
    color: #666;
}

.testimonial-source a {
    color: #007AFF;
    text-decoration: none;
}

.testimonial-source a:hover {
    text-decoration: none;
}
.back-btn {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  color: #333;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

