/*!
 * RAME FM Stylesheet
 * Author: Azwar Anas
 * Description: Responsive, modern CSS for radio player interface with schedule, carousel, and modal support.
 * Version: 1.2
 * Last Updated: 2025-05-15
 */
 
 
/* Base */
* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

:root {
	--primary: #3a7bd5;
	--primary-dark: #2c5fb3;
	--primary-light: #e8f2ff;
	--secondary: #00d2ff;
	--text: #2c3e50;
	--text-light: #7f8c8d;
	--bg: #f8fafc;
	--white: #ffffff;
	--shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
	--radius: 16px;
}

body {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
	background: var(--bg);
	color: var(--text);
	line-height: 1.6;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

/* Layout */
.container {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
}

section {
	margin: 40px 0;
}

/* Header */
header {
	background: linear-gradient(135deg, var(--primary), var(--secondary));
	color: var(--white);
	padding: 20px 0;
	box-shadow: var(--shadow);
	text-align: center;
}

.header-content {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
}

.logo {
	width: 48px;
	height: 48px;
}

h1 {
	font-size: 1.8rem;
	font-weight: 700;
}

/* Radio Player + request button container (Top area) */
.player-container {
	width: 100%;
	max-width: 1152px;
	background: rgb(23, 70, 151);
	border-radius: 20px;
	padding: 22px 32px 24px 32px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	position: sticky;
	top: 0;
	z-index: 999;
}

.player-controls {
	display: flex;
	align-items: center;
	gap: 20px;
	flex: 1 1 auto;
}

.play-pause-btn {
	background: rgb(255, 255, 255);
	border: none;
	border-radius: 50%;
	width: 72px;
	height: 72px;
	color: white;
	font-size: 40px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.3s ease;
	flex-shrink: 0;
}

.play-pause-btn i {
	color: rgb(6, 97, 216);
	/* Warna biru */
}

.play-pause-btn:hover {
	background: rgb(140, 189, 238);
}

.track-listeners-wrapper {
	display: flex;
	flex-direction: column;
	justify-content: center;
	flex: 1 1 auto;
	min-width: 0;
}

.track-info {
	color: rgb(255, 255, 255);
	font-size: 1.5rem;
	user-select: text;
	font-weight: bold;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.listeners {
	color: rgb(157, 194, 238);
	font-size: 1.05rem;
	margin-top: 4px;
	user-select: none;
}

.request-btn {
	flex-shrink: 0;
	background: rgb(255, 255, 255);
	border: none;
	border-radius: 18px;
	color: rgb(6, 109, 226);
	font-weight: 700;
	font-size: 1.3rem;
	padding: 14px 28px;
	cursor: pointer;
	box-shadow: 0 0 15px #4A90E2bb;
	transition: background 0.3s ease;
	user-select: none;
}

.request-btn:hover {
	background: rgb(148, 187, 226);
}

/* Banner */
.banner {
	width: 100%;
	aspect-ratio: 1 / 1;
	border-radius: var(--radius);
	overflow: hidden;
	position: relative;
	box-shadow: var(--shadow);
}

.banner img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Current Program */
.current-program {
	background: var(--white);
	border-radius: var(--radius);
	padding: 24px;
	box-shadow: var(--shadow);
	display: flex;
	align-items: center;
	gap: 24px;
}

.host-photo {
	width: 100px;
	height: 100px;
	object-fit: cover;
}

.program-info h2 {
	color: var(--primary);
	margin-bottom: 8px;
}

.program-time {
	color: var(--text-light);
	font-size: 0.9rem;
	margin-bottom: 8px;
}

.host-name {
	font-weight: 500;
}

/* Schedule */
.schedule {
	background: var(--white);
	border-radius: var(--radius);
	padding: 24px;
	box-shadow: var(--shadow);
}

.schedule h2 {
	color: var(--primary);
	margin-bottom: 20px;
	font-size: 1.5rem;
}

.schedule-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.schedule-item {
	display: flex;
	justify-content: space-between;
	padding: 12px 0;
	border-bottom: 1px solid #eee;
}

.schedule-time {
	width: 120px;
	color: var(--text);
	font-weight: 500;
}

.schedule-program {
	flex: 1;
	color: var(--text);
}

.schedule-host {
	width: 150px;
	color: var(--text-light);
	text-align: right;
}

.current {
	background-color: var(--primary-light);
	border-radius: 8px;
	padding: 12px;
	margin: -12px;
}

.past {
	opacity: 0.6;
}

/* Carousel for programs with horizontal layout */
.carousel-wrapper {
	width: 100%;
	max-width: 1152px;
	margin-bottom: 48px;
}

.carousel {
	position: relative;
	overflow: hidden;
	border-radius: 20px;
}

.carousel-track {
	display: flex;
	overflow-x: hidden;
	/* hide scrollbar, handling scroll by code */
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	padding: 12px 0;
	gap: 16px;
}

.carousel-item {
	flex: 0 0 auto;
	width: 350px;
	height: 128px;
	background: white;
	border-radius: 14px;
	display: flex;
	align-items: center;
	gap: 18px;
	padding: 12px 16px;
	user-select: none;
	cursor: grab;
}

.carousel-item img {
	width: 104px;
	height: 104px;
	border-radius: 14px;
	flex-shrink: 0;
}

.carousel-item p {
	font-size: 1.25rem;
	font-weight: 700;
	color: #1a3d7c;
	user-select: text;
	margin: 0;
}

/* Carousel arrows */
.carousel-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 38px;
	height: 38px;
	background: #4A90E2cc;
	border-radius: 50%;
	box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
	border: none;
	color: white;
	cursor: pointer;
	z-index: 10;
	transition: background-color 0.3s;
	user-select: none;
}

.carousel-arrow:hover {
	background: #357ABDdd;
}

.carousel-arrow:focus {
	outline: 2px solid #357ABD;
}

.carousel-arrow.left {
	left: 8px;
}

.carousel-arrow.right {
	right: 8px;
}

/* Footer */
footer {
	background: var(--text);
	color: var(--white);
	padding: 24px 0;
	text-align: center;
	margin-top: auto;
}

/* Modal */
.modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.8);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 1000;
	padding: 20px;
}

.modal-content {
	background: var(--white);
	border-radius: var(--radius);
	width: 100%;
	max-width: 500px;
	padding: 32px;
	position: relative;
}

.close-modal {
	position: absolute;
	top: 16px;
	right: 16px;
	font-size: 24px;
	cursor: pointer;
	color: var(--text-light);
}

.modal h2 {
	color: var(--primary);
	margin-bottom: 24px;
	text-align: center;
}

.form-group {
	margin-bottom: 20px;
}

.form-group label {
	display: block;
	margin-bottom: 8px;
	font-weight: 500;
}

.form-group input,
.form-group textarea {
	width: 100%;
	padding: 12px 16px;
	border: 1px solid #ddd;
	border-radius: 8px;
	font-size: 1rem;
}

.form-group textarea {
	min-height: 100px;
	resize: vertical;
}

.submit-btn {
	background: var(--primary);
	color: var(--white);
	border: none;
	border-radius: 50px;
	padding: 12px 24px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	width: 100%;
	transition: all 0.3s ease;
}

.submit-btn:hover {
	background: var(--primary-dark);
}


/* Mobile fixed bottom request button */
.fixed-request-mobile {
	display: none;
}

/* Responsive */
@media (max-width: 768px) {
	.container {
		padding: 0 16px;
	}

	.current-program {
		flex-direction: column;
		text-align: center;
	}

	.host-photo {
		margin-bottom: 16px;
	}

	.schedule-item {
		flex-direction: column;
		gap: 4px;
	}

	.schedule-time,
	.schedule-program,
	.schedule-host {
		width: 100%;
		text-align: left;
	}

	.schedule-host {
		text-align: left;
	}
}

@media (max-width: 480px) {
	header h1 {
		font-size: 1.3rem;
	}

	.banner-text {
		font-size: 1.2rem;
		left: 16px;
		right: 16px;
		bottom: 16px;
	}

	.player-container {
		justify-content: flex-start;
		padding: 18px 16px 20px;
	}

	/* Play/Pause always at left */
	.play-pause-btn {
		width: 56px;
		height: 56px;
		font-size: 30px;
	}

	/* Track and listener text in column with marquee on track */
	.track-listeners-wrapper {
		flex-direction: column;
		min-width: 0;
	}

	/* Hide top Request button on mobile */
	.request-btn {
		display: none;
	}

	/* Marquee effect for track-info on mobile */
	.marquee-container {
		position: relative;
		overflow: hidden;
		width: 100%;
		max-width: 220px;
		white-space: nowrap;
	}

	.marquee-text {
		display: inline-block;
		padding-left: 100%;
		animation: marquee 10s linear infinite;
	}

	@keyframes marquee {
		0% {
			transform: translateX(0%);
		}

		100% {
			transform: translateX(-100%);
		}
	}

	/* Mobile fixed bottom request button */
	.fixed-request-mobile {
		display: flex;
		position: fixed;
		bottom: 0;
		left: 0;
		width: 100%;
		background: #4A90E2;
		padding: 14px 16px;
		justify-content: center;
		box-shadow: 0 -4px 10px rgba(74, 144, 226, 0.7);
		z-index: 1500;
		user-select: none;
	}

	.fixed-request-mobile button {
		width: 100%;
		max-width: 360px;
		border-radius: 20px;
		font-size: 1.4rem;
		font-weight: 700;
		border: none;
		padding: 14px 0;
		color: white;
		background: #357ABD;
		cursor: pointer;
		box-shadow: 0 4px 10px #225bb5aa;
		transition: background 0.3s ease;
	}

	.fixed-request-mobile button:hover {
		background: #1f3f76;
	}
}

/* Larger screen layouts */
@media (min-width: 720px) {

	/* Keep player container flex row and aligned */
	.player-container {
		flex-wrap: nowrap;
		justify-content: space-between;
	}

	/* Remove marquee on desktop - show normal track */
	.marquee-container,
	.marquee-text {
		animation: none;
		padding-left: 0;
		overflow: visible;
		white-space: normal;
		width: auto;
	}
}