@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&family=Open+Sans:wght@400;600&display=swap');

:root {
  --app-bg: #000000;
  --sidebar-bg: #0a0a0a;
  --player-bg: #121212;
  --panel-bg: #181818;
  --panel-hover: #282828;
  --primary-color: #d4af37; /* Luxury Gold */
  --primary-glow: rgba(212, 175, 55, 0.4);
  --text-main: #ffffff;
  --text-muted: #a7a7a7;
  --border-color: #222222;
  --sidebar-width: 260px;
  --player-height: 90px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--app-bg);
  color: var(--text-main);
  display: flex;
  height: 100vh;
  overflow: hidden; /* App-like feel, no global scroll */
}
a { text-decoration: none; color: inherit; transition: color 0.2s; }
ul { list-style: none; }

/* -------------------------------------
   LAYOUT
-------------------------------------- */
.app-wrapper {
  display: flex;
  width: 100%;
  height: calc(100vh - var(--player-height));
}

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-color);
  padding: 24px 0;
  flex-shrink: 0;
}
.sidebar-logo {
  padding: 0 24px;
  margin-bottom: 30px;
}
.sidebar-logo a {
  display: flex; align-items: center; gap: 12px;
  font-size: 1.6rem; font-weight: 800; letter-spacing: -0.5px;
}
.sidebar-logo i { color: var(--primary-color); font-size: 1.8rem; text-shadow: 0 0 15px var(--primary-glow); }

.nav-menu {
  padding: 0 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.nav-menu a {
  display: flex; align-items: center; gap: 15px;
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.nav-menu a:hover {
  color: var(--text-main);
  background-color: var(--panel-hover);
}
.nav-menu a.active {
  background-color: rgba(212, 175, 55, 0.1);
  color: var(--primary-color);
}
.nav-menu i { font-size: 1.2rem; width: 24px; text-align: center; }

/* MAIN CONTENT */
.main-content {
  flex: 1;
  background: linear-gradient(180deg, #1e1e24 0%, var(--app-bg) 40%);
  overflow-y: auto;
  position: relative;
}
.main-inner {
  padding: 40px;
  max-width: 1600px;
  margin: 0 auto;
}

/* HEADER (Inside Main Content) */
.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  position: sticky;
  top: 0;
  padding: 20px 40px;
  margin: -40px -40px 40px -40px;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(20px);
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.btn-primary {
  background-color: var(--primary-color);
  color: #000;
  border: none;
  padding: 12px 28px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 4px 15px var(--primary-glow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px var(--primary-glow);
}

/* -------------------------------------
   BOTTOM PLAYER
-------------------------------------- */
.bottom-player {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--player-height);
  background-color: var(--player-bg);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 1000;
}
.player-left {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 30%;
}
.player-img {
  width: 56px; height: 56px;
  border-radius: 8px;
  background: #282828;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary-color);
  font-size: 1.5rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}
.player-info { display: flex; flex-direction: column; justify-content: center; }
.player-title { font-weight: 700; font-size: 0.95rem; margin-bottom: 4px; }
.player-desc { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

.player-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.player-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}
.control-btn {
  background: none; border: none; color: var(--text-muted);
  font-size: 1.2rem; cursor: pointer; transition: color 0.2s;
}
.control-btn:hover { color: var(--text-main); }
.play-btn-main {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--text-main);
  color: #000;
  display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer; font-size: 1rem;
  transition: transform 0.2s;
}
.play-btn-main:hover { transform: scale(1.1); background: var(--primary-color); }
.play-btn-main i.fa-play { margin-left: 3px; }

.player-right {
  width: 30%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 15px;
}
.volume-slider-wrap {
  display: flex; align-items: center; gap: 10px; color: var(--text-muted);
}
input[type=range] {
  -webkit-appearance: none;
  width: 100px; height: 4px; background: #535353; border-radius: 2px;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px;
  background: var(--text-main); border-radius: 50%; cursor: pointer;
}
input[type=range]:hover::-webkit-slider-thumb { background: var(--primary-color); }

/* -------------------------------------
   COMPONENTS
-------------------------------------- */
.section-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 24px;
  letter-spacing: -0.5px;
}
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
}
.app-card {
  background: var(--panel-bg);
  padding: 16px;
  border-radius: 8px;
  transition: background 0.3s;
  cursor: pointer;
  position: relative;
  display: block;
}
.app-card:hover {
  background: var(--panel-hover);
}
.card-img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  position: relative;
}
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.card-img-wrap .card-icon {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    background: #282828; color: var(--text-muted); font-size: 3rem;
}
.app-card .play-overlay {
  position: absolute; bottom: 8px; right: 8px;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--primary-color); color: #000;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; opacity: 0; transform: translateY(10px);
  transition: all 0.3s ease; box-shadow: 0 8px 16px rgba(0,0,0,0.5);
}
.app-card:hover .play-overlay {
  opacity: 1; transform: translateY(0);
}
.card-title { font-weight: 700; font-size: 1rem; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-subtitle { font-size: 0.85rem; color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* LIST LAYOUT (Top 10 / Schedule) */
.list-group {
  display: flex;
  flex-direction: column;
}
.list-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-radius: 8px;
  transition: background 0.2s;
}
.list-item:hover {
  background: var(--panel-hover);
}
.list-item:hover .item-num { opacity: 0; }
.list-item:hover .item-play { opacity: 1; }

.item-num-wrap { position: relative; width: 40px; text-align: center; color: var(--text-muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.item-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); opacity: 0; color: var(--text-main); font-size: 1.1rem; cursor: pointer; }
.item-play:hover { color: var(--primary-color); }

.item-info { flex: 1; display: flex; flex-direction: column; padding: 0 15px; }
.item-title { font-weight: 600; font-size: 1rem; color: var(--text-main); margin-bottom: 2px;}
.item-subtitle { font-size: 0.85rem; color: var(--text-muted); }
.item-right { width: 150px; text-align: right; color: var(--text-muted); font-size: 0.9rem; }
.item-badge { background: #e50914; color: white; padding: 4px 10px; border-radius: 4px; font-size: 0.7rem; font-weight: 700; letter-spacing: 1px; animation: pulse 2s infinite;}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(229, 9, 20, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(229, 9, 20, 0); }
  100% { box-shadow: 0 0 0 0 rgba(229, 9, 20, 0); }
}

/* MOBILE */
.mobile-menu-btn { display: none; background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; }
@media(max-width: 900px) {
  .sidebar { transform: translateX(-100%); position: fixed; z-index: 10000; height: 100%; transition: transform 0.3s; }
  .sidebar.open { transform: translateX(0); }
  .mobile-menu-btn { display: block; }
  .player-left { width: auto; }
  .player-right { display: none; }
  .player-center { align-items: flex-end; }
}
