/* Full viewport background - Warm retro dark gradient */
body {
	margin: 0;
	padding: 0;
	background: linear-gradient(135deg, #3d2817 0%, #2a1810 50%, #1a0f08 100%);
	background-attachment: fixed;
	min-height: 100vh;
	width: 100vw;
	overflow-x: hidden;
}

/* Ensure background covers entire viewport */
html {
	height: 100%;
	background: linear-gradient(135deg, #3d2817 0%, #2a1810 50%, #1a0f08 100%);
	background-attachment: fixed;
}

/* Mobile-first approach - base styles for mobile */
.container {
	max-width: 100%;
	padding: 10px;
	box-sizing: border-box;
}

/* Main container - responsive */
.vc-container {
	text-align: center;
	height: auto;
	min-height: 300px;
	margin-bottom: 20px;
	position: relative;
	width: 100%;
	max-width: 600px;
	margin: 0 auto 20px auto;
	background: url(../images/bg-2_optimized.jpg) no-repeat center center;
	background-size: cover;
	border-radius: 15px;
	padding: 20px;
	box-sizing: border-box;
}

/* Tape elements - make responsive */
.vc-tape-wrapper {
	-webkit-perspective: 800px;
	-moz-perspective: 800px;
	-o-perspective: 800px;
	-ms-perspective: 800px;
	perspective: 800px;
}

.vc-tape {
	width: 100%;
	max-width: 586px;
	height: auto;
	aspect-ratio: 586/379;
	margin: 20px auto 0;
	position: relative;
	-webkit-transition: all .4s ease-in-out;
	-moz-transition: all .4s ease-in-out;
	-o-transition: all .4s ease-in-out;
	-ms-transition: all .4s ease-in-out;
	transition: all .4s ease-in-out;
}

.vc-loader {
	position: absolute;
	width: 31px;
	height: 31px;
	bottom: 20px;
	left: 50%;
	margin: -15px 0 0 -15px;
	background: transparent url(../images/ajax-loader.gif) no-repeat center center;
	display: none;
}

.vc-tape-back {
	width: 100%;
	height: 100%;
	position: relative;
	background: transparent url(../images/cs_back.png) no-repeat center center;
	background-size: contain;
}

.vc-tape-wheel {
	width: 21.3%;
	height: 33%;
	position: absolute;
	top: 29%;
	background: transparent;
	border-radius: 50%;
	aspect-ratio: 1;
}

.vc-tape-wheel-left {
	left: 18.6%;
	box-shadow: 0 0 0 35px #000;
	/* Match JavaScript maxTape value for consistent sizing */
}

.vc-tape-wheel-right {
	right: 19.3%;
}

.vc-tape-wheel div {
	width: 100%;
	height: 100%;
	background: transparent url(../images/cs_wheel.png) no-repeat center center;
	background-size: contain;
}

.vc-tape-front {
	width: 100%;
	height: 100%;
	position: absolute;
	background: transparent url(../images/cs_front.png) no-repeat center center;
	background-size: contain;
	top: 0px;
	left: 0px;
}

.vc-tape-side-b {
	display: none;
	-webkit-transform: rotate3d(0, 1, 0, 180deg);
	-moz-transform: rotate3d(0, 1, 0, 180deg);
	-o-transform: rotate3d(0, 1, 0, 180deg);
	-ms-transform: rotate3d(0, 1, 0, 180deg);
	transform: rotate3d(0, 1, 0, 180deg);
}

.vc-tape-front span {
	color: rgba(0, 0, 0, 0.6);
	position: absolute;
	top: 22%;
	left: 11.4%;
	font-family: Arial;
	font-weight: bold;
	font-size: clamp(12px, 2.5vw, 18px);
}

/* Fix A and B indicators in landscape mode */
@media screen and (max-width: 768px) and (orientation: landscape) {
	.vc-tape-front span {
		font-size: clamp(10px, 1.8vw, 14px);
	}

	ul.vc-controls li {
		height: 35px;
		line-height: 35px;
		min-width: 45px;
		margin: 0 1px;
	}

	ul.vc-controls li span:before {
		font-size: 14px;
	}
}

/* Controls list - FIXED POSITIONING */
ul.vc-controls {
	list-style: none;
	padding: 8px;
	width: 70%;
	/* Reduced from 90% */
	max-width: 350px;
	/* Reduced from 440px */
	position: absolute;
	bottom: -80px;
	/* Moved below the cassette */
	left: 50%;
	transform: translateX(-50%);
	margin: 0;
	background: url(../images/bg-2_optimized.jpg), -moz-linear-gradient(top, rgba(170, 170, 170, 0.35) 0%, rgba(255, 255, 255, 0.44) 50%, rgba(255, 255, 255, 0.53) 100%);
	background: url(../images/bg-2_optimized.jpg), -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(170, 170, 170, 0.35)), color-stop(50%, rgba(255, 255, 255, 0.44)), color-stop(100%, rgba(255, 255, 255, 0.53)));
	background: url(../images/bg-2_optimized.jpg), -webkit-linear-gradient(top, rgba(170, 170, 170, 0.35) 0%, rgba(255, 255, 255, 0.44) 50%, rgba(255, 255, 255, 0.53) 100%);
	background: url(../images/bg-2_optimized.jpg), -o-linear-gradient(top, rgba(170, 170, 170, 0.35) 0%, rgba(255, 255, 255, 0.44) 50%, rgba(255, 255, 255, 0.53) 100%);
	background: url(../images/bg-2_optimized.jpg), -ms-linear-gradient(top, rgba(170, 170, 170, 0.35) 0%, rgba(255, 255, 255, 0.44) 50%, rgba(255, 255, 255, 0.53) 100%);
	background: url(../images/bg-2_optimized.jpg), linear-gradient(to bottom, rgba(170, 170, 170, 0.35) 0%, rgba(255, 255, 255, 0.44) 50%, rgba(255, 255, 255, 0.53) 100%);
	background-size: cover, auto;
	background-position: center, center;
	filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#59aaaaaa', endColorstr='#87ffffff', GradientType=0);
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-bottom-color: rgba(255, 255, 255, 0.6);
	height: 54px;
	box-shadow:
		inset 0 1px 0px rgba(0, 0, 0, 0.05),
		0 1px 0 rgba(255, 255, 255, 0.8),
		0 -1px 0 rgba(255, 255, 255, 0.4),
		inset 0 2px 19px rgba(0, 0, 0, 0.05),
		0 2px 1px rgba(0, 0, 0, 0.06);
	-webkit-box-sizing: content-box;
	-moz-box-sizing: content-box;
	box-sizing: content-box;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

/* Controls list items - HIDE TEXT, KEEP EXISTING SYMBOLS */
ul.vc-controls li {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 1;
	min-width: 50px;
	height: 40px;
	margin: 0;
	cursor: pointer;
	background: #ddd url(../images/metal.jpg) no-repeat center top;
	box-shadow:
		inset 0 0 0 1px rgba(0, 0, 0, 0.2),
		inset 0 0 1px 2px rgba(255, 255, 255, 0.9),
		inset 0 -6px 5px rgba(0, 0, 0, 0.1),
		0 6px 7px rgba(0, 0, 0, 0.3),
		0 4px 1px rgba(0, 0, 0, 0.5);
	touch-action: manipulation;
	border-radius: 4px;
	/* Hide only the text, not the symbols */
	color: transparent;
	font-size: 0;
	text-indent: -9999px;
	overflow: hidden;
}

ul.vc-controls li span {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	/* Hide text but allow symbols to show */
	color: transparent;
	font-size: 0;
	text-indent: -9999px;
	overflow: hidden;
}

/* Keep the existing symbol system - just make sure they're visible and centered */
ul.vc-controls li span:before {
	/* Reset the hiding properties for symbols */
	color: #444 !important;
	font-size: 16px !important;
	text-indent: 0 !important;
	display: block !important;
	text-align: center !important;
	line-height: 1 !important;
	text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.9) !important;
	font-style: normal !important;
	font-weight: normal !important;
	text-transform: none !important;
	position: relative;
	z-index: 10;
	/* Don't override the existing icon font or content */
}

/* Controls list items - responsive */
ul.vc-controls li {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 1;
	min-width: 60px;
	height: 50px;
	line-height: 50px;
	text-align: center;
	padding: 5px;
	margin: 0 1px;
	cursor: pointer;
	background: #ddd url(../images/metal.jpg) no-repeat center top;
	box-shadow:
		inset 0 0 0 1px rgba(0, 0, 0, 0.2),
		inset 0 0 1px 2px rgba(255, 255, 255, 0.9),
		inset 0 -6px 5px rgba(0, 0, 0, 0.1),
		0 6px 7px rgba(0, 0, 0, 0.3),
		0 4px 1px rgba(0, 0, 0, 0.5);
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	-khtml-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	touch-action: manipulation;
	border-radius: 4px;
	font-family: 'Aldrich', sans-serif;
	font-size: 0;
	/* Hide text */
	font-weight: 300;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: #666;
	text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

ul.vc-controls li span {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	font-size: 0;
	/* Hide text */
}

ul.vc-controls li span:before {
	font-size: 2em;
	/* Make icon large and centered */
	line-height: 1;
	display: block;
	margin: 0 auto;
	font-family: 'playericons', Arial, sans-serif;
	font-style: normal;
	font-weight: normal;
	text-transform: none;
	speak: none;
	text-align: center;
	color: #444;
	text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.9);
}

ul.vc-controls li:first-child {
	border-radius: 8px 4px 4px 8px;
}

ul.vc-controls li:last-child {
	border-radius: 4px 8px 8px 4px;
}

ul.vc-controls li.vc-control-play {
	flex: 1.5;
	/* Slightly larger play button */
}

/* Volume control - HIDDEN */
.vc-volume-wrap {
	display: none !important;
}

/* Control icons */
ul.vc-controls li span:before {
	font-size: clamp(12px, 3vw, 16px);
	line-height: 50px;
	text-align: center;
	color: #444;
	font-family: 'playericons';
	text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.9);
	font-style: normal;
	font-weight: normal;
	text-transform: none;
	speak: none;
	display: block;
	text-decoration: inherit;
}

li.vc-control-pause span:before {
	content: '\50';
}

li.vc-control-fforward span:before {
	content: '\23e9';
}

li.vc-control-rewind span:before {
	content: '\23ea';
}

li.vc-control-stop span:before {
	content: '\25aa';
}

li.vc-control-play span:before {
	content: '\70';
}

li.vc-control-switch span:before {
	content: '\21C4';
	/* Switch icon */
}

/* Hover and active states */
ul.vc-controls li:hover {
	box-shadow:
		inset 0 0 0 1px rgba(0, 0, 0, 0.2),
		inset 0 0 1px 2px rgba(255, 255, 255, 0.9),
		inset 0 -10px 15px rgba(0, 0, 0, 0.1),
		0 6px 7px rgba(0, 0, 0, 0.3),
		0 4px 1px rgba(0, 0, 0, 0.5);
}

ul.vc-controls li.vc-control-active {
	height: 50px;
	margin-top: 2px;
	background-image: url(../images/metal_dark.jpg);
	box-shadow:
		inset 0 0 0 1px rgba(0, 0, 0, 0.18),
		inset 0 0 1px 2px rgba(255, 255, 255, 0.5),
		inset 0 -6px 5px rgba(0, 0, 0, 0.1),
		0 6px 7px rgba(0, 0, 0, 0.3),
		0 2px 1px rgba(0, 0, 0, 0.5);
}

ul.vc-controls li.vc-control-pressed,
ul.vc-controls li.vc-control-active.vc-control-pressed {
	height: 50px;
	background-image: url(../images/metal_dark.jpg);
	margin-top: 4px;
	box-shadow:
		inset 0 0 0 1px rgba(0, 0, 0, 0.2),
		inset 0 0 5px 1px rgba(255, 255, 255, 0.5),
		inset 0 -10px 15px rgba(0, 0, 0, 0.2),
		0 7px 5px rgba(255, 255, 255, 0.5);
}

/* Responsive typography */
h1 {
	font-size: clamp(1.5rem, 4vw, 2.5rem);
	margin: 20px 0;
}

h2 {
	font-size: clamp(1rem, 2.5vw, 1.25rem);
	line-height: 1.4;
	margin: 10px 0;
}

.attribution {
	font-size: clamp(0.75rem, 2vw, 0.9rem);
	padding: 10px;
	margin-top: 120px;
	/* Add space for controls below cassette */
}

/* MOBILE-FIRST: Force horizontal orientation feel */
@media screen and (max-width: 768px) {
	.codrops-top {
		display: none;
	}

	body {
		background: linear-gradient(135deg, #3d2817 0%, #2a1810 50%, #1a0f08 100%);
		background-attachment: fixed;
		/* Warm retro dark for mobile */
	}

	.container {
		padding: 5px;
	}

	.vc-container {
		min-height: 250px;
		margin-bottom: 120px;
		/* Space for controls */
	}

	/* Make cassette feel more horizontal/landscape on mobile */
	.vc-tape {
		transform: rotate(0deg);
		/* Keep it horizontal */
		max-width: 95vw;
	}

	.vc-volume-wrap {
		width: 60px;
		height: 60px;
		right: 5px;
	}

	ul.vc-controls {
		width: 95%;
		max-width: none;
		bottom: -100px;
	}

	ul.vc-controls li {
		min-width: 50px;
		height: 45px;
		line-height: 45px;
		font-size: 8px;
	}
}

@media screen and (max-width: 480px) {
	.vc-volume-wrap {
		width: 50px;
		height: 50px;
	}

	ul.vc-controls {
		height: 40px;
		padding: 4px;
		bottom: -90px;
	}

	ul.vc-controls li {
		height: 35px;
		line-height: 35px;
		font-size: 7px;
		min-width: 40px;
	}
}

/* Landscape mode optimization */
@media screen and (max-height: 500px) and (orientation: landscape) {
	.vc-container {
		min-height: 180px;
		margin-bottom: 100px;
	}

	h1,
	h2 {
		margin: 5px 0;
		font-size: 1.2rem;
	}

	.attribution {
		margin-top: 80px;
		font-size: 0.8rem;
	}
}



/* Animation keyframes */
@-webkit-keyframes rotateLeft {
	0% {
		-webkit-transform: rotate(0deg) translateZ(-1px);
	}

	100% {
		-webkit-transform: rotate(-360deg) translateZ(-1px);
	}
}

@-webkit-keyframes rotateRight {
	0% {
		-webkit-transform: rotate(0deg) translateZ(-1px);
	}

	100% {
		-webkit-transform: rotate(360deg) translateZ(-1px);
	}
}

@-moz-keyframes rotateLeft {
	0% {
		-moz-transform: rotate(0deg) translateZ(-1px);
	}

	100% {
		-moz-transform: rotate(-360deg) translateZ(-1px);
	}
}

@-moz-keyframes rotateRight {
	0% {
		-moz-transform: rotate(0deg) translateZ(-1px);
	}

	100% {
		-moz-transform: rotate(360deg) translateZ(-1px);
	}
}

@keyframes rotateLeft {
	0% {
		transform: rotate(0deg) translateZ(-1px);
	}

	100% {
		transform: rotate(-360deg) translateZ(-1px);
	}
}

@keyframes rotateRight {
	0% {
		transform: rotate(0deg) translateZ(-1px);
	}

	100% {
		transform: rotate(360deg) translateZ(-1px);
	}
}



/* MOBILE LANDSCAPE - Optimized for landscape viewing - FINAL OVERRIDE */
@media screen and (max-width: 768px) and (orientation: landscape) {
	body {
		background: linear-gradient(135deg, #3d2817 0%, #2a1810 50%, #1a0f08 100%);
		background-attachment: fixed;
		/* Same warm retro dark for landscape */
	}

	.vc-container {
		max-width: 45vw;
		width: 45vw;
		margin: 0 auto 80px auto;
	}

	.vc-tape-wrapper {
		width: 100%;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.vc-tape {
		max-width: 100%;
		width: 100%;
		margin: 0 auto;
	}

	/* FORCE BUTTON ROW TO EXTEND AND SHOW ALL BUTTONS */
	ul.vc-controls {
		width: 85% !important;
		max-width: none !important;
		bottom: -80px !important;
		left: 50% !important;
		transform: translateX(-50%) !important;
		position: absolute !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		padding: 6px !important;
		height: auto !important;
		display: flex !important;
		align-items: center !important;
		justify-content: space-between !important;
	}

	ul.vc-controls li {
		flex: 1 !important;
		min-width: 40px !important;
		height: 40px !important;
		margin: 0 2px !important;
	}

	.vc-volume-wrap {
		display: none !important;
	}
}

/*
 PREVENT WHEEL GLITCH - Smooth transitions when stopping animations */
.vc-tape-wheel {
	transition: box-shadow 0.1s ease-out;
}

.vc-tape-wheel div {
	transition: transform 0.1s ease-out;
}

/* Desktop - Ensure gradient shows */
@media screen and (min-width: 769px) {
	body {
		background: linear-gradient(135deg, #3d2817 0%, #2a1810 50%, #1a0f08 100%);
		background-attachment: fixed;
		min-height: 100vh;
		width: 100vw;
	}

	html {
		background: linear-gradient(135deg, #3d2817 0%, #2a1810 50%, #1a0f08 100%);
		background-attachment: fixed;
	}
}

/* ========================================
   PWA LANDSCAPE FIX - FINAL OVERRIDE
   ======================================== */

@media screen and (orientation: landscape) {

	/* Force body to be scrollable */
	html,
	body {
		height: auto !important;
		min-height: 100vh !important;
		overflow-y: auto !important;
		overflow-x: hidden !important;
		position: relative !important;
	}

	/* Make container flexible */
	.container {
		height: auto !important;
		min-height: 100vh !important;
		position: relative !important;
		display: block !important;
		overflow: visible !important;
		padding-bottom: 150px !important;
		/* Space for controls */
	}

	/* Fix cassette container */
	.vc-container {
		position: relative !important;
		height: auto !important;
		min-height: auto !important;
		margin-bottom: 120px !important;
		/* Space for controls */
	}

	/* CRITICAL: Change controls from absolute to relative */
	ul.vc-controls {
		position: relative !important;
		bottom: auto !important;
		left: auto !important;
		transform: none !important;
		margin: 20px auto 0 auto !important;
		width: 85% !important;
		max-width: 500px !important;
	}
}

/* Extra small landscape (PWA specific) */
@media screen and (orientation: landscape) and (max-height: 500px) {
	.container {
		padding-bottom: 100px !important;
	}

	.vc-container {
		transform: scale(0.75) !important;
		margin-bottom: 80px !important;
	}

	ul.vc-controls {
		height: 40px !important;
		padding: 5px !important;
		margin-top: 10px !important;
	}

	ul.vc-controls li {
		height: 35px !important;
		line-height: 35px !important;
		min-width: 40px !important;
	}

	ul.vc-controls li span:before {
		font-size: 14px !important;
	}

	.social-wrapper {
		padding: 15px 10px 10px 10px !important;
		gap: 10px !important;
	}

	.social-link {
		width: 35px !important;
		height: 35px !important;
		font-size: 16px !important;
	}

	.cafecito-wrapper {
		padding: 10px !important;
		margin-top: 10px !important;
	}

	.cafecito-link {
		max-width: 120px !important;
	}
}