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

/* ===== BASE ===== */
body {
  font-family: Arial, 'Segoe UI', sans-serif;
  background: linear-gradient(180deg, #0f2027, #203a43, #2c5364);
  background-attachment: fixed;
  color: #f0f0f0;
  min-height: 100vh;
}

/* ===== HEADER ===== */
header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 50;
}
header a { color: #aaa; text-decoration: none; font-size: 1.2rem; }
header a:hover { color: #fff; }
header h1 { font-size: 1.1rem; font-weight: 600; flex: 1; }
header button {
  background: none; border: none; color: #aaa;
  font-size: 1.2rem; cursor: pointer;
}
header button:hover { color: #fff; }

/* ===== CARDS ===== */
.card {
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 1.5rem;
}

/* ===== INPUTS ===== */
input[type="text"] {
  width: 100%;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 0.8rem 1rem;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  margin-bottom: 1rem;
}
input[type="text"]:focus { border-color: rgba(255,255,255,0.3); }
input[type="text"]::placeholder { color: #555; }

/* ===== BUTTONS ===== */
.btn {
  width: 100%;
  background: #e91e63;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.85rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn:hover { opacity: 0.85; }
.btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ===== STATUS MESSAGES ===== */
.status { margin-top: 1rem; padding: 1rem; border-radius: 10px; font-size: 0.85rem; display: none; white-space: pre-wrap; }
.loading { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: #aaa; }
.success { background: rgba(76,175,80,0.1); border: 1px solid rgba(76,175,80,0.3); color: #4caf50; }
.error   { background: rgba(244,67,54,0.1); border: 1px solid rgba(244,67,54,0.3); color: #f44336; }

/* ===== TOAST ===== */
.toast {
  position: fixed; top: 1rem; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,0.85); color: #fff;
  padding: 0.6rem 1.2rem; border-radius: 8px;
  font-size: 0.85rem; display: none; z-index: 999;
}

/* ===== SEARCH ===== */
.search { padding: 1rem 1.5rem 0.5rem; }
.search input[type="text"] { margin-bottom: 0; }

/* ===== SONG LIST ===== */
.list { padding: 0.5rem; }

.song-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 1rem; border-radius: 10px; cursor: pointer;
  transition: background 0.15s;
}
.song-item:hover { background: rgba(255,255,255,0.07); }
.song-item.active { background: rgba(233,30,99,0.15); }

.num { width: 22px; text-align: center; font-size: 0.8rem; color: #555; flex-shrink: 0; }
.song-item.active .num { color: #e91e63; }

.thumb {
  width: 44px; height: 44px; border-radius: 8px;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0; overflow: hidden;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }

.info { flex: 1; min-width: 0; }
.title { font-size: 0.9rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-item.active .title { color: #e91e63; }

.del-btn {
  background: none; border: none; color: #444;
  font-size: 1rem; cursor: pointer; padding: 6px; flex-shrink: 0; transition: color 0.15s;
}
.del-btn:hover { color: #f44336; }

/* ===== EMPTY STATE ===== */
.empty { text-align: center; padding: 3rem 1rem; color: #555; }
.empty a { color: #aaa; }

/* ===== PLAYER (music.html) ===== */
.player {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(15,32,39,0.97);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 0.85rem 1.25rem;
  backdrop-filter: blur(10px);
}
.p-info { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.6rem; }
.p-thumb {
  width: 36px; height: 36px; border-radius: 6px;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; flex-shrink: 0; overflow: hidden;
}
.p-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.p-title { font-size: 0.88rem; font-weight: 500; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.p-controls { display: flex; align-items: center; gap: 0.75rem; }
.cb { background: none; border: none; color: #888; font-size: 1.1rem; cursor: pointer; padding: 3px; }
.cb:hover { color: #fff; }
.pb {
  width: 36px; height: 36px; border-radius: 50%;
  background: #e91e63; color: #fff; border: none;
  font-size: 0.9rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

.prog-wrap { flex: 1; display: flex; align-items: center; gap: 0.4rem; }
.prog { flex: 1; height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; cursor: pointer; }
.prog-fill { height: 100%; background: #e91e63; border-radius: 2px; width: 0%; transition: width 0.4s linear; }
.t { font-size: 0.7rem; color: #555; min-width: 28px; text-align: center; }

/* ===== RADIO STATIONS ===== */
.station-list {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 10px;
  padding: 10px;
  margin-bottom: 150px;
}
.station {
  background: rgba(0,0,0,0.35);
  border-radius: 12px;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  cursor: pointer; height: 120px;
  transition: background 0.15s;
  border: 1px solid transparent;
}
.station:hover { background: rgba(255,255,255,0.08); }
.station.active { background: rgba(233,30,99,0.2); border-color: #e91e63; }
.station img {
  width: 60px; height: 60px; object-fit: contain;
  border-radius: 10px; background: #fff; padding: 4px;
}
.station span { margin-top: 5px; font-size: 12px; text-align: center; }

/* ===== RADIO CONTROLS ===== */
.now-playing {
  display: none; position: fixed;
  bottom: 80px; left: 50%; transform: translateX(-50%);
  width: 70px; height: 70px;
  border-radius: 12px; background: #fff;
  overflow: hidden; z-index: 10;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.now-playing img { width: 100%; height: 100%; object-fit: contain; }

.controls {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; justify-content: center;
  z-index: 5; gap: 50px; padding: 15px 0;
  background: rgba(15,32,39,0.97);
  width: 100%;
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255,255,255,0.08);
}
.ctrl-btn { background: none; border: none; cursor: pointer; user-select: none; font-size: 26px; }
#playBtn { font-size: 42px; }
.ctrl-btn.small { font-size: 32px; }

/* ===== INDEX PAGE ===== */
.index-wrap {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 100vh;
}
.logo { font-size: 3rem; font-weight: 800; letter-spacing: -2px; color: #fff; margin-bottom: 0.3rem; }
.tagline { font-size: 0.9rem; color: #888; letter-spacing: 4px; text-transform: uppercase; margin-bottom: 3rem; }

nav { display: flex; flex-direction: column; gap: 1rem; width: 260px; }
nav a {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.5rem;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px; text-decoration: none; color: #ccc;
  font-size: 1rem; transition: all 0.2s;
  background: rgba(0,0,0,0.35);
}
nav a:hover { border-color: #e91e63; color: #fff; background: rgba(233,30,99,0.1); }
nav a .icon { font-size: 1.3rem; }
nav a .label { font-weight: 500; }
nav a .desc { font-size: 0.75rem; color: #666; margin-top: 2px; }

footer { position: fixed; bottom: 1.5rem; font-size: 0.75rem; color: #444; letter-spacing: 2px; }

/* ===== UPLOAD PAGE ===== */
.container { max-width: 480px; margin: 2rem auto; padding: 0 1.5rem; }
.link-btn { display: block; margin-top: 0.75rem; text-align: center; color: #888; font-size: 0.85rem; text-decoration: none; }
.link-btn:hover { color: #fff; }

/* ===== MENU (radio) ===== */
.home-menu { position: fixed; top: 10px; left: 10px; z-index: 999; }
.home-btn { background: #e91e63; padding: 10px 14px; border-radius: 10px; cursor: pointer; font-size: 14px; }
.home-dropdown { display: none; margin-top: 5px; background: rgba(0,0,0,0.9); border-radius: 10px; overflow: hidden; }
.home-dropdown a { display: block; padding: 10px 14px; color: #fff; text-decoration: none; font-size: 14px; }
.home-dropdown a:hover { background: rgba(255,255,255,0.1); }
