#vr-container {
	position: relative;
	display: inline-block;
	width: 100%;
}

video {
	width: 100%;
	height: auto;
    aspect-ratio: 16/9;
}

#playBtn {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	width: 80px;
	height: 80px;
	transition: opacity 0.3s ease, transform 0.2s ease;
	z-index: 10;
}

#playBtn:hover {
	transform: translate(-50%, -50%) scale(1.1);
}

#playBtn:active {
	transform: translate(-50%, -50%) scale(0.95);
}

#playBtn.hidden {
	opacity: 0;
	pointer-events: none;
}

#playBtn img {
	width: 100%;
	height: 100%;
}

/* Responsive sizing */
@media (max-width: 600px) {
	#playBtn {
		width: 60px;
		height: 60px;
	}
}

@media (min-width: 900px) {
	#playBtn {
		width: 100px;
		height: 100px;
	}
}

/* 2D Video Controls Panel */
#panel {
	position: absolute;
	bottom: 10%;
	left: 50%;
	transform: translateX(-50%);
	width: 80%;
	padding: 20px;
	border-radius: 30px;
	background: rgba(0, 0, 0, 0.70);
	color: #fff;
	font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
	z-index: 100;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.15s ease, visibility 0.15s ease;
	pointer-events: none;
}

#panel.visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

#status {
	margin: 0 12px 12px 12px;
}

#video-title {
	text-align: center;
	margin: 0 0 16px 0;
	font-size: 1rem;
	font-weight: 500;
}

#current-time,
#total-time {
	margin: 0;
	font-size: 0.875rem;
	font-variant-numeric: tabular-nums;
}

#progress {
	display: grid;
	grid-template-columns: min-content 1fr min-content;
	grid-gap: 8px;
	align-items: center;
}

#bar {
	width: 100%;
	height: 4px;
	border-radius: 2px;
	background: #666;
	cursor: pointer;
	position: relative;
}

#played {
	border-radius: 2px;
	background: #fff;
	height: 4px;
	width: 0%;
	transition: width 0.1s ease;
}

#controls {
    display: flex;
    justify-content: space-between; /* Separa el grupo izquierdo del derecho */
    align-items: center;
    width: 100%;
    padding: 10px 20px;
    box-sizing: border-box;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 15px; /* Espacio uniforme entre botones del mismo grupo */
}

.right-group {
    gap: 20px; 
}

#nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

#panel button {
	cursor: pointer;
	border: none;
	background-color: transparent;
}

#fullscreen {
	grid-area: full;
	width: 44px;
	height: 44px;
	background-image: url(images/fullscreen.png);
	background-size: 44px 44px;
	background-repeat: no-repeat;
	background-position: center;
	transition: background-image 0.15s ease-in-out;
}

#fullscreen:hover {
	background-image: url(images/fullscreen-hover.png);
}

#mute {
	grid-area: mute;
	width: 44px;
	height: 44px;
	background-image: url(images/mute.png);
	background-size: 44px 44px;
	background-repeat: no-repeat;
	background-position: center;
	transition: background-image 0.15s ease-in-out;
}

#mute:hover {
	background-image: url(images/mute-hover.png);
}

#mute.muted {
	background-image: url(images/mute.png);
}

#mute.muted:hover {
	background-image: url(images/mute-hover.png);
}

#mute.unmuted {
	background-image: url(images/unmute.png);
}

#mute.unmuted:hover {
	background-image: url(images/unmute-hover.png);
}


#back {
	width: 44px;
	height: 44px;
	background-image: url(images/back.png);
	background-size: 44px 44px;
	background-repeat: no-repeat;
	background-position: center;
	transition: background-image 0.15s ease-in-out;
}

#back:hover {
	background-image: url(images/back-hover.png);
}

#play2 {
	width: 44px;
	height: 44px;
	background-image: url(images/play2.png);
	background-size: 44px 44px;
	background-repeat: no-repeat;
	background-position: center;
	transition: background-image 0.15s ease-in-out;
}

#play2:hover {
	background-image: url(images/play2-hover.png);
}

#play2.paused {
	background-image: url(images/play2.png);
}

#play2.paused:hover {
	background-image: url(images/play2-hover.png);
}

#play2.playing {
	background-image: url(images/pause.png);
}

#play2.playing:hover {
	background-image: url(images/pause-hover.png);
}

#forward {
	width: 44px;
	height: 44px;
	background-image: url(images/forward.png);
	background-size: 44px 44px;
	background-repeat: no-repeat;
	background-position: center;
	transition: background-image 0.15s ease-in-out;
}

#forward:hover {
	background-image: url(images/forward-hover.png);
}

/* Contenedor relativo para posicionar el menú flotante */
#settings-container {
    position: relative;
    display: inline-block;
}

/* Botón del Engranaje */
#gear-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: transform 0.3s ease, color 0.2s ease;
}

#gear-btn:hover {
    transform: rotate(45deg);
    color: #00adb5;
}

#gear-btn svg {
    width: 24px;
    height: 24px;
}

/* El menú flotante ahora se desplegará perfectamente alineado hacia arriba a la izquierda */
#resolution-select {
    position: absolute;
    bottom: 45px; 
    left: 0; /* Alineado al borde izquierdo del botón */
    background: rgba(15, 15, 15, 0.95);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 13px;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

#resolution-select option {
    background: #151515;
    color: white;
}

/* Mostrar menú */
#resolution-select.show-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}