/* Gorillaz-Inspired Website Styles - Persian/RTL Version */

/* Vazir font is loaded asynchronously via <link> in base.njk */

:root {
  --primary-bg: #1a0f0f;  /* background color */
  --secondary-bg: #1a1a1a;
  --accent-color: #00d9ff;
  --accent-secondary: #ff006e;
  --accent-tertiary: #ffbe0b;
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --transition-speed: 0.3s;
  --font-persian: 'Vazir', 'Tahoma', 'Arial', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-persian);
  background-color: var(--primary-bg);
  /* background:
    linear-gradient(rgba(10, 10, 10, 0.7), rgba(10, 10, 10, 0.7)),
    url('../images/Safineh_1.JPG');
  background-size: cover;
  background-position: center;
  background-attachment: fixed; */
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  padding-bottom: 90px; /* Space for music player */
}

/* RTL Specific Styles */
[dir="rtl"] body {
  font-size: 1.05em; /* 5% larger for Persian readability */
  line-height: 1.8; /* More space for diacritics */
  direction: rtl;
  text-align: right;
}

/* Header & Navigation */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 50%, #3a3a3a 100%);
  z-index: 1000;
  padding: 0.7rem 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  border-bottom: 2px solid #c41e3a;
}

nav {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

/* RTL: Keep normal direction - HTML order already correct for display */

.nav-row-top {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.logo {
  font-size: 2rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent-color);
  text-decoration: none;
  transition: color var(--transition-speed);
}

/* RTL: Reduce letter spacing for Persian */
[dir="rtl"] .logo {
  letter-spacing: 0.5px;
  font-size: 2.2rem;
}

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

/* Dual Logo Support */
.logo-left,
.logo-right {
  text-decoration: none;
  transition: opacity var(--transition-speed), transform var(--transition-speed);
  display: flex;
  align-items: center;
  height: 50px;
  overflow: hidden;
}

.logo-left img,
.logo-right img {
  height: 100px;
  width: auto;
  object-fit: cover;
  object-position: center;
}

.logo-left:hover,
.logo-right:hover {
  opacity: 0.8;
  transform: scale(1.05);
}

/* RTL positioning handled by flex-direction: row-reverse on nav */

/* Logo inside nav-links - removed, logos are now in top row */

.nav-links {
  display: flex;
  gap: 0.8rem;
  list-style: none;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.nav-links a {
  color: #c0c0c0;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 1.3rem;
  background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
  border-radius: 20px;
  border: 1px solid #c41e3a;
  transition: all var(--transition-speed);
  position: relative;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* RTL: Adjust font size */
[dir="rtl"] .nav-links a {
  font-size: 0.95rem;
}

.nav-links a:hover {
  background: linear-gradient(135deg, #c41e3a 0%, #a01828 100%);
  color: #ffffff;
  border-color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(196, 30, 58, 0.5);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--text-primary);
  transition: all var(--transition-speed);
}

/* Main Content */
main {
  margin-top: 74px;
}

/* Banner Sections */
.banner {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 217, 255, 0.3), rgba(255, 0, 110, 0.3));
  opacity: 0;
  transition: opacity var(--transition-speed);
}

.banner:hover::before {
  opacity: 1;
}

.banner-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 2rem;
  max-width: 800px;
  transform: translateY(0);
  transition: transform var(--transition-speed);
}

.banner:hover .banner-content {
  transform: translateY(-20px);
}

.banner h1 {
  font-size: 5rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 5px;
  margin-bottom: 1rem;
  text-shadow: 0 0 20px rgba(0, 217, 255, 0.5);
}

/* RTL: Reduced letter spacing for Persian */
[dir="rtl"] .banner h1 {
  letter-spacing: 2px;
  font-size: 4.5rem;
}

.banner p {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

[dir="rtl"] .banner p {
  font-size: 1.6rem;
}

.banner-btn {
  display: inline-block;
  padding: 1rem 3rem;
  background-color: transparent;
  border: 2px solid var(--accent-color);
  color: var(--accent-color);
  text-decoration: none;
  text-transform: uppercase;
  font-weight: bold;
  letter-spacing: 2px;
  transition: all var(--transition-speed);
  position: relative;
  overflow: hidden;
}

/* RTL: Reduce letter spacing for buttons */
[dir="rtl"] .banner-btn {
  letter-spacing: 0.5px;
  padding: 1.2rem 3.5rem;
}

.banner-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background-color: var(--accent-color);
  transition: left var(--transition-speed);
  z-index: -1;
}

/* RTL: Button hover animation from right */
[dir="rtl"] .banner-btn::before {
  left: auto;
  right: -100%;
  transition: right var(--transition-speed);
}

.banner-btn:hover {
  color: var(--primary-bg);
}

.banner-btn:hover::before {
  left: 0;
}

/* RTL: Button hover animation completion */
[dir="rtl"] .banner-btn:hover::before {
  left: auto;
  right: 0;
}

/* Platform Links - Music Platform Icons */
.platform-links {
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  align-items: center;
  margin-top: 1.2rem;
  padding: 1.2rem;
  background: rgba(26, 26, 26, 0.6);
  border-radius: 12px;
  border: 2px solid rgba(0, 217, 255, 0.2);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.platform-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-secondary) 100%);
  border-radius: 12px;
  color: #ffffff;
  font-size: 1.7rem;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 6px 18px rgba(0, 217, 255, 0.4);
  position: relative;
  overflow: hidden;
}

.platform-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.platform-icon:hover::before {
  left: 100%;
}

.platform-icon:hover {
  transform: translateY(-10px) scale(1.1);
  box-shadow: 0 20px 50px rgba(0, 217, 255, 0.6), 0 0 30px rgba(255, 0, 110, 0.4);
  background: linear-gradient(135deg, var(--accent-secondary) 0%, var(--accent-tertiary) 100%);
}

.platform-icon i {
  transition: all 0.4s;
  z-index: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.platform-icon:hover i {
  transform: scale(1.2) rotate(5deg);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

/* Individual platform colors */
.platform-icon:nth-child(1) {
  background: linear-gradient(135deg, #1DB954 0%, #1ed760 100%);
}

.platform-icon:nth-child(2) {
  background: linear-gradient(135deg, #FA243C 0%, #ff5566 100%);
}

.platform-icon:nth-child(3) {
  background: linear-gradient(135deg, #FF0000 0%, #ff4444 100%);
}

.platform-icon:nth-child(4) {
  background: linear-gradient(135deg, #ff5500 0%, #ff7700 100%);
}

.platform-icon:nth-child(5) {
  background: linear-gradient(135deg, #E4405F 0%, #f77f9a 100%);
}

.platform-icon:nth-child(1):hover {
  box-shadow: 0 20px 50px rgba(29, 185, 84, 0.6), 0 0 30px rgba(29, 185, 84, 0.4);
}

.platform-icon:nth-child(2):hover {
  box-shadow: 0 20px 50px rgba(250, 36, 60, 0.6), 0 0 30px rgba(250, 36, 60, 0.4);
}

.platform-icon:nth-child(3):hover {
  box-shadow: 0 20px 50px rgba(255, 0, 0, 0.6), 0 0 30px rgba(255, 0, 0, 0.4);
}

.platform-icon:nth-child(4):hover {
  box-shadow: 0 20px 50px rgba(255, 85, 0, 0.6), 0 0 30px rgba(255, 85, 0, 0.4);
}

.platform-icon:nth-child(5):hover {
  box-shadow: 0 20px 50px rgba(228, 64, 95, 0.6), 0 0 30px rgba(228, 64, 95, 0.4);
}

/* Different banner backgrounds */
.banner-1 {
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
}

.banner-2 {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.banner-3 {
  background: linear-gradient(135deg, #16213e 0%, #0f3460 100%);
}

.banner-4 {
  background: linear-gradient(135deg, #0f3460 0%, #1a1a2e 100%);
}

/* Album Cover in Banner */
.banner-with-cover {
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 4rem;
  padding: 0 4rem;
}

.album-cover-container {
  position: relative;
  z-index: 10;
  flex-shrink: 0;
}

.album-cover {
  width: 400px;
  height: 400px;
  object-fit: contain;
  border-radius: 15px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
  background-color: #000;
}

.album-cover:hover {
  transform: scale(1.05) rotate(2deg);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.7);
}

.banner-with-cover .banner-content {
  text-align: right;
  max-width: 600px;
}

/* RTL: Adjust layout for Persian */
[dir="rtl"] .banner-with-cover .banner-content {
  text-align: right;
}

/* Content Sections */
.content-section {
  padding: 5rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.section-title {
  font-size: 3rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 3rem;
  text-align: center;
  color: var(--accent-color);
}

/* RTL: Reduce letter spacing for section titles */
[dir="rtl"] .section-title {
  letter-spacing: 1px;
  font-size: 3.2rem;
}

/* Grid Layouts */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background-color: var(--secondary-bg);
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--transition-speed);
  cursor: pointer;
}

.card:hover {
  transform: translateY(-10px);
  border-color: var(--accent-color);
  box-shadow: 0 10px 30px rgba(0, 217, 255, 0.3);
}

.card h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--accent-color);
}

.card p {
  color: var(--text-secondary);
  line-height: 1.8;
}

.card img {
  width: 100%;
  height: 250px;
  object-fit: contain;
  margin-bottom: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background-color: #000;
}

/* Gallery Styles */
.gallery-item {
  overflow: hidden;
}

.gallery-image {
  width: 100%;
  height: 400px;
  object-fit: contain;
  border-radius: 8px;
  border: 2px solid rgba(0, 217, 255, 0.3);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  margin-bottom: 1.5rem;
  background-color: #000;
}

.gallery-item:hover .gallery-image {
  transform: scale(1.05);
  border-color: var(--accent-color);
  box-shadow: 0 15px 40px rgba(0, 217, 255, 0.5), 0 0 30px rgba(255, 0, 110, 0.3);
}

/* Footer */
footer {
  background-color: var(--secondary-bg);
  padding: 3rem 2rem;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.social-links a {
  color: var(--text-primary);
  font-size: 1.5rem;
  transition: color var(--transition-speed);
}

.social-links a:hover {
  color: var(--accent-color);
}

footer p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
  /* Responsive logos for mobile/tablet */
  .logo-left,
  .logo-right {
    height: 35px;
  }

  .logo-left img,
  .logo-right img {
    height: 70px;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 60px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 60px);
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transition: left var(--transition-speed);
    border-top: 2px solid #c41e3a;
  }

  /* RTL: Mobile menu slides from right */
  [dir="rtl"] .nav-links {
    left: auto;
    right: -100%;
    transition: right var(--transition-speed);
  }

  .nav-links.active {
    left: 0;
  }

  /* RTL: Active state for mobile menu */
  [dir="rtl"] .nav-links.active {
    left: auto;
    right: 0;
  }

  /* Album cover responsive */
  .banner-with-cover {
    flex-direction: column;
    gap: 2rem;
    padding: 2rem 1rem;
    min-height: auto;
    height: auto;
    padding-top: 100px;
    padding-bottom: 3rem;
  }

  .album-cover {
    width: 300px;
    height: 300px;
  }

  .album-cover-container {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .banner-with-cover .banner-content {
    text-align: center;
  }

  /* Platform links responsive */
  .platform-links {
    gap: 0.8rem;
    padding: 1rem;
    flex-wrap: wrap;
  }

  .platform-icon {
    width: 42px;
    height: 42px;
    font-size: 1.3rem;
  }

  .banner h1 {
    font-size: 3rem;
  }

  .banner p {
    font-size: 1.2rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  /* Prevent horizontal scroll */
  body {
    overflow-x: hidden;
  }

  main {
    overflow-x: hidden;
  }

  .content-section {
    padding: 3rem 1rem;
    overflow-x: hidden;
  }

  /* Fix store page specific issues */
  .content-section > div {
    max-width: 100%;
    overflow-x: hidden;
  }

  .content-section .grid {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .banner-with-cover {
    padding-top: 80px;
  }

  .album-cover {
    width: 250px;
    height: 250px;
  }

  .banner h1 {
    font-size: 2rem;
    letter-spacing: 2px;
  }

  .banner p {
    font-size: 1rem;
  }

  .banner-btn {
    padding: 0.8rem 2rem;
    font-size: 0.9rem;
  }

  .platform-icon {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
  }

  .gallery-image {
    height: 300px;
  }

  /* Fix inline styled divs with max-width that cause scroll */
  .content-section > div[style*="max-width"] {
    max-width: 100% !important;
    padding: 0 1rem;
  }

  /* Fix grid template columns that have minmax */
  .grid[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  /* Fix two-column layouts (like Safineh album feature) */
  div[style*="display: grid"][style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  /* Fix flex layouts with gap that might overflow */
  div[style*="display: flex"] {
    flex-wrap: wrap !important;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.8s ease-out;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--primary-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-color);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-secondary);
}

/* ==================== MUSIC PLAYER STYLES ==================== */

.music-player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #181818 0%, #282828 100%);
  border-top: 1px solid rgba(0, 217, 255, 0.3);
  z-index: 999;
  padding: 0.8rem 1.5rem;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  direction: ltr !important;
}

.player-container {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 2rem;
  align-items: center;
  max-width: 1800px;
  margin: 0 auto;
  direction: ltr !important;
}

/* Track Info */
.track-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.album-art {
  width: 56px;
  height: 56px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.album-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.track-details {
  min-width: 0;
  flex: 1;
}

.track-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  direction: rtl;
  text-align: left;
}

.track-artist {
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  direction: rtl;
  text-align: left;
}

/* Player Controls */
.player-controls {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.control-buttons {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.control-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.5rem;
  font-size: 1rem;
  transition: all 0.2s ease;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}

.control-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

.play-btn {
  width: 42px;
  height: 42px;
  font-size: 1.2rem;
  background: var(--text-primary);
  color: var(--primary-bg);
}

.play-btn:hover {
  transform: scale(1.1);
  background: var(--accent-color);
  color: var(--primary-bg);
}

/* Progress Bar */
.progress-container {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
}

.time {
  font-size: 0.75rem;
  color: var(--text-secondary);
  min-width: 40px;
  text-align: center;
}

.progress-bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  position: relative;
  cursor: pointer;
  transition: height 0.2s ease;
  /* expand touch target without changing visual height */
  padding: 10px 0;
  margin: -10px 0;
  box-sizing: content-box;
  touch-action: none;
}

.progress-bar:hover,
.progress-bar.dragging {
  height: 6px;
}

.music-player.no-select {
  user-select: none;
  -webkit-user-select: none;
}

.progress {
  height: 100%;
  background: var(--accent-color);
  border-radius: 2px;
  position: relative;
  transition: width 0.1s linear;
  pointer-events: none;
}

.progress-handle {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translate(50%, -50%);
  width: 14px;
  height: 14px;
  background: var(--text-primary);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

.progress-bar:hover .progress-handle,
.progress-bar.dragging .progress-handle {
  opacity: 1;
}

/* Always show handle on touch devices */
@media (hover: none) {
  .progress-handle {
    opacity: 1;
    width: 16px;
    height: 16px;
  }
  .progress-bar {
    height: 6px;
  }
}

/* Volume and Playlist */
.player-extras {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.volume-slider {
  width: 100px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.volume-control:hover .volume-slider {
  opacity: 1;
  visibility: visible;
}

.volume-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}

.volume-fill {
  height: 100%;
  background: var(--accent-color);
  border-radius: 2px;
  width: 70%;
  transition: width 0.1s linear;
}

/* Playlist */
.playlist {
  position: absolute;
  bottom: 100%;
  right: 1.5rem;
  width: 350px;
  max-height: 400px;
  background: linear-gradient(135deg, #282828 0%, #181818 100%);
  border: 1px solid rgba(0, 217, 255, 0.3);
  border-radius: 8px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
  transform: translateY(20px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  overflow: hidden;
  direction: ltr;
}

.playlist.active {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.playlist-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  direction: rtl;
}

.playlist-header h3 {
  font-size: 1rem;
  color: var(--text-primary);
  margin: 0;
}

.close-playlist {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0.3rem;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.close-playlist:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

.playlist-items {
  max-height: 340px;
  overflow-y: auto;
}

.playlist-item {
  padding: 0.8rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: background 0.2s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  direction: ltr;
}

.playlist-item:hover {
  background: rgba(0, 217, 255, 0.1);
}

.playlist-item.active {
  background: rgba(0, 217, 255, 0.15);
  border-left: 3px solid var(--accent-color);
}

.playlist-item-art {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}

.playlist-item-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.playlist-item-info {
  flex: 1;
  min-width: 0;
}

.playlist-item-title {
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  direction: rtl;
  text-align: left;
}

.playlist-item-artist {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  direction: rtl;
  text-align: left;
}

.playlist-item-duration {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .music-player {
    padding: 0.6rem 1rem;
  }

  .player-container {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .track-info {
    grid-row: 2;
    justify-content: center;
  }

  .player-controls {
    grid-row: 1;
  }

  .player-extras {
    grid-row: 3;
    justify-content: center;
  }

  .playlist {
    right: 1rem;
    left: 1rem;
    width: auto;
  }

  .volume-slider {
    display: none;
  }
}

@media (max-width: 480px) {
  .album-art {
    width: 48px;
    height: 48px;
  }

  .track-title {
    font-size: 0.85rem;
  }

  .track-artist {
    font-size: 0.75rem;
  }

  .control-btn {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }

  .play-btn {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
  }

  .time {
    font-size: 0.7rem;
    min-width: 35px;
  }
}

/* ==================== ARTICLE STYLES ==================== */

/* Article Body Typography */
.article-body {
  font-size: 1.15rem;
  line-height: 2;
  color: var(--text-secondary);
}

.article-body h2 {
  font-size: 1.8rem;
  color: var(--accent-color);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.article-body h3 {
  font-size: 1.4rem;
  color: var(--accent-secondary);
  margin-top: 2rem;
  margin-bottom: 0.8rem;
}

.article-body p {
  margin-bottom: 1.5rem;
}

.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 2rem 0;
  border: 2px solid rgba(0, 217, 255, 0.2);
}

.article-body blockquote {
  border-right: 4px solid var(--accent-color);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: rgba(0, 217, 255, 0.05);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--text-primary);
}

.article-body a {
  color: var(--accent-color);
  text-decoration: underline;
  transition: color var(--transition-speed);
}

.article-body a:hover {
  color: var(--accent-secondary);
}

.article-body ul,
.article-body ol {
  padding-right: 2rem;
  margin-bottom: 1.5rem;
}

.article-body li {
  margin-bottom: 0.5rem;
}

.article-body code {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.95em;
}

.article-body pre {
  background: rgba(0, 0, 0, 0.4);
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.article-body pre code {
  background: none;
  padding: 0;
}

.article-body strong {
  color: var(--text-primary);
}

/* Articles Grid (listing page) */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
}

/* Article Card */
.article-card {
  background: var(--secondary-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
}

.article-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-color);
  box-shadow: 0 12px 40px rgba(0, 217, 255, 0.2);
}

.article-card:focus,
.article-card:focus-visible {
  transform: translateY(-6px);
  border-color: var(--accent-color);
  box-shadow: 0 12px 40px rgba(0, 217, 255, 0.2);
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

.article-card-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.article-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.article-card:hover .article-card-image img {
  transform: scale(1.08);
}

.article-card-content {
  padding: 1.5rem;
}

.article-card-content h3 {
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 0.8rem;
  line-height: 1.6;
}

.article-card-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.article-card-content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.article-card-category {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--primary-bg);
  background: var(--accent-color);
  padding: 0.15rem 0.7rem;
  border-radius: 20px;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

/* Articles responsive */
@media (max-width: 768px) {
  .articles-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .article-card-image {
    height: 180px;
  }

  .article-body {
    font-size: 1.05rem;
  }

  .article-body h2 {
    font-size: 1.5rem;
  }

  .article-body h3 {
    font-size: 1.2rem;
  }

  .article-body blockquote {
    padding: 0.8rem 1rem;
  }
}

/* About story rendered from markdown */
.about-story p { font-size: 1.2rem; line-height: 2; color: var(--text-secondary); margin-bottom: 2rem; }
