/* =========================
   LIGHT / CLEAN THEME
   (class nomlari o‘zgarmagan)
   ========================= */

:root{
  --bg1:#f6fbff;
  --bg2:#f7f4ff;

  --surface:#ffffff;
  --surface2:#f7fbff;

  --text:#0f172a;
  --muted:#6b7280;

  --border:#e6edf6;
  --shadow:0 10px 30px rgba(15, 23, 42, 0.08);

  --accent:#3b82f6;      /* ko‘k */
  --accent2:#22c55e;     /* yashil */
  --warn:#fbbf24;        /* sariq */
  --chip:#eef6ff;

  --radius:18px;
  --radius2:14px;
}

*{ box-sizing:border-box; }

body{
  margin:0;
  font-family: Arial, sans-serif;
  color:var(--text);
  background: linear-gradient(180deg, var(--bg1), var(--bg2));
}

a{
  color: var(--accent);
  text-decoration: none;
}
a:hover{ text-decoration: underline; }

.page-wrap{
  max-width:980px;
  margin: 18px auto;
  background: var(--surface);
  min-height: 100vh;
  display:flex;
  flex-direction:column;

  border:1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}

/* =========================
   HEADER
   ========================= */
.site-header{
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.logo-search{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
}

.logo{
  font-size: 28px;
  font-weight: 700;
  color: var(--accent2);
  letter-spacing: 0.2px;
  text-decoration: none;
}
a .logo{ text-decoration:none !important; }

/* =========================
   SEARCH
   ========================= */
.search-form{
  display:flex;
  align-items:center;
  gap: 10px;
  flex: 1;
  width: 100%;
}

.search-form input,
.search-form input[type="text"]{
  flex: 1 1 auto;
  min-width: 0;
  padding: 12px 14px;
  font-size: 15px;

  border-radius: 12px;
  border: 1px solid var(--border);
  background: #ffffff;

  outline: none;
  transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease;
}

.search-form input:focus{
  border-color: rgba(59,130,246,0.55);
  box-shadow: 0 0 0 4px rgba(59,130,246,0.15);
}

.search-form button{
  flex: 0 0 auto;
  height: 44px;
  padding: 0 16px;
  font-size: 15px;
  border: none;
  border-radius: 12px;
  cursor:pointer;

  background: linear-gradient(180deg, #5aa6ff, var(--accent));
  color: #fff;
  box-shadow: 0 8px 18px rgba(59,130,246,0.22);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
  white-space: nowrap;
}

.search-form button:hover{
  filter: brightness(0.98);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(59,130,246,0.26);
}
.search-form button:active{
  transform: translateY(0);
  box-shadow: 0 6px 14px rgba(59,130,246,0.22);
}

/* =========================
   LAST PHRASES
   ========================= */
.last-phrases{
  margin-top: 10px;
  display:flex;
  flex-wrap:wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  padding: 6px 0 0;
}

.last-phrases-title{
  margin-right: 6px;
  color: var(--muted);
}

.phrase-tag{
  display:inline-block;
  background: var(--chip);
  border: 1px solid rgba(59,130,246,0.18);
  color: #1f3b7a;

  padding: 6px 12px;
  border-radius: 999px;
  font-size: 14px;

  max-width: 38%;
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;

  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

.phrase-tag:hover{
  text-decoration:none;
  background: #e9f2ff;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
}

/* =========================
   CONTENT
   ========================= */
.content{
  padding: 16px 18px 30px;
  flex:1;
  padding-bottom: 90px; /* player uchun joy */
}

/* =========================
   TRACK LIST
   ========================= */
.track-list{
  list-style:none;
  padding:0;
  margin: 12px 0 0;
}

.track-item{
  display:flex;
  align-items:center;
  gap: 10px;

  padding: 14px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 12px;

  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.track-item:hover{
  transform: translateY(-1px);
  border-color: rgba(59,130,246,0.25);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.track-controls{
  display:flex;
  align-items:center;
  gap: 8px;
  flex-shrink: 0;
}

/* Buttons (iconli) */
.btn-play,
.btn-download{
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff, #f6f9ff);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;

  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.10);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}

.btn-play:hover,
.btn-download:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.14);
}

.btn-play:active,
.btn-download:active{
  transform: translateY(0);
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.12);
}

.btn-play svg{ width: 20px; height: 20px; fill: var(--accent); }
.btn-download svg{ width: 20px; height: 20px; fill: var(--warn); }

/* Play/Pause toggling (sizdagi logika saqlanadi) */
.btn-play .icon-pause{ display:none; }
.btn-play.is-playing .icon-play{ display:none; }
.btn-play.is-playing .icon-pause{ display:inline-block; }

.track-title{ flex:1; margin:0 10px; font-size: 15px; line-height:1.3; }

.track-main{
  flex: 1 1 auto;
  min-width: 0;
  display:flex;
  flex-direction:column;
  gap: 4px;
}

.track-artist,
.artist-link{
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  text-decoration:none;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.track-name{
  font-size: 14px;
  color: var(--text);
  line-height: 1.35;

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

.track-duration{
  flex-shrink:0;
  width:auto;
  text-align:right;
  font-size: 13px;
  color: var(--muted);
  white-space:nowrap;
  margin-left: 4px;
}

/* =========================
   FOOTER
   ========================= */
.site-footer{
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  text-align:center;
  color: var(--muted);
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}

/* =========================
   PLAYER (bottom fixed)
   ========================= */
.player-container{
  position: fixed;
  left:0;
  right:0;
  bottom:0;
  z-index: 1000;

  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(230,237,246,0.9);
  box-shadow: 0 -12px 26px rgba(15, 23, 42, 0.10);
}

.player-inner{
  max-width: 980px;
  margin: 0 auto;
  padding: 10px 16px 12px;
}

.player-progress{
  padding: 2px 0 10px;
}

.player-progress-bar{
  width: 100%;
  height: 6px;
  background: rgba(15,23,42,0.08);
  border-radius: 999px;
  overflow:hidden;
  cursor:pointer;
}

.player-progress-fill{
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #7cb6ff, var(--accent));
  border-radius: 999px;
}

.player-main{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 14px;
}

.player-controls{
  display:flex;
  align-items:center;
  gap: 8px;
}

.player-btn{
  border:none;
  cursor:pointer;

  background: linear-gradient(180deg, #ffffff, #f3f7ff);
  color: var(--accent);
  border-radius: 50%;
  width: 36px;
  height: 36px;

  display:flex;
  align-items:center;
  justify-content:center;

  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.10);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
  font-size: 14px;
}

.player-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.14);
}

.player-btn-main{
  background: linear-gradient(180deg, #5aa6ff, var(--accent));
  color:#fff;
  width: 42px;
  height: 42px;
  font-size: 18px;
  box-shadow: 0 14px 30px rgba(59,130,246,0.28);
}

.player-title-block{
  flex:1;
  min-width:0;
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
  font-size: 14px;
  color: var(--text);
}

.player-title-sep{ margin: 0 6px; color: rgba(107,114,128,0.75); }

.player-extra{
  display:flex;
  align-items:center;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}

.player-menu{
  border:none;
  background: transparent;
  cursor:pointer;
  font-size: 18px;
  line-height:1;
  color: var(--muted);
}
.player-menu:hover{ color: var(--text); }

/* =========================
   MP3 PAGE BLOCK
   ========================= */
.mp3-page{
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 22px 0 30px;
  padding: 24px;

  background: linear-gradient(180deg, #ffffff, #fbfdff);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.mp3-info p{
  margin: 8px 0;
  font-size: 17px;
  color: var(--text);
}

.mp3-actions{
  margin-top: 22px;
  display:flex;
  gap: 14px;
  align-items:center;
  flex-wrap: wrap;
}

.mp3-page .main-play,
.mp3-page .main-download{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  padding: 14px 26px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;

  border:none;
  border-radius: 999px;
  cursor:pointer;
  text-decoration:none;

  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;

  width:auto !important;
  height:auto !important;
  min-width: 160px;
}

.mp3-page .main-play{
  background: linear-gradient(180deg, #5aa6ff, var(--accent));
  color:#fff;
  box-shadow: 0 14px 30px rgba(59,130,246,0.26);
}

.mp3-page .main-download{
  background: linear-gradient(180deg, #ffeaa6, var(--warn));
  color:#1f2937;
  box-shadow: 0 14px 30px rgba(251,191,36,0.22);
}

.mp3-page .main-play:hover,
.mp3-page .main-download:hover{
  transform: translateY(-2px);
  filter: brightness(0.99);
}
.mp3-page .main-play:active,
.mp3-page .main-download:active{
  transform: translateY(0);
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 600px){
  .page-wrap{
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .logo-search{
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .search-form button{
    height: 42px;
  }

  .mp3-page{
    margin: 16px 0 24px;
    padding: 18px;
    border-radius: 18px;
  }

  .mp3-page .main-play,
  .mp3-page .main-download{
    width: 100% !important;
    min-width: 0;
    justify-content:center;
  }

  .mp3-actions{
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
}

@media (max-width: 480px){
  .search-form{ gap: 8px; }
  .search-form input{ padding: 11px 12px; font-size: 14px; }
  .search-form button{ padding: 0 14px; font-size: 14px; }

  .phrase-tag{ max-width: 100%; }
  .track-item{ padding: 12px; border-radius: 14px; }
  .btn-play, .btn-download{ width: 42px; height: 42px; }
}
