/* header rule removed to prevent conflict with .site-header */

.info h4 {
	line-height: 1.5em;
	height: 1em;
	justify-content: start;
	text-overflow: ellipsis;
}

.logo {
	background: linear-gradient(to right, white 74%, var(--hover-color) 75%);
	background-clip: text;
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

loginStatus {
	padding: 10px;
}

/* Header layout */


#filterBtn {
	border-radius: 4px 0 0 4px;
	color: #e0e0e0;
}

.toggle-container {
	display: flex;
}

.toggle-btn {
	padding: 10px 15px;
	margin: 0;
	background: var(--dark-accent-color);
	border: none;
	color: white;
	cursor: pointer;
	transition: all 0.3s;
	font-size: x-large;
	width: 80px;
	text-align: center;
}

.toggle-btn[data-type="movie"] {
	border-radius: 20px 0 0 20px;
}

.toggle-btn[data-type="tv"] {
	border-radius: 0 20px 20px 0;
}

.toggle-btn.active {
	background: var(--hover-color);
}

.toggle-btn:hover {
	background: var(--hover-color);
}

/* Main Section Toggle with smooth transitions */
.main-section {
	position: relative;
	display: none;
	padding: 30px;
	min-height: 1000px;
	opacity: 0;
	transform: translateY(10px);
	transition: opacity 0.4s ease, transform 0.4s ease;
}

.main-section.active {
	display: flex;
	opacity: 1;
	transform: translateY(0);
}

#moviesSection,
#tvSection {
	flex-direction: row;
}

/* Grid Section */
.section {
	margin-bottom: 20px;
    padding-left: 20px;
	justify-content: center;
	display: flex;
	flex-direction: column;
}

.section h1 {
	margin: 10px;
	text-align: center;
	color: var(--text-color);
}

.grid-container {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(var(--media-card-width), 1fr));
	grid-gap: 20px;
}




/* Sub-content container: fixed height with scroll for infinite loading */

.sub-content {
	min-height: 600px;
	flex: 2;
}

@media (max-width: 768px) {
	.sub-content {
		padding-left: 0px;
		padding-right: 0px;
	}

	.section {
   		padding-left: 0px;
	}
}

.sub-content::-webkit-scrollbar {
	width: 8px;
}

.sub-content::-webkit-scrollbar-thumb {
	background: #444;
	border-radius: 4px;
}

/* Random Movie Modal with improved visibility */


.live-tv {
	margin-right: 20px;
	filter: hue-rotate(120deg);
	cursor: pointer;
}

.live-tv:hover {
	filter: hue-rotate(90deg);
}

@media (max-width: 768px) {
	/* 1) Header: Ensure it's not absolute and doesn't overlap carousel */
	/* Header styles are now in common.css */


	.search-container {
		width: 95%;
		margin: 5px auto;
	}

	.person-card {
		zoom: 0.6 !important;
	}

	.toggle-container {
		display: flex;
		justify-content: center;
		margin: 5px 0;
	}

	.close-btn {
		right: 10px !important;
	}

	.toggle-btn {
		font-size: 1em;
		padding: 5px 10px;
		margin: 0 3px;
	}

	/* Progress Section */
	.tv-progress-card,
	.movie-progress-card {
		zoom: 0.75;
	}

	/* 4) Section Headings */
	.main-section {
		margin: 5px 0;
		padding: 0 10px;
		flex-direction: column !important;
	}

	.section h1 {
		text-align: center;
		font-size: 1.2em;
		margin-bottom: 10px;
	}

	/* 5) (Optional) Two-Column Results */
	.grid-container {
		grid-template-columns: 1fr 1fr !important;
		gap: 10px !important;
		justify-items: center;
	}

	/* 6) Buttons (Random, Load More) */
	.random-item-btn {
		display: block;
		margin: 0 auto 10px;
		font-size: 1em;
		padding: 8px 12px;
	}
}

.logo img {
	filter: invert(0);
}

/* Top 10 Styling */
.top-10-card {
	overflow: visible;
	/* Allow rank to spill out */
	margin-left: 60px;
	/* Make space for the number */
	position: relative;
}

.rank-number {
	position: absolute;
	bottom: 10%;
	left: -70px;
	font-size: 10rem;
	font-weight: 900;
	color: var(--background-color);
	/* Dark fill */
	-webkit-text-stroke: 4px #595959;
	/* Stroke */
	line-height: 0.8;
	z-index: 10;
	font-family: 'Impact', sans-serif;
	/* Strong font */
	pointer-events: none;
	text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.8);
}

/* Adjust grid for top 10 to handle the margin */
.top-10-card {
	transform-origin: center left;
}

/* Ensure the number doesn't get cut off in the grid container */
.grid-container {
	padding-left: 20px;
}

/* Mobile adjustments for Top 10 */
@media (max-width: 768px) {
	.top-10-card {
		margin-left: 40px;
	}

	.rank-number {
		font-size: 6rem;
		left: -45px;
		-webkit-text-stroke: 2px #595959;
	}
}

/* Hamburger Dropdown */


/* Horizontal Scroll Styles */
.horizontal-scroll-wrapper {
	position: relative;
	max-width: 94vw;
	padding: 0;
	box-sizing: border-box;
}

.horizontal-grid {
	display: flex;
	flex-wrap: nowrap;
	overflow-x: auto;
	gap: 20px;
	padding: 20px 60px 20px 20px;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-ms-overflow-style: none;
	width: 100%;
	box-sizing: border-box;
	align-items: stretch;
	/* Ensure cards stretch to same height if not fixed */
}

.horizontal-grid::-webkit-scrollbar {
	display: none;
	/* Chrome/Safari */
}

.multi-row-container {
	display: flex;
	flex-direction: column;
	gap: 20px;
	width: 100%;
	overflow: hidden;
	/* Prevent container from overflowing */
}

.horizontal-grid .media-card {
	flex: 0 0 auto;
}

.sub-tabs-scroll-area {
	display: flex;
	overflow-x: auto;
	gap: 15px;
	padding: 10px;
	scroll-behavior: smooth;
	scrollbar-width: none;
	max-width: 80%;
	/* Limit width to allow arrows */
	white-space: nowrap;
}

.sub-tabs-scroll-area::-webkit-scrollbar {
	display: none;
}

/* Scroll Buttons */
.scroll-btn {
	position: absolute;
	top: -5%;
	transform: translateY(-50%);
	z-index: 1000;
	background: rgba(0, 0, 0, 0.5);
	border: none;
	color: white;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.3s;
	flex-shrink: 0;
}

.scroll-btn:hover {
	background: rgba(255, 255, 255, 0.2);
}

.scroll-btn.left-btn {
	right: 75px;
}

.scroll-btn.right-btn {
	right: 10px;
}

/* Top 10 Specifics */
.top-10-section h1 {
	margin-left: 20px;
	margin-bottom: 10px;
}

.top-10-card {
	margin-left: 60px;
	/* Ensure space for rank */
	margin-right: 10px;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
	.sub-tabs-scroll-area {
		max-width: 100%;
	}

	.scroll-btn {
		display: none;
		/* Hide arrows on mobile, use touch scroll */
	}

	.top-10-card {
		margin-left: 40px;
	}
}

/* Active Drag State (from common.js) */
.active-drag {
	cursor: grabbing !important;
	scroll-behavior: auto !important;
	/* Fix jitter */
}

/* Drag Scroll State */
.is-dragging {
	cursor: grabbing !important;
}

.is-dragging .media-card,
.is-dragging .top-10-card,
.is-dragging button {
	pointer-events: none;
}