/* =========================================================
   Music Player Pro - Front-end styles
   Primary color: #0a1233
   Tamil font: Noto Sans Tamil
   ========================================================= */

:root {
	--mpp-primary: #0a1233;
	--mpp-primary-light: #1c2b5e;
	--mpp-accent: #ffffff;
	--mpp-radius: 10px;
}

.mpp-grid,
.mpp-player,
.mpp-categories-wrap,
.mpp-playlist-block {
	font-family: 'Noto Sans Tamil', 'Latha', Arial, sans-serif;
}

/* ---------------------------------------------------------
   Song / Playlist Grid
   --------------------------------------------------------- */
.mpp-grid {
	display: grid;
	grid-template-columns: repeat(var(--mpp-columns, 4), minmax(0, 1fr));
	gap: 18px;
	margin: 16px 0 32px;
}

@media (max-width: 992px) {
	.mpp-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 576px) {
	.mpp-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}
}

.mpp-card {
	background: #fff;
	border: 1px solid #e3e6ef;
	border-radius: var(--mpp-radius);
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(10, 18, 51, 0.06);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.mpp-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 6px 16px rgba(10, 18, 51, 0.15);
}

.mpp-cover-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: var(--mpp-primary);
}

.mpp-cover {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.mpp-play {
	position: absolute;
	bottom: 10px;
	right: 10px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: none;
	background: var(--mpp-primary);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
	transition: background 0.15s ease, transform 0.15s ease;
}

.mpp-play:hover {
	background: var(--mpp-primary-light);
	transform: scale(1.08);
}

.mpp-play.is-playing .mpp-play-icon::before {
	content: "❚❚";
}

.mpp-play-icon {
	font-size: 16px;
	line-height: 1;
}

.mpp-meta {
	padding: 10px 12px 14px;
}

.mpp-title {
	font-weight: 600;
	font-size: 15px;
	color: var(--mpp-primary);
	line-height: 1.35;
	margin-bottom: 2px;
}

.mpp-artist {
	font-size: 13px;
	color: #6b7280;
}

.mpp-empty {
	color: #6b7280;
	font-style: italic;
}

/* ---------------------------------------------------------
   Category / Playlist section headings
   --------------------------------------------------------- */
.mpp-section-title,
.mpp-category-heading h3 {
	color: #fff;
	background: linear-gradient(90deg, var(--mpp-primary), var(--mpp-primary-light));
	padding: 12px 20px;
	border-radius: 999px 30px 30px 999px;
	font-size: 18px;
	margin: 0 0 12px;
	display: inline-block;
	min-width: 200px;
}

.mpp-category-block {
	margin-bottom: 36px;
}

/* ---------------------------------------------------------
   Persistent Sticky Player
   --------------------------------------------------------- */
.mpp-player {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99999;
	background: var(--mpp-primary);
	color: #fff;
	box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.25);
	transform: translateY(0);
	transition: transform 0.25s ease;
}

.mpp-player-inner {
	max-width: 1280px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	gap: 18px;
	padding: 10px 18px;
	flex-wrap: wrap;
}

.mpp-now-playing {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 180px;
	flex: 1 1 200px;
}

.mpp-now-cover {
	width: 46px;
	height: 46px;
	border-radius: 6px;
	object-fit: cover;
	flex-shrink: 0;
	background: var(--mpp-primary-light);
}

.mpp-now-text {
	overflow: hidden;
}

.mpp-now-title {
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 220px;
}

.mpp-now-artist {
	font-size: 12px;
	color: #b9c0dd;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 220px;
}

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

.mpp-ctrl-btn {
	background: transparent;
	border: none;
	color: #fff;
	font-size: 18px;
	cursor: pointer;
	padding: 6px;
	line-height: 1;
}

.mpp-playpause {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: #fff;
	color: var(--mpp-primary);
	font-size: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.mpp-progress-wrap {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 2 1 220px;
	min-width: 180px;
}

.mpp-time {
	font-size: 12px;
	color: #cfd5ec;
	min-width: 38px;
	text-align: center;
}

.mpp-progress {
	flex: 1;
	height: 6px;
	background: rgba(255, 255, 255, 0.18);
	border-radius: 999px;
	cursor: pointer;
	position: relative;
}

.mpp-progress-bar {
	height: 100%;
	width: 0%;
	background: #fff;
	border-radius: 999px;
	transition: width 0.1s linear;
}

.mpp-volume-wrap {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}

.mpp-volume-wrap input[type="range"] {
	width: 80px;
}

@media (max-width: 768px) {
	.mpp-now-title,
	.mpp-now-artist {
		max-width: 120px;
	}
	.mpp-volume-wrap {
		display: none;
	}
}

/* Add bottom spacing to body so player doesn't overlap content */
body {
	padding-bottom: 74px;
}

/* ---------------------------------------------------------
   Album Grid  [mpp_albums]
   --------------------------------------------------------- */
.mpp-albums-grid {
	display: grid;
	grid-template-columns: repeat(var(--mpp-columns, 3), minmax(0, 1fr));
	gap: 22px;
	margin: 20px 0 40px;
	font-family: 'Noto Sans Tamil', 'Latha', Arial, sans-serif;
}

@media (max-width: 900px) {
	.mpp-albums-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}

@media (max-width: 480px) {
	.mpp-albums-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}

.mpp-album-card {
	cursor: pointer;
	border-radius: 16px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 2px 14px rgba(10, 18, 51, 0.09);
	transition: transform 0.22s ease, box-shadow 0.22s ease;
	outline: none;
}

.mpp-album-card:hover,
.mpp-album-card:focus-visible {
	transform: translateY(-5px);
	box-shadow: 0 14px 36px rgba(10, 18, 51, 0.20);
}

.mpp-album-cover-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: var(--mpp-primary);
}

.mpp-album-cover {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.32s ease;
}

.mpp-album-card:hover .mpp-album-cover {
	transform: scale(1.06);
}

.mpp-album-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(6, 12, 40, 0.88) 0%, rgba(6, 12, 40, 0.10) 55%, transparent 100%);
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	padding: 14px 12px;
	opacity: 0;
	transition: opacity 0.22s;
}

.mpp-album-card:hover .mpp-album-overlay,
.mpp-album-card:focus-visible .mpp-album-overlay {
	opacity: 1;
}

.mpp-album-count-badge {
	font-size: 11px;
	color: rgba(255, 255, 255, 0.88);
	background: rgba(0, 0, 0, 0.35);
	padding: 3px 9px;
	border-radius: 999px;
	backdrop-filter: blur(4px);
	font-family: 'Noto Sans Tamil', Arial, sans-serif;
	letter-spacing: 0.2px;
}

.mpp-album-open-btn {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #fff;
	color: var(--mpp-primary);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
	transition: transform 0.15s, background 0.15s, color 0.15s;
	flex-shrink: 0;
}

.mpp-album-card:hover .mpp-album-open-btn {
	transform: scale(1.10);
	background: var(--mpp-primary);
	color: #fff;
}

.mpp-album-meta {
	padding: 12px 14px 16px;
}

.mpp-album-title {
	font-size: 14px;
	font-weight: 700;
	color: var(--mpp-primary);
	line-height: 1.35;
	margin-bottom: 3px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mpp-album-songs-count {
	font-size: 12px;
	color: #8b93b8;
}

/* ---------------------------------------------------------
   Album popup (song list)
   --------------------------------------------------------- */
.mpp-album-popup {
	position: fixed;
	inset: 0;
	z-index: 100002;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.26s ease;
}

.mpp-album-popup.is-open {
	opacity: 1;
	pointer-events: auto;
}

.mpp-album-popup-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(6, 11, 36, 0.78);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.mpp-album-popup-box {
	position: relative;
	z-index: 1;
	background: #fff;
	border-radius: 22px;
	box-shadow: 0 36px 90px rgba(10, 18, 51, 0.48), 0 0 0 1px rgba(255,255,255,0.06);
	width: 100%;
	max-width: 500px;
	max-height: 84vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transform: translateY(36px) scale(0.94);
	transition: transform 0.34s cubic-bezier(0.34, 1.56, 0.64, 1);
	font-family: 'Noto Sans Tamil', 'Latha', Arial, sans-serif;
}

.mpp-album-popup.is-open .mpp-album-popup-box {
	transform: translateY(0) scale(1);
}

/* Hero */
.mpp-ap-hero {
	position: relative;
	padding: 30px 20px 24px;
	overflow: hidden;
	flex-shrink: 0;
}

.mpp-ap-hero::before {
	content: '';
	position: absolute;
	inset: -30px;
	background-image: var(--mpp-ap-bg);
	background-size: cover;
	background-position: center;
	filter: blur(22px) brightness(0.45) saturate(1.4);
	transform: scale(1.15);
}

.mpp-ap-hero::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(160deg, rgba(10,18,51,0.25) 0%, rgba(10,18,51,0.65) 100%);
}

.mpp-ap-close {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 2;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.18);
	border: none;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.15s, transform 0.15s;
}

.mpp-ap-close:hover {
	background: rgba(255, 255, 255, 0.30);
	transform: scale(1.08);
}

.mpp-ap-hero-inner {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: flex-end;
	gap: 16px;
}

.mpp-ap-album-cover {
	width: 96px;
	height: 96px;
	border-radius: 12px;
	object-fit: cover;
	flex-shrink: 0;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.50);
}

.mpp-ap-album-info {
	flex: 1;
	min-width: 0;
	padding-bottom: 2px;
}

.mpp-ap-album-label {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.65);
	margin-bottom: 4px;
}

.mpp-ap-album-title {
	font-size: 20px;
	font-weight: 800;
	color: #fff;
	line-height: 1.25;
	margin-bottom: 4px;
	text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.mpp-ap-album-meta {
	font-size: 13px;
	color: rgba(255, 255, 255, 0.65);
	margin-bottom: 14px;
}

.mpp-ap-play-all {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #fff;
	color: var(--mpp-primary);
	border: none;
	border-radius: 999px;
	padding: 9px 20px;
	font-size: 13px;
	font-weight: 700;
	font-family: 'Noto Sans Tamil', Arial, sans-serif;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
	transition: transform 0.15s, background 0.15s;
}

.mpp-ap-play-all:hover {
	transform: scale(1.05);
	background: #f0f3ff;
}

/* Song list */
.mpp-ap-song-list {
	list-style: none;
	margin: 0;
	padding: 8px 0 14px;
	overflow-y: auto;
	overscroll-behavior: contain;
	flex: 1;
}

.mpp-ap-song-list::-webkit-scrollbar { width: 4px; }
.mpp-ap-song-list::-webkit-scrollbar-track { background: transparent; }
.mpp-ap-song-list::-webkit-scrollbar-thumb { background: #d1d5e8; border-radius: 4px; }

.mpp-ap-song-row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 18px;
	cursor: pointer;
	border-left: 3px solid transparent;
	transition: background 0.12s, border-color 0.12s;
}

.mpp-ap-song-row:hover { background: #f3f5ff; }

.mpp-ap-song-row.is-playing {
	background: #edf0ff;
	border-left-color: var(--mpp-primary);
}

.mpp-ap-song-num {
	font-size: 13px;
	font-weight: 600;
	color: #a0a8c8;
	min-width: 20px;
	text-align: center;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.mpp-ap-song-row.is-playing .mpp-ap-song-num { color: var(--mpp-primary); }

.mpp-ap-song-cover {
	width: 46px;
	height: 46px;
	border-radius: 8px;
	object-fit: cover;
	flex-shrink: 0;
	background: #e3e6ef;
	box-shadow: 0 2px 6px rgba(10,18,51,0.10);
}

.mpp-ap-song-info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.mpp-ap-song-title {
	font-size: 14px;
	font-weight: 600;
	color: #111827;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.3;
}

.mpp-ap-song-row.is-playing .mpp-ap-song-title { color: var(--mpp-primary); }

.mpp-ap-song-artist {
	font-size: 12px;
	color: #8b93b8;
}

.mpp-ap-song-play {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1.5px solid #e0e4f4;
	background: transparent;
	color: #8b93b8;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	flex-shrink: 0;
	transition: background 0.12s, color 0.12s, border-color 0.12s, transform 0.12s;
}

.mpp-ap-song-row:hover .mpp-ap-song-play,
.mpp-ap-song-row.is-playing .mpp-ap-song-play {
	background: var(--mpp-primary);
	color: #fff;
	border-color: var(--mpp-primary);
	transform: scale(1.08);
}

@media (max-width: 480px) {
	.mpp-album-popup-box { border-radius: 18px; max-height: 88vh; }
	.mpp-ap-album-cover  { width: 76px; height: 76px; }
	.mpp-ap-album-title  { font-size: 17px; }
}

/* ---------------------------------------------------------
   Playlist button in player bar
   --------------------------------------------------------- */
.mpp-pl-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 8px;
	opacity: 0.75;
	transition: opacity 0.15s, background 0.15s;
	flex-shrink: 0;
}

.mpp-pl-btn:hover {
	opacity: 1;
	background: rgba(255, 255, 255, 0.12);
}

/* ---------------------------------------------------------
   Playlist popup overlay
   --------------------------------------------------------- */
.mpp-pl-popup {
	position: fixed;
	inset: 0;
	z-index: 100001;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease;
}

.mpp-pl-popup.is-open {
	opacity: 1;
	pointer-events: auto;
}

.mpp-pl-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(8, 14, 40, 0.72);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}

/* ---------------------------------------------------------
   Popup card
   --------------------------------------------------------- */
.mpp-pl-box {
	position: relative;
	z-index: 1;
	background: #fff;
	border-radius: 20px;
	box-shadow: 0 32px 80px rgba(10, 18, 51, 0.40), 0 0 0 1px rgba(10,18,51,0.06);
	width: 100%;
	max-width: 440px;
	max-height: 78vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transform: translateY(28px) scale(0.96);
	transition: transform 0.30s cubic-bezier(0.34, 1.56, 0.64, 1);
	font-family: 'Noto Sans Tamil', 'Latha', Arial, sans-serif;
}

.mpp-pl-popup.is-open .mpp-pl-box {
	transform: translateY(0) scale(1);
}

/* Header */
.mpp-pl-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 18px;
	background: linear-gradient(135deg, var(--mpp-primary) 0%, #1c2b6e 100%);
	color: #fff;
	flex-shrink: 0;
}

.mpp-pl-header-left {
	display: flex;
	align-items: center;
	gap: 10px;
}

.mpp-pl-heading {
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.2px;
}

.mpp-pl-close {
	background: rgba(255, 255, 255, 0.14);
	border: none;
	color: #fff;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s;
	flex-shrink: 0;
}

.mpp-pl-close:hover {
	background: rgba(255, 255, 255, 0.28);
}

/* List */
.mpp-pl-list {
	list-style: none;
	margin: 0;
	padding: 8px 0 12px;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.mpp-pl-list::-webkit-scrollbar {
	width: 4px;
}

.mpp-pl-list::-webkit-scrollbar-track {
	background: transparent;
}

.mpp-pl-list::-webkit-scrollbar-thumb {
	background: #d1d5e8;
	border-radius: 4px;
}

/* List items */
.mpp-pl-item {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 11px 18px;
	cursor: pointer;
	border-left: 3px solid transparent;
	transition: background 0.12s, border-color 0.12s;
}

.mpp-pl-item:hover {
	background: #f3f5ff;
}

.mpp-pl-item.is-active {
	background: #edf0ff;
	border-left-color: var(--mpp-primary);
}

.mpp-pl-item-cover {
	width: 52px;
	height: 52px;
	border-radius: 10px;
	object-fit: cover;
	flex-shrink: 0;
	background: #e3e6ef;
	box-shadow: 0 2px 8px rgba(10, 18, 51, 0.12);
}

.mpp-pl-item-icon {
	width: 52px;
	height: 52px;
	border-radius: 10px;
	background: linear-gradient(135deg, var(--mpp-primary) 0%, #2a3f8f 100%);
	color: rgba(255, 255, 255, 0.9);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	box-shadow: 0 2px 8px rgba(10, 18, 51, 0.20);
}

.mpp-pl-item-info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.mpp-pl-item-name {
	font-size: 14px;
	font-weight: 600;
	color: #111827;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.3;
}

.mpp-pl-item.is-active .mpp-pl-item-name {
	color: var(--mpp-primary);
}

.mpp-pl-item-count {
	font-size: 12px;
	color: #8b93b8;
	font-weight: 400;
}

.mpp-pl-item-check {
	color: var(--mpp-primary);
	flex-shrink: 0;
	display: flex;
	align-items: center;
}

@media (max-width: 480px) {
	.mpp-pl-box {
		border-radius: 16px;
		max-height: 82vh;
	}
}
