:root{
	--bg: #252b3f; /* requested background */
	--playing-bg: #dff6ff; /* subtle sky-blue for playing rows */
	--panel-bg: #0f2330;
	--muted: #6b7c8f;
	--name-btn: #3bc0ff; /* blue */
	--add-btn: #9b6ff0; /* purple */
	--del-btn: #ff5050; /* red */
	--row-bg: #ffffff; /* row white */
	--row-text: #0b2230;
}

/* Header ve Logo Stilleri */
.header {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin-bottom: 24px;
	padding-bottom: 16px;
	border-bottom: 2px solid rgba(59, 192, 255, 0.2);
	position: relative;
}

.logo-link {
	display: inline-block;
	transition: transform 0.2s ease;
	position: absolute;
	left: 0;
}

.logo-link:hover {
	transform: scale(1.05);
}

.logo {
	height: 32px;
	width: auto;
	filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.header h1 {
	margin: 0;
	color: #f3fbff;
	font-size: 1.8rem;
	font-weight: 600;
	text-shadow: 0 2px 4px rgba(0,0,0,0.3);
	text-align: center;
	flex: 1;
}

/* Title wrapper to allow stacking under the logo on mobile */
.title-wrap{display:flex;flex-direction:column;align-items:center;justify-content:center}

/* Desktop: keep logo positioned left and title centered as before */
@media (min-width:901px){
  .header{flex-direction:row}
  .logo-link{position:absolute;left:0}
  .title-wrap{margin-left:0}
}

/* Mobile: stack logo above title and center them */
@media (max-width:900px){
  .header{flex-direction:column;align-items:center;justify-content:flex-start;padding-top:8px}
  .logo-link{position:static;left:auto;margin-bottom:6px}
  .title-wrap{margin-top:0}
  .header h1{font-size:1.4rem}
}

.body{font-family:Segoe UI,Arial,Helvetica,sans-serif;margin:0;background:var(--bg);min-height:100vh;display:flex}
/* fix: apply background to the actual body element */
body{font-family:Segoe UI,Arial,Helvetica,sans-serif;margin:0;background:var(--bg);min-height:100vh;display:flex}
.container{flex:1;padding:18px 24px 110px 24px;box-sizing:border-box;color:var(--row-text);width:100%;max-width:none}
h1, h2{color:#f3fbff}
.upload{margin-bottom:12px}
.button{display:inline-block;background:var(--name-btn);color:white;padding:10px 14px;border-radius:8px;cursor:pointer;border:none;font-weight:600;box-shadow:0 6px 18px rgba(59,192,255,0.12)}
.button:hover{transform:translateY(-1px)}
.queue, .library{margin-top:12px}
ul{list-style:none;padding:0}
li{display:flex;justify-content:space-between;padding:8px;border-bottom:1px solid #eee}
.controls{margin-top:8px}
button{padding:6px 10px;border-radius:6px;border:1px solid #ddd;background:#fff;cursor:pointer}

/* library row styles */
.lib-row{display:flex;align-items:center;padding:12px;border:2px solid rgba(0,0,0,0.08);background:var(--row-bg);margin-bottom:12px;border-radius:8px;color:var(--row-text)}

.lib-row.playing-row{background:linear-gradient(90deg, var(--playing-bg), rgba(255,255,255,0.6));transition:background 240ms ease}
.index-box{width:42px;height:42px;background:#f2f6f9;border-radius:8px;display:flex;align-items:center;justify-content:center;font-weight:700;color:var(--muted);margin-right:12px}
.row-middle{display:flex;align-items:center;flex:1;gap:12px}
.icon-box{width:44px;height:44px;background:#eef7fb;color:#2b4860;border-radius:8px;display:flex;align-items:center;justify-content:center}
.name-btn{background:var(--name-btn);color:white;border:none;padding:8px 12px;border-radius:8px;cursor:pointer;max-width:420px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.name-btn.small-font{font-size:13px}
.add-btn{background:var(--add-btn);color:white;border:none;padding:8px 10px;border-radius:8px;cursor:pointer}
.desc{flex:1;color:var(--muted);padding-left:8px}
.desc{background:transparent;border:1px solid rgba(255,255,255,0.04);color:var(--muted);padding:8px 10px;border-radius:8px;max-width:260px}
.row-right{display:flex;align-items:center;gap:8px}
.row-right .small{padding:6px;border-radius:6px}
.row-right .del{background:var(--del-btn);color:white;border:none}

/* move per-sound volume to the right side */
.vol-wrap{width:160px;order:2;margin-left:12px}
.row-middle > .vol-wrap{order:3}
.lib-row{display:flex}
.row-right{margin-left:12px}

/* add-btn playing (overlay is active) uses red-ish stop color */
.add-btn.playing{background:#ff6b6b;color:white}

/* exclusive stop button style */
.stop-excl{background:#ff6b6b;color:white;border:none;padding:8px 10px;border-radius:8px;cursor:pointer}


/* fixed width for name button and ellipsis */
.name-btn{width:300px}
.name-btn::after{content:''}
.name-btn.active-excl{box-shadow:0 6px 20px rgba(211,50,50,0.24);outline:2px solid rgba(211,50,50,0.14)}
.row-middle .add-btn{min-width:64px}
.vol-wrap{width:160px}
.vol-wrap input[type=range]{width:100%}

/* master control */
.master-controls{display:flex;align-items:center;gap:10px;margin-top:18px;margin-bottom:12px}
.master-controls input[type=range]{width:220px}

/* pill player */
.player-pill{position:fixed;left:28px;right:28px;bottom:22px;display:flex;align-items:center;gap:14px;background:#fff;color:#0b0b0b;padding:12px 18px;border-radius:28px;box-shadow:0 6px 26px rgba(2,6,23,0.5)}
.play-btn{width:44px;height:44px;border-radius:22px;background:transparent;border:none;font-size:18px;cursor:pointer}
.play-btn[title]{opacity:0.95}
.play-btn.active{background:#3bc0ff;color:white}
.play-btn[title].active{box-shadow:0 6px 18px rgba(59,192,255,0.18)}
.play-btn{margin-right:8px}
.player-info{flex:1;display:flex;flex-direction:column;gap:8px}
.time{font-size:13px;color:#111}
.progress-bar{height:10px;background:#dfe8ee;border-radius:8px;overflow:hidden;width:100%}
.progress-fill{height:100%;width:0%;background:var(--name-btn);border-radius:8px}
.player-actions{display:flex;align-items:center;gap:8px}
.vol-slider{width:120px}
.vol-btn{background:transparent;border:none;cursor:pointer}
.more-btn{background:transparent;border:none;cursor:pointer}

/* loop toggle active state */
.play-btn.active{background:#9b6ff0;color:white}
.play-btn[title].active{box-shadow:0 6px 18px rgba(155,111,240,0.16)}

/* adjust library width to use more of page */
.vol-wrap{width:200px}

@media (max-width: 1200px){
	.name-btn{width:260px}
	.vol-wrap{width:160px}
}
@media (max-width: 900px){
	.container{padding:12px}
	.player-pill{left:8px;right:8px}
	.name-btn{width:180px}
	.vol-wrap{width:120px}
}
@media (max-width: 520px){
	.lib-row{flex-direction:column;align-items:stretch;gap:8px}
	.row-middle{flex-wrap:wrap}
	.row-right{justify-self:flex-end}
}
@media (max-width: 600px){
	.name-btn{width:120px}
	.vol-wrap{display:none}
	.row-right .small{padding:4px}
}

/* Improved mobile / small-screen adjustments */
@media (max-width: 480px){
	/* Make container padding compact so content uses vertical space well */
	.container{padding:12px 12px 100px 12px}

	/* Header: shrink logo and title to fit on one line without overlap */
	.logo{height:26px}
	.header h1{font-size:1.2rem}
	.logo-link{left:8px}

	/* Library rows: stack and increase spacing for touch */
	.lib-row{flex-direction:column;align-items:stretch;padding:10px;border-radius:10px}
	.index-box{width:36px;height:36px;font-size:14px;margin-right:0}
	.row-middle{flex-direction:row;align-items:center;gap:8px}
	.name-btn{width:100%;white-space:normal;padding:10px;border-radius:8px}
	.desc{max-width:none;padding:8px;margin-top:6px}

	/* Make controls larger and stack with full-width buttons */
	.row-right{display:flex;flex-wrap:wrap;gap:8px;margin-left:0;justify-content:space-between}
	.row-right .small{padding:10px 12px}
	.add-btn, .stop-excl{padding:10px 12px}

	/* Player pill: reduce footprint, show minimal mode and make it full-width */
	.player-pill{left:12px;right:12px;bottom:12px;padding:10px 12px;border-radius:14px;gap:10px}
	.player-pill{align-items:center}
	.play-btn{width:44px;height:44px}
	.player-info{display:flex;flex-direction:row;align-items:center;gap:8px}
	.time{font-size:12px}
	.progress-bar{height:8px}
	.vol-slider{display:none}
	.player-actions{gap:6px}

	/* Ensure audio element controls (if visible) don't overflow */
	audio{max-width:100%}

	/* Increase hit area for file input label */
	#uploadLabel{padding:12px 16px;border-radius:10px}
}

/* Very small / landscape phones: hide non-essential text and compress player further */
@media (max-width:360px){
	.header h1{font-size:1rem}
	.name-btn{font-size:14px}
	.player-info{display:flex;flex-direction:column;align-items:flex-start}
	.time{font-size:11px}
	.progress-bar{height:6px}
}


