body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: #f7fafc;
}

:root {
  --accent-color: #34a853;
  --primary-color: #34a853;
  --primary-hover: #2d9147;
  --text-primary: #2d3748;
  --text-secondary: #4a5568;
  --background-color: #f7fafc;
  --border-color: #e2e8f0;
  --success-color: #48bb78;
  --warning-color: #f6ad55;
  --danger-color: #e53e3e;
  --max-content-width: 1200px;
  --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 -3px rgba(0, 0, 0, 0.1);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --card-background: #ffffff;
  --font-sm: 0.875rem;
  --font-md: 1rem;
  --font-lg: 1.25rem;
  --font-xl: 1.5rem;
  --spacing-xs: 0.5rem;
  --spacing-sm: 0.75rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--primary-color);
  margin-bottom: var(--spacing-lg);
  font-weight: 600;
  line-height: 1.4;
}

h1 {
  font-size: var(--font-xl);
}

/* Layout */
.page-container {
  width: 100%;
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: var(--spacing-xl);
  padding-top: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

/* Grid layouts */
.grid {
  display: grid;
  gap: var(--spacing-lg);
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  padding: var(--spacing-md) 0;
}

/* Card styles */
.card {
  background: var(--card-background);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-header {
  padding: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  border-bottom: 1px solid var(--border-color);
}

.card-content {
  padding: var(--spacing-lg);
  flex: 1;
}

.card-title {
  font-size: var(--font-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.card-meta {
  color: var(--text-secondary);
  font-size: var(--font-sm);
}

/* Navigation */
.nav-bar {
  position: sticky;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  padding: var(--spacing-md) 0;
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

.nav-bar:hover {
  box-shadow: var(--shadow-lg);
}

.nav-content {
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  flex-wrap: nowrap;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
}

.nav-links a:hover {
  color: var(--primary-color);
  background: rgba(52, 168, 83, 0.1);
}

.nav-links a.active {
  color: var(--primary-color);
  font-weight: 600;
  background: rgba(52, 168, 83, 0.1);
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #34a853, #4285f4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  transition: all 0.3s ease;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 0.5rem 0;
}

.nav-brand:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* User profile styles */
.user-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  margin-left: 0.5rem;
  position: relative;
}

.user-profile:hover {
  background: rgba(52, 168, 83, 0.1);
}

.user-profile img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-color);
  transition: all 0.2s ease;
}

.user-profile:hover img {
  transform: scale(1.05);
  box-shadow: var(--shadow-sm);
}

.user-profile .user-name {
  color: var(--text-primary);
  font-weight: 500;
  font-size: var(--font-sm);
}

.user-profile .user-details {
  display: flex;
  align-items: center;
}

/* Sign in button styles */
.sign-in-button {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  background: transparent;
  text-decoration: none;
  transition: all 0.2s ease;
  margin-left: 0.5rem;
}

.sign-in-button:hover {
  background: rgba(52, 168, 83, 0.1);
}

.sign-in-button .sign-in-text {
  color: var(--primary-color);
  font-weight: 500;
  font-size: var(--font-sm);
}

.sign-in-button:hover .sign-in-text {
  color: var(--primary-hover);
}

/* Dropdown menu styles */
.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  z-index: 1000;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.dropdown-item {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: var(--font-sm);
}

.dropdown-item:hover {
  background: rgba(52, 168, 83, 0.1);
  color: var(--primary-color);
}

.dropdown-item:not(:last-child) {
  border-bottom: 1px solid var(--border-color);
}

/* Button styles */
.btn-primary {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: rgba(52, 168, 83, 0.1);
  transform: translateY(-1px);
}

.btn-danger {
  background: transparent;
  color: var(--danger-color);
  border: 1px solid var(--danger-color);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-danger:hover {
  background: var(--danger-color);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Loading spinner */
.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

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

.text-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.flex-center {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-column {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  :root {
    --spacing-xl: 1rem;
    --spacing-lg: 1rem;
    --spacing-md: 0.75rem;
    --spacing-sm: 0.5rem;
    --spacing-xs: 0.25rem;
  }

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

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

  .nav-links {
    gap: var(--spacing-sm);
  }

  .nav-links a {
    padding: var(--spacing-xs) var(--spacing-sm);
  }

  .grid {
    gap: var(--spacing-md);
  }
}

/* Add these styles after the existing nav-bar styles */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

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

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: white;
    padding: var(--spacing-md);
    box-shadow: var(--shadow-md);
    gap: var(--spacing-sm);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    padding: var(--spacing-sm);
    width: 100%;
    text-align: center;
  }

  .user-profile {
    margin: 0;
    width: 100%;
    justify-content: center;
  }

  .sign-in-button {
    margin: 0;
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .welcome-container {
    padding: 10px;
  }
  .hero-section h1 {
    margin-bottom: 10px;
  }
  .hero-section .tagline,
  .hero-section .description,
  .hero-section .highlight-text {
    margin-bottom: 10px;
  }
  .feature-card {
    margin-bottom: 10px;
  }
  .sign-in-button {
    margin: 5px 0;
  }
}

@media (max-width: 768px) {
  .hero-image {
    max-width: 100%;
    height: auto;
  }
}

@media (max-width: 768px) {
  .welcome-container,
  .features-grid {
    width: 100%;
    box-sizing: border-box;
  }
}

/* Add these styles for the welcome page */
@media (max-width: 768px) {
  .welcome-container {
    padding: var(--spacing-md);
  }

  .hero-section {
    text-align: center;
  }

  .hero-section h1 {
    font-size: 2rem;
    line-height: 1.3;
  }

  .hero-section .tagline {
    font-size: 1.125rem;
  }

  .hero-image {
    width: 100%;
    max-width: 300px;
    height: auto;
    margin: var(--spacing-lg) 0;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
  }

  .feature-card {
    padding: var(--spacing-md);
  }

  .feature-card h3 {
    font-size: 1.25rem;
  }

  .feature-card ul {
    padding-left: var(--spacing-md);
  }

  .sign-in-button {
    width: 100%;
    max-width: 300px;
    margin: var(--spacing-md) auto;
  }

  .description,
  .highlight-text {
    font-size: 1rem;
    padding: 0 var(--spacing-sm);
  }
}

/* Add styles for even smaller screens */
@media (max-width: 480px) {
  .hero-section h1 {
    font-size: 1.75rem;
  }

  .hero-section .tagline {
    font-size: 1rem;
  }

  .feature-card {
    padding: var(--spacing-sm);
  }
}

/* Welcome page specific button styles */
.welcome-container .sign-in-button {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: all 0.2s ease;
  border: none;
  text-align: center;
}

.welcome-container .sign-in-button:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

@media (max-width: 768px) {
  .welcome-container .sign-in-button {
    display: block;
    width: calc(100% - 2rem);
    max-width: 300px;
    margin: var(--spacing-md) auto;
  }
}

.success-message {
  background-color: var(--success-color);
  color: white;
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  margin: var(--spacing-md) 0;
  animation: fadeIn 0.3s ease-in;
}

.error-message {
  background-color: var(--danger-color);
  color: white;
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  margin: var(--spacing-md) 0;
  animation: fadeIn 0.3s ease-in;
}

.error-message .btn-link {
  color: white;
  text-decoration: underline;
  font-weight: 600;
}

.error-message .btn-link:hover {
  opacity: 0.9;
}

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

.footer {
  margin-top: auto;
  padding: var(--spacing-lg) var(--spacing-md);
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.footer-content {
  max-width: 600px;
  margin: 0 auto;
}

.footer p {
  color: var(--text-secondary);
  margin-bottom: var(--spacing-sm);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  align-items: center;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--primary-color);
}

.footer-links .separator {
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .footer {
    padding: var(--spacing-md) var(--spacing-sm);
  }

  .footer-links {
    gap: var(--spacing-sm);
  }
}

.youtube-color {
  color: #ff0000;
}

@media (min-width: 769px) {
  /* Target desktop screen sizes */
  .hero-section {
    display: flex; /* Enable flexbox for easy centering */
    flex-direction: column; /* Keep vertical stacking */
    align-items: center; /* Center horizontally */
    text-align: center; /* Center text within the section */
  }

  .hero-section h1 {
    text-align: center; /* Ensure title is centered */
  }

  .hero-image {
    display: block; /* Makes the image a block element */
    margin: 2rem auto; /* Centers the image horizontally */
    max-width: 80%; /* Adjust max-width as needed */
  }
}

.playlist-grid {
  display: flex; /* Use flexbox for mobile */
  flex-wrap: wrap; /* Allow items to wrap onto multiple lines */
  justify-content: center; /* Center items horizontally */
  gap: 20px; /* Adjust spacing between cards */
}

.playlist-card {
  flex: 1 0 250px; /* Each card takes 250px minimum width, and grows proportionally */
  max-width: 350px; /* Maximum width to prevent overflow */
  box-sizing: border-box; /* Include padding and border in the element's total width */
}

@media (min-width: 768px) {
  /* Adjust breakpoint as needed */
  .playlist-grid {
    display: grid; /* Use grid for larger screens */
    grid-template-columns: repeat(
      auto-fit,
      minmax(250px, 300px)
    ); /* Adjust as needed */
    gap: 30px;
  }
  .playlist-card {
    flex: none; /* Reset flex properties for grid layout */
  }
}

.explore-container {
  padding: 0;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

@media (max-width: 767px) {
  /* Adjust breakpoint as needed */
  .explore-container {
    padding: 0;
  }
}
