/*
Theme Name: Challecious Music
Template: hostinger-ai-theme
Description: Dark, modern Zambian music streaming and free-download platform.
Version: 1.0.0
Text Domain: challecious-music-theme
*/

:root {
	--chm-bg: #282828;
	--chm-bg-raised: #333333;
	--chm-accent: #39FF14;
	--chm-text: #FFFFFF;
	--chm-text-secondary: rgba(255, 255, 255, 0.65);
	--chm-border: rgba(255, 255, 255, 0.1);
	--chm-radius: 6px;
}

* { box-sizing: border-box; }

body.chm-body {
	background: var(--chm-bg);
	color: var(--chm-text);
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	margin: 0;
	padding-bottom: 90px;
}

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

.chm-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

/* Header */
.chm-header {
	position: sticky;
	top: 0;
	z-index: 500;
	background: rgba(24, 24, 24, 0.96);
	backdrop-filter: blur(6px);
	border-bottom: 1px solid var(--chm-border);
}
.chm-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 20px;
	max-width: 1200px;
	margin: 0 auto;
}
.chm-logo { font-size: 20px; font-weight: 800; letter-spacing: 0.5px; color: var(--chm-text); }
.chm-logo span { color: var(--chm-accent); }
.chm-nav { display: flex; gap: 22px; }
.chm-nav a { font-size: 14px; font-weight: 600; color: var(--chm-text-secondary); }
.chm-nav a:hover, .chm-nav a.chm-active { color: var(--chm-accent); }
.chm-header-actions { display: flex; align-items: center; gap: 14px; }
.chm-search-form { display: flex; align-items: center; background: var(--chm-bg-raised); border-radius: 999px; padding: 6px 14px; }
.chm-search-form input { background: transparent; border: 0; color: var(--chm-text); font-size: 14px; width: 160px; outline: none; }
.chm-menu-toggle { display: none; background: none; border: 0; color: var(--chm-text); font-size: 22px; cursor: pointer; }

@media (max-width: 860px) {
	.chm-nav { display: none; }
	.chm-menu-toggle { display: block; }
	.chm-search-form input { width: 100px; }
}

/* Sections */
.chm-section { padding: 34px 0; }
.chm-section-title { font-size: 20px; font-weight: 800; margin: 0 0 16px; display: flex; align-items: center; gap: 10px; }
.chm-section-title .chm-eyebrow { color: var(--chm-accent); font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; display: block; margin-bottom: 4px; }

/* Carousel */
.chm-carousel-wrap { position: relative; }
.chm-carousel {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	scroll-behavior: smooth;
	padding-bottom: 8px;
	-webkit-overflow-scrolling: touch;
}
.chm-carousel::-webkit-scrollbar { height: 6px; }
.chm-carousel::-webkit-scrollbar-thumb { background: var(--chm-border); border-radius: 3px; }
.chm-carousel-nav {
	position: absolute; top: 40%; transform: translateY(-50%);
	width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--chm-border);
	background: rgba(0,0,0,0.6); color: var(--chm-text); cursor: pointer; font-size: 16px; z-index: 5;
}
.chm-carousel-nav.prev { left: -6px; }
.chm-carousel-nav.next { right: -6px; }
@media (max-width: 860px) { .chm-carousel-nav { display: none; } }

/* Music card */
.chm-card {
	flex: 0 0 190px;
	scroll-snap-align: start;
	background: var(--chm-bg-raised);
	border-radius: var(--chm-radius);
	overflow: hidden;
	position: relative;
}
.chm-card-art { position: relative; aspect-ratio: 1 / 1; background: #1c1c1c; }
.chm-card-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chm-card-rank { position: absolute; top: 8px; left: 8px; background: var(--chm-accent); color: #111; font-weight: 800; font-size: 13px; padding: 2px 8px; border-radius: 4px; }
.chm-card-play {
	position: absolute; bottom: 8px; right: 8px; width: 38px; height: 38px; border-radius: 50%;
	background: var(--chm-accent); color: #111; display: flex; align-items: center; justify-content: center;
	font-size: 16px; border: 0; cursor: pointer;
}
.chm-card-body { padding: 10px 12px 14px; }
.chm-card-title { font-size: 14px; font-weight: 700; margin: 0 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chm-card-artist { font-size: 12px; color: var(--chm-text-secondary); margin: 0 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chm-card-stats { font-size: 11px; color: var(--chm-text-secondary); display: flex; gap: 10px; }
.chm-card-movement { font-size: 11px; color: var(--chm-accent); margin-left: auto; }

/* Grid (latest music, artists, genres) */
.chm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }

/* Buttons */
.chm-btn {
	display: inline-flex; align-items: center; gap: 6px; background: var(--chm-accent); color: #111;
	font-weight: 700; font-size: 13px; padding: 9px 16px; border-radius: 999px; border: 0; cursor: pointer;
}
.chm-btn-outline { background: transparent; color: var(--chm-text); border: 1px solid var(--chm-border); }

/* Single song page */
.chm-song-hero { display: flex; gap: 28px; flex-wrap: wrap; align-items: flex-start; padding: 40px 0; }
.chm-song-art { width: 260px; height: 260px; border-radius: var(--chm-radius); overflow: hidden; background: #1c1c1c; flex-shrink: 0; }
.chm-song-art img { width: 100%; height: 100%; object-fit: cover; }
.chm-song-info h1 { font-size: 30px; margin: 0 0 6px; }
.chm-song-info .chm-song-artist { font-size: 16px; color: var(--chm-text-secondary); margin-bottom: 14px; }
.chm-song-meta { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13px; color: var(--chm-text-secondary); margin-bottom: 18px; }
.chm-song-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.chm-song-details-table { width: 100%; border-collapse: collapse; margin-top: 30px; }
.chm-song-details-table td { padding: 8px 0; border-bottom: 1px solid var(--chm-border); font-size: 14px; }
.chm-song-details-table td:first-child { color: var(--chm-text-secondary); width: 180px; }

/* Footer */
.chm-footer { background: #1c1c1c; border-top: 1px solid var(--chm-border); padding: 40px 0 100px; margin-top: 40px; }
.chm-footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; }
.chm-footer h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--chm-text-secondary); margin: 0 0 12px; }
.chm-footer ul { list-style: none; margin: 0; padding: 0; }
.chm-footer li { margin-bottom: 8px; font-size: 14px; }
.chm-footer-bottom { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--chm-border); font-size: 12px; color: var(--chm-text-secondary); }

/* Global player */
.chm-player-bar {
	position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;
	background: #181818; border-top: 1px solid var(--chm-border);
	padding: 10px 20px; display: none;
}
.chm-player-bar.chm-visible { display: block; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.chm-carousel { scroll-behavior: auto; }
}