@import url('fonts.css');

:root {
  --primary: #60744F;
  --primary-hover: #4F613F;
  --dark: #2F3A29;
  --bg-color: #F7F4EC;
  --secondary: #B89B5E;
  --text-color: #2B2B2B;
  --cards-color: #FFFFFF;
  --font-family: 'Cairo', sans-serif;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.12);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-color);
  direction: rtl;
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: var(--font-family);
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
}

/* Background Utility */
.full-page-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  object-fit: cover;
  pointer-events: none;
}

.bg-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(47, 58, 41, 0.45) 0%, rgba(247, 244, 236, 0.3) 100%);
  z-index: -1;
  pointer-events: none;
}

/* Common Header Styles */
.site-header {
  background: rgba(47, 58, 41, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 2px solid var(--secondary);
  box-shadow: var(--shadow-md);
}

.header-container {
  max-width: 1400px;
  /* Increased width to support single line layout */
  margin: 0 auto;
  padding: 0.75rem 2rem;
  /* Reduced height padding */
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  font-size: 1.45rem;
  /* Reduced from 1.8rem */
  font-weight: 900;
  color: var(--bg-color);
  letter-spacing: 0.5px;
  white-space: nowrap;
  display: flex;
  align-items: center;
}

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

.logo-img {
  height: 52px;
  width: 52px;
  object-fit: contain;
  border-radius: 50%;
  background-color: #ffffff;
  padding: 2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: var(--transition);
}

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

/* Navigation & Dropdowns */
.nav-menu {
  display: flex;
  list-style: none;
  gap: 0.65rem;
  /* Reduced from 1.5rem to ensure it fits in a single line */
  align-items: center;
}

.nav-item {
  position: relative;
}

.nav-link {
  color: var(--bg-color);
  font-weight: 700;
  font-size: 0.85rem;
  /* Reduced slightly */
  padding: 0.4rem 0.65rem;
  /* Reduced padding from 0.5rem 1rem */
  border-radius: var(--radius-sm);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.2rem;
  white-space: nowrap;
  /* Prevent nav items from wrapping */
}

.nav-link:hover,
.nav-item.active .nav-link {
  color: var(--secondary);
  background: rgba(255, 255, 255, 0.05);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--dark);
  border: 1px solid var(--secondary);
  border-radius: var(--radius-sm);
  min-width: 170px;
  width: max-content;
  max-width: 240px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  box-shadow: var(--shadow-lg);
  padding: 0.4rem 0;
  list-style: none;
  z-index: 1010;
}

.nav-item:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Align last 3 dropdown menus to the left so they expand to the right and don't cut off on the left edge */
.nav-item:nth-last-child(-n+3) .dropdown-menu {
  right: auto;
  left: 0;
}

.dropdown-item a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--bg-color);
  font-weight: 500;
  font-size: 0.85rem;
  transition: var(--transition);
  white-space: normal;
  line-height: 1.4;
}

.dropdown-item a:hover {
  background: var(--primary);
  color: #fff;
  padding-right: 1.25rem;
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 30px;
  background: none;
}

.mobile-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--bg-color);
  border-radius: 2px;
  transition: var(--transition);
}

/* Button Component */
.btn-primary {
  background-color: var(--primary);
  color: #fff;
  padding: 0.7rem 2rem;
  /* Reduced padding */
  font-size: 0.95rem;
  /* Reduced from 1.1rem */
  font-weight: 700;
  border-radius: 50px;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.btn-primary:active {
  transform: translateY(-1px);
}

/* Landing Page (index.html) */
.landing-body {
  height: 100vh;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  position: relative;
}

.landing-header {
  text-align: center;
  margin-top: 5vh;
  color: #fff;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.landing-logo-container {
  margin-bottom: 1.5rem;
}

.landing-logo {
  width: 200px;
  height: 200px;
  object-fit: contain;
  border-radius: 50%;
  background-color: #ffffff;
  padding: 6px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  transition: var(--transition);
}

.landing-logo:hover {
  transform: scale(1.05);
}

.landing-header h1 {
  font-size: 2.8rem;
  /* Reduced from 3.5rem */
  font-weight: 900;
  margin-bottom: 1rem;
}

.landing-header p {
  font-size: 1.2rem;
  /* Reduced from 1.5rem */
  color: var(--bg-color);
  font-weight: 400;
}

.landing-cta {
  margin-bottom: 12vh;
}

/* Main Portal Page (main.html) */
.main-portal-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 4rem 2rem;
  text-align: center;
}

.portal-glass-panel {
  background: rgba(247, 244, 236, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 3rem 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 800px;
  width: 100%;
}

.portal-glass-panel h2 {
  font-size: 1.8rem;
  /* Reduced from 2.2rem */
  color: var(--dark);
  font-weight: 900;
  margin-bottom: 1rem;
}

.portal-glass-panel p {
  font-size: 0.95rem;
  /* Reduced from 1.1rem */
  color: var(--text-color);
  line-height: 1.8;
  margin-bottom: 2rem;
}

/* Generic Layout for Inner Pages */
.inner-page-layout {
  flex: 1;
  display: flex;
  max-width: 1300px;
  width: 100%;
  margin: 2rem auto;
  gap: 2rem;
  padding: 0 2rem;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius-md);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.5);
  height: fit-content;
  position: sticky;
  top: 100px;
}

.sidebar-title {
  font-size: 1.15rem;
  /* Reduced from 1.3rem */
  font-weight: 900;
  color: var(--dark);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--secondary);
}

.sidebar-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sidebar-item button,
.sidebar-item a {
  display: block;
  width: 100%;
  text-align: right;
  padding: 0.7rem 1rem;
  /* Reduced padding */
  border-radius: var(--radius-sm);
  color: var(--text-color);
  font-weight: 700;
  font-size: 0.85rem;
  /* Reduced from 0.95rem */
  background: rgba(255, 255, 255, 0.5);
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.sidebar-item button:hover,
.sidebar-item a:hover,
.sidebar-item.active button,
.sidebar-item.active a {
  background-color: var(--primary);
  color: #fff;
  border-color: var(--primary);
  padding-right: 1.5rem;
}

/* Main Area Content */
.main-content-panel {
  flex: 1;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.5);
  min-height: 500px;
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.content-title {
  font-size: 1.5rem;
  /* Reduced from 1.8rem */
  font-weight: 900;
  color: var(--dark);
}

/* Back Button */
.btn-back {
  background: var(--bg-color);
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-back:hover {
  background: var(--primary);
  color: #fff;
  transform: translateX(-3px);
}

/* Video Grid and Cards */
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.video-card {
  background: var(--cards-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
}

.video-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.video-thumbnail-container {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  /* 16:9 Aspect Ratio */
  background-color: var(--dark);
}

.video-thumbnail {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(47, 58, 41, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0.8;
  transition: var(--transition);
}

.video-card:hover .play-overlay {
  background: rgba(47, 58, 41, 0.6);
  opacity: 1;
}

.play-btn-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  border: 2px solid #fff;
}

.video-card:hover .play-btn-circle {
  background: var(--secondary);
  transform: scale(1.1);
}

.video-info {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.video-title {
  font-size: 1rem;
  /* Reduced from 1.1rem */
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.video-desc {
  font-size: 0.82rem;
  /* Reduced from 0.9rem */
  color: var(--text-color);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex: 1;
}

.video-action-btn {
  background: var(--primary);
  color: #fff;
  width: 100%;
  padding: 0.7rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.85rem;
  /* Reduced from 0.95rem */
  text-align: center;
  transition: var(--transition);
}

.video-action-btn:hover {
  background: var(--primary-hover);
}

/* Global Footer */
.site-footer {
  background: var(--dark);
  color: var(--bg-color);
  padding: 1.2rem 2rem;
  /* Slightly reduced padding */
  text-align: center;
  font-weight: 500;
  font-size: 0.85rem;
  /* Reduced from 0.95rem */
  border-top: 4px solid var(--secondary);
  margin-top: auto;
}

.site-footer p span {
  color: var(--secondary);
  font-weight: 700;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(47, 58, 41, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Video Player Modal Box */
.video-modal-content {
  background: var(--dark);
  border: 2px solid var(--secondary);
  border-radius: var(--radius-md);
  width: 90%;
  max-width: 1050px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
  transform: scale(0.85);
  transition: var(--transition);
}

.modal-overlay.active .video-modal-content {
  transform: scale(1);
}

.close-modal-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  z-index: 2100;
  transition: var(--transition);
}

.close-modal-btn:hover {
  background: var(--secondary);
  color: var(--dark);
}

.video-wrapper {
  position: relative;
  padding-top: 56.25%;
  /* 16:9 */
}

.video-wrapper video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  background: #ffffff;
}

.video-wrapper .audio-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: var(--cards-color, #2f3a29);
  padding: 2rem;
  text-align: center;
}

.video-wrapper .audio-container .audio-icon {
  font-size: 3.5rem;
  color: var(--secondary);
  margin-bottom: 1rem;
}

.video-wrapper .audio-container .audio-title {
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.video-wrapper .audio-container audio {
  width: 90%;
  max-width: 500px;
  outline: none;
}

/* Audio Playlist Player Styles (Inline & Modal) */
.inline-audio-wrapper {
  width: 100%;
  margin-top: 1rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--secondary);
  background: var(--dark);
}

.video-modal-content.audio-mode {
  max-width: 950px;
  background: #1e251a;
  border: 2px solid var(--secondary);
}

.video-modal-content.audio-mode .video-wrapper {
  padding-top: 0 !important;
  height: auto !important;
  min-height: 480px;
  position: relative;
  overflow: hidden;
}

.audio-playlist-player {
  display: flex;
  flex-direction: row-reverse;
  width: 100%;
  min-height: 480px;
  background: linear-gradient(135deg, #222c1d 0%, #171d14 100%);
  color: #ffffff;
  font-family: var(--font-family);
}

/* Main Player Panel */
.player-main-panel {
  flex: 1.3;
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-left: 1px solid rgba(184, 155, 94, 0.2);
  background: rgba(0, 0, 0, 0.15);
  position: relative;
}

/* Artwork / Visualizer */
.artwork-container {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, #3a4733 0%, #222b1d 100%);
  border: 3px solid var(--secondary);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), 0 0 15px rgba(184, 155, 94, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.2rem;
  position: relative;
  overflow: hidden;
}

.disc-art {
  font-size: 2.8rem;
  color: var(--secondary);
  transition: transform 0.5s ease;
}

.player-main-panel.playing .disc-art {
  animation: spinDisc 8s linear infinite;
}

@keyframes spinDisc {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.equalizer-bars {
  position: absolute;
  bottom: 12px;
  display: flex;
  gap: 4px;
  align-items: flex-end;
  height: 22px;
  opacity: 0.3;
  transition: opacity 0.3s ease;
}

.player-main-panel.playing .equalizer-bars {
  opacity: 0.85;
}

.equalizer-bars .bar {
  width: 3px;
  background: var(--secondary);
  border-radius: 2px;
  height: 4px;
}

.player-main-panel.playing .equalizer-bars .bar:nth-child(1) {
  animation: eqAnim 0.8s ease-in-out infinite alternate;
}

.player-main-panel.playing .equalizer-bars .bar:nth-child(2) {
  animation: eqAnim 1.1s ease-in-out infinite alternate 0.2s;
}

.player-main-panel.playing .equalizer-bars .bar:nth-child(3) {
  animation: eqAnim 0.7s ease-in-out infinite alternate 0.4s;
}

.player-main-panel.playing .equalizer-bars .bar:nth-child(4) {
  animation: eqAnim 1.3s ease-in-out infinite alternate 0.1s;
}

.player-main-panel.playing .equalizer-bars .bar:nth-child(5) {
  animation: eqAnim 0.9s ease-in-out infinite alternate 0.3s;
}

@keyframes eqAnim {
  0% {
    height: 4px;
  }

  100% {
    height: 18px;
  }
}

/* Track Info */
.track-info {
  text-align: center;
  margin-bottom: 1.2rem;
  width: 100%;
  padding: 0 1rem;
}

.active-track-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.3rem;
  line-height: 1.4;
  word-break: break-word;
}

.active-track-desc {
  font-size: 0.88rem;
  color: var(--secondary);
  opacity: 0.9;
}

/* Progress Slider Area */
.progress-area {
  width: 100%;
  max-width: 440px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.3rem;
  font-size: 0.85rem;
  color: #cccccc;
}

.progress-bar-wrapper {
  flex: 1;
  position: relative;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
}

.audio-progress-slider {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
}

.progress-fill {
  height: 100%;
  background: var(--secondary);
  border-radius: 10px;
  width: 0%;
  transition: width 0.1s linear;
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: #ffffff;
  border: 2px solid var(--secondary);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}

/* Controls Row */
.controls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 1.3rem;
}

.control-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #e0e0e0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.control-btn:hover {
  background: rgba(184, 155, 94, 0.25);
  color: #ffffff;
  border-color: var(--secondary);
  transform: translateY(-2px);
}

.control-btn.play-pause-btn {
  width: 56px;
  height: 56px;
  background: var(--secondary);
  color: var(--dark);
  border: none;
  box-shadow: 0 4px 15px rgba(184, 155, 94, 0.4);
}

.control-btn.play-pause-btn:hover {
  transform: scale(1.08);
  background: #cbb073;
  color: var(--dark);
}

.control-btn.active-mode {
  color: var(--secondary);
  border-color: var(--secondary);
  background: rgba(184, 155, 94, 0.15);
}

.repeat-btn {
  width: auto;
  border-radius: 20px;
  padding: 0 12px;
  gap: 6px;
  height: 38px;
}

.repeat-badge {
  font-size: 0.75rem;
  font-weight: 600;
}

/* Secondary Controls (Volume & Speed) */
.secondary-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 440px;
  padding: 0 0.5rem;
  gap: 15px;
}

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

.mute-btn {
  color: #bbbbbb;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.mute-btn:hover {
  color: var(--secondary);
}

.volume-slider {
  flex: 1;
  max-width: 110px;
  accent-color: var(--secondary);
  height: 4px;
  cursor: pointer;
}

.speed-select {
  background: rgba(0, 0, 0, 0.4);
  color: #dddddd;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 0.8rem;
  font-family: var(--font-family);
  outline: none;
  cursor: pointer;
}

.speed-select:hover {
  border-color: var(--secondary);
}

/* Playlist Sidebar Panel */
.playlist-sidebar-panel {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  max-height: 520px;
}

.playlist-header {
  padding: 1.2rem 1.5rem;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.playlist-header h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.playlist-count {
  font-size: 0.8rem;
  background: rgba(184, 155, 94, 0.2);
  color: var(--secondary);
  padding: 2px 8px;
  border-radius: 12px;
}

.playlist-items-list {
  list-style: none;
  overflow-y: auto;
  flex: 1;
  padding: 0.5rem;
}

.playlist-items-list::-webkit-scrollbar {
  width: 6px;
}

.playlist-items-list::-webkit-scrollbar-thumb {
  background: rgba(184, 155, 94, 0.4);
  border-radius: 3px;
}

.playlist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 4px;
  border: 1px solid transparent;
}

.playlist-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.playlist-item.active {
  background: rgba(184, 155, 94, 0.15);
  border-color: rgba(184, 155, 94, 0.3);
}

.item-index {
  font-size: 0.85rem;
  color: #888888;
  width: 20px;
  text-align: center;
  font-weight: 600;
}

.playlist-item.active .item-index {
  color: var(--secondary);
}

.item-details {
  flex: 1;
  overflow: hidden;
}

.item-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #e6e6e6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.playlist-item.active .item-title {
  color: var(--secondary);
}

.item-desc {
  font-size: 0.78rem;
  color: #a0a0a0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.item-playing-icon {
  display: none;
  color: var(--secondary);
  font-size: 0.9rem;
}

.playlist-item.active.playing .item-playing-icon {
  display: block;
  animation: bouncePlaying 0.6s infinite alternate;
}

@keyframes bouncePlaying {
  0% {
    transform: scale(0.9);
  }

  100% {
    transform: scale(1.2);
  }
}

/* Responsive Audio Modal */
@media (max-width: 768px) {
  .audio-playlist-player {
    flex-direction: column;
    max-height: 80vh;
    overflow-y: auto;
  }

  .player-main-panel {
    border-left: none;
    border-bottom: 1px solid rgba(184, 155, 94, 0.2);
    padding: 1.5rem 1rem;
  }

  .playlist-sidebar-panel {
    max-height: 250px;
  }
}

/* Square Notification Styles */
.notif-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(47, 58, 41, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 3000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.notif-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.notif-box {
  background: var(--cards-color);
  border: 4px solid var(--secondary);
  width: 320px;
  height: 320px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  transform: translateY(30px);
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.notif-overlay.active .notif-box {
  transform: translateY(0);
}

.notif-icon {
  font-size: 3rem;
  color: var(--primary);
}

.notif-content {
  font-size: 0.95rem;
  /* Reduced from 1.1rem */
  color: var(--text-color);
  font-weight: 700;
  line-height: 1.6;
  margin: 1rem 0;
}

.btn-close-notif {
  background: var(--primary);
  color: #fff;
  padding: 0.55rem 2rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.85rem;
  /* Reduced from 0.95rem */
  width: 100%;
  transition: var(--transition);
}

.btn-close-notif:hover {
  background: var(--primary-hover);
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.video-card {
  animation: fadeIn 0.5s ease forwards;
}

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

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

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

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

/* Responsive Design */

/* Medium/Laptop Screens Optimization to prevent header overflow */
@media (min-width: 1025px) and (max-width: 1280px) {
  .header-container {
    padding: 0.75rem 1rem;
  }

  .logo a {
    font-size: 1.2rem;
  }

  .nav-menu {
    gap: 0.4rem;
  }

  .nav-link {
    font-size: 0.78rem;
    padding: 0.35rem 0.5rem;
    gap: 0.15rem;
  }
}

@media (max-width: 1024px) {
  .inner-page-layout {
    flex-direction: column;
    padding: 0 1rem;
  }

  .sidebar {
    width: 100%;
    position: static;
    margin-bottom: 1rem;
  }

  .landing-header h1 {
    font-size: 2.2rem;
  }

  .landing-header p {
    font-size: 1.1rem;
  }

  .mobile-toggle {
    display: flex;
  }

  /* Animated Hamburger Menu */
  .mobile-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  
  .mobile-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .mobile-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--dark);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    border-bottom: 0 solid var(--secondary);
    z-index: 9999;
  }

  .nav-menu.active {
    max-height: 500px;
    border-bottom: 2px solid var(--secondary);
    overflow-y: auto;
  }

  .nav-item {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .nav-link {
    padding: 1rem 2rem;
    border-radius: 0;
    justify-content: space-between;
  }

  .dropdown-menu {
    position: static;
    width: 100%;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: rgba(0, 0, 0, 0.15);
    border: none;
    border-radius: 0;
    max-height: 0;
    overflow: hidden;
    padding: 0;
    transition: max-height 0.3s ease;
  }

  .nav-item.open-dropdown .dropdown-menu {
    max-height: 400px;
    overflow-y: auto;
  }

  .dropdown-item a {
    padding: 0.75rem 3rem 0.75rem 1.25rem;
  }

  .site-header {
    position: sticky;
  }

  .video-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  /* Landing page tweaks */
  .landing-body {
    min-height: 100vh;
    min-height: 100dvh;
    height: auto;
    padding: 1.5rem 1rem;
    gap: 2rem;
    overflow-y: auto;
  }

  .landing-logo {
    width: 130px;
    height: 130px;
    padding: 4px;
  }

  .landing-header {
    margin-top: 2vh;
  }

  .landing-header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
  }

  .landing-header p {
    font-size: 1rem;
  }

  .landing-cta {
    margin-bottom: 4vh;
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .landing-cta .btn-primary {
    width: 100%;
    max-width: 280px;
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }

  /* Portal Glass Panel tweaks */
  .main-portal-content {
    padding: 2rem 1rem;
  }

  .portal-glass-panel {
    padding: 2rem 1rem;
    border-radius: var(--radius-md);
  }

  .portal-glass-panel h2 {
    font-size: 1.4rem;
  }

  .portal-glass-panel p {
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
  }

  /* Sidebar transformed to horizontal scrolling bar on mobile */
  .sidebar {
    width: 100%;
    position: static;
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: var(--radius-md);
  }

  .sidebar-title {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    text-align: center;
  }

  .sidebar-menu {
    flex-direction: row;
    overflow-x: auto;
    white-space: nowrap;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .sidebar-menu::-webkit-scrollbar {
    height: 4px;
  }

  .sidebar-menu::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 2px;
  }

  .sidebar-item {
    flex: 0 0 auto;
    width: auto;
  }

  .sidebar-item button,
  .sidebar-item a {
    display: inline-block;
    width: auto;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    text-align: center;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    border: 1px solid rgba(0, 0, 0, 0.05);
  }

  .sidebar-item button:hover,
  .sidebar-item a:hover,
  .sidebar-item.active button,
  .sidebar-item.active a {
    padding-right: 1rem;
    background-color: var(--primary);
    color: #fff;
    border-color: var(--primary);
  }

  /* Video Grid standard mobile layouts */
  .video-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  /* Modal responsive wrapper */
  .video-modal-content {
    width: 95%;
    border-radius: var(--radius-sm);
  }
}

@media (max-width: 480px) {
  /* Extra small screens / small phones */
  .landing-logo {
    width: 100px;
    height: 100px;
  }

  .landing-header h1 {
    font-size: 1.5rem;
  }

  .landing-header p {
    font-size: 0.85rem;
  }

  /* Audio player panel styling tweaks to fit small widths */
  .artwork-container {
    width: 90px;
    height: 90px;
    margin-bottom: 0.75rem;
  }

  .disc-art {
    font-size: 2.2rem;
  }

  .active-track-title {
    font-size: 1.1rem;
  }

  .active-track-desc {
    font-size: 0.8rem;
  }

  .controls-row {
    gap: 8px;
    margin-bottom: 1rem;
  }

  .control-btn {
    width: 36px;
    height: 36px;
  }

  .control-btn.play-pause-btn {
    width: 48px;
    height: 48px;
  }

  .control-btn svg {
    transform: scale(0.85);
  }

  .progress-area {
    gap: 8px;
    font-size: 0.75rem;
    margin-bottom: 1rem;
  }

  .secondary-controls {
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }

  .volume-container {
    width: 100%;
    justify-content: center;
  }

  .volume-slider {
    max-width: 150px;
    width: 100%;
  }

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

  .speed-select {
    width: 100%;
    max-width: 150px;
    text-align: center;
  }

  /* Notification Box size adjustment */
  .notif-box {
    width: 90%;
    max-width: 290px;
    height: 290px;
    padding: 1.5rem;
  }

  .notif-icon {
    font-size: 2.5rem;
  }

  .notif-content {
    font-size: 0.85rem;
  }
}