
/*
Theme Name: MP3 Player Mobile
Theme URI: https://example.com/mp3-player-mobile
Author: Krishna
Author URI: https://example.com
Description: A mobile-first, app-style WordPress theme with a built-in HTML5 music player and sticky mini-player.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mp3-player-mobile
Tags: music, audio, mobile, responsive, dark, app-like
*/

:root {
  --bg: #0b0b0f;
  --card: #15151c;
  --text: #f2f2f2;
  --muted: #a6a7ad;
  --accent: #4caf50;
  --accent-2: #7c4dff;
  --radius: 16px;
}

* { box-sizing: border-box; }
html, body { margin:0; padding:0; background: var(--bg); color: var(--text); font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--text); text-decoration: none; }
a:hover { opacity: .9; }
.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 16px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: linear-gradient(0deg, rgba(11,11,15,0.8), rgba(11,11,15,1)); backdrop-filter: blur(6px); border-bottom: 1px solid #1e1e26; }
.brand { display:flex; align-items:center; gap:10px; padding:12px 16px; }
.brand .logo { width:32px; height:32px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.brand .title { font-weight: 700; letter-spacing: .4px; }

/* Grid */
.grid { display:grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px){ .grid { grid-template-columns: repeat(3, 1fr);} }
@media (min-width: 960px){ .grid { grid-template-columns: repeat(4, 1fr);} }

.card { background: var(--card); border-radius: var(--radius); overflow: hidden; border: 1px solid #1e1e26; }
.card .thumb { aspect-ratio: 1/1; background: #22232d; display:flex; align-items:center; justify-content:center; font-size:12px; color:var(--muted); }
.card .meta { padding: 10px; }
.card .title { font-weight: 600; font-size: 0.95rem; line-height: 1.2; margin-bottom: 6px; }
.card .artist { color: var(--muted); font-size: 0.82rem; }

/* Player */
.player { background: var(--card); border-radius: var(--radius); padding: 16px; border:1px solid #1e1e26; }
.player-header { display:flex; gap:12px; align-items:center; }
.player-cover { width:88px; height:88px; border-radius: 12px; overflow:hidden; flex: 0 0 auto; background:#22232d; }
.player-meta { display:flex; flex-direction:column; gap:4px; }
.player-title { font-weight:700; }
.player-artist { color:var(--muted); font-size:.9rem; }
.controls { display:flex; align-items:center; gap:10px; margin-top: 12px; }
.controls button { background:#1f1f28; border:0; color:var(--text); padding:10px 12px; border-radius: 12px; font-size:14px; }
.controls button:active { transform: scale(.98); }
.progress { width:100%; margin-top: 8px; display:flex; align-items:center; gap:8px; font-size:.8rem; color:var(--muted); }
.progress input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; background: #2a2b36; border-radius: 999px; outline: none; }
.progress input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); cursor: pointer; }
.time { min-width: 40px; text-align:center; }

/* Sticky mini-player */
.mini-player { position: fixed; bottom: 12px; left: 12px; right: 12px; background: rgba(21,21,28,.95); border:1px solid #1e1e26; border-radius: 999px; padding: 8px 12px; display:flex; align-items:center; gap:10px; backdrop-filter: blur(8px); box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.mini-cover { width:34px; height:34px; border-radius:8px; overflow:hidden; background:#22232d; }
.mini-title { font-size:.9rem; font-weight:600; }
.mini-artist { font-size:.78rem; color:var(--muted); }
.mini-controls { margin-left:auto; display:flex; gap:6px; }
.mini-controls button { padding:8px 10px; border-radius: 12px; border:0; background:#282834; color:var(--text); }

/* Post styles */
.post { background: var(--card); border-radius: var(--radius); border:1px solid #1e1e26; overflow: hidden; }
.post .content { padding: 16px; color: var(--text); line-height: 1.6; }
.post .content h1,h2,h3 { line-height:1.2; }
.post .hero { aspect-ratio: 16/9; background:#22232d; }

/* Utility */
.badge { font-size:.72rem; padding:4px 8px; background:#1f1f28; border-radius:999px; color: var(--muted); border:1px solid #2a2b36; }
.footer { color: var(--muted); padding: 40px 16px; text-align:center; }


/* --- App-like Home UI --- */
.app-hero { margin: 8px 0 16px; padding: 18px; background: linear-gradient(135deg, rgba(124,77,255,.2), rgba(76,175,80,.15)); border: 1px solid #1e1e26; border-radius: var(--radius); }
.app-hero .hero-title { font-size: 1.4rem; font-weight: 800; }
.app-hero .hero-sub { color: var(--muted); margin-top: 6px; }

.row { margin: 18px 0 8px; }
.row-title { font-size: 1.05rem; margin: 8px 2px 10px; font-weight: 700; }
.muted { color: var(--muted); }

.scroll-x { display:flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 6px; }
.chips .chip { padding: 8px 12px; border-radius: 999px; background: #1f1f28; border:1px solid #2a2b36; white-space: nowrap; font-size: .9rem; }
.cards { display:flex; gap: 12px; }
.card.horizont { min-width: 260px; }
.horiz { display:flex; align-items:center; gap: 10px; padding: 10px; }
.thumb.sm { width:64px; height:64px; border-radius:12px; overflow:hidden; }


/* Day/Night theme */
:root,
html[data-theme="dark"]{
  --bg: #0b0b0f;
  --card: #15151c;
  --text: #f2f2f2;
  --muted: #a6a7ad;
  --accent: #4caf50;
  --accent-2: #7c4dff;
}
html[data-theme="light"]{
  --bg: #fafafa;
  --card: #ffffff;
  --text: #0b0b0f;
  --muted: #4a4b52;
  --accent: #0b8457;
  --accent-2: #5e35b1;
  color-scheme: light;
}
