@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

/* Franjas diagonales paralelas a la esquina inferior derecha */
/*body::after {
  content: '';
  position: fixed;
  bottom: 0;
  right: 0;
  width: 284px; 
  height: 284px; 
  clip-path: polygon(100% 100%, 0% 100%, 100% 0%);
  background: repeating-linear-gradient(
    135deg,
    #3687BE 0 50px,
    #545E27 50px 100px,
    #E7802F 100px 150px,
    #C22A34 150px 200px
  );
  opacity: 0.85;
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: 1000;
}

body::before {
  content: '';
  position: fixed;
  bottom: 0;
  right: 0;
  width: 310px;
  height: 310px;
  background: radial-gradient(
    circle at center,
    transparent 0%,
    transparent 70%,
    rgba(255,255,255,0.3) 100%
  );
  clip-path: polygon(100% 100%, 0% 100%, 100% 0%);
  z-index: 999;
  pointer-events: none;
}*/


/* Franjas en la esquina superior derecha */
  body::after {
    content: '';
    position: fixed;
    top: 0;
    right: 0;
    width: 284px;
    height: 284px;
    clip-path: polygon(100% 0%, 100% 100%, 0% 0%);
    background: repeating-linear-gradient(
      45deg,
      #3687BE 0 50px,
      #545E27 50px 100px,
      #E7802F 100px 150px,
      #C22A34 150px 200px
    );
    opacity: 0.85;
    pointer-events: none;
    mix-blend-mode: overlay;
    z-index: 1000;
  }

  /* Sombra difuminada para la esquina */
  body::before {
    content: '';
    position: fixed;
    top: 0;
    right: 0;
    width: 310px;
    height: 310px;
    background: radial-gradient(
      circle at center,
      transparent 0%,
      transparent 70%,
      rgba(255,255,255,0.3) 100%
    );
    clip-path: polygon(100% 0%, 100% 100%, 0% 0%);
    z-index: 999;
    pointer-events: none;
  }

  body {
    background: #000;
    color: #fff;
    font-family: 'VT323', monospace;
    height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
    position: relative;
  	z-index:1;
  	overflow:auto;
  }

  /* Monitor CRT */
  .monitor {
    width: 900px;
    height: 720px;
    display: flex;
  	flex-flow:column;
    align-items: center;
    justify-content: flex-end;
    background: linear-gradient(121.79deg, #E7DFD0 0%, #DCD1BB 3.75%);
    border-radius: 3px 3px 0px 0px;
    position: relative;
    margin-bottom: 20px;
    border-radius: 10px 10px 0px 0px;
  	overflow:visible;
  	z-index: 999999;
  }


  /* Marco del monitor (reemplaza ::before) */
  .monitor-bezel {
    position: relative;
  	display:flex;
  	align-items:center;
  	justify-content:center;
    width: 86%;
    height: 70%;
    background: #DCD1BB;
    box-shadow: inset 0px 267px 4px -8px rgba(0, 0, 0, 0.25), 
                inset 0px 0px 10px 6px #A29E96;
    border-radius: 5px;
    z-index: 1;
  	margin-bottom:0.5em;
  }
/*
  .monitor::after {
    content: '';
    position: absolute;
    width: 740px;
    height: 530px;
    background: linear-gradient(119.8deg, #83868C 0%, #292D36 69.96%);
    box-shadow: inset 0px 0px 4px 4px rgba(0, 0, 0, 0.42);
    border-radius: 2px;
  }

  .monitor::before {
    content: '';
    position: absolute;
    width: 770px;
    min-height: 580px;
  	max-height: min-content;
    background: #DCD1BB;
    box-shadow: inset 0px 267px 4px -8px rgba(0, 0, 0, 0.25), 
                inset 0px 0px 10px 6px #A29E96;
    filter: blur(0.9px);
  }*/

  .monitor-panel {
    position: absolute;
    top: 100%;
    width: 100%;
    height: 60px;
    background: #DCD1BB;
    box-shadow: 0px 10px 22px rgba(0, 0, 0, 0.25), 
                inset 0px 4px 2px -2px rgba(0, 0, 0, 0.15);
    display: flex;
    justify-content: center;
    align-items: center;
  	border-radius:0px 0px 10px 10px;
  }

  /* Contenedor del reproductor dentro del monitor */
  .player-container {
    width: 96%;
    height: 94%;
  	display:flex;
  	align-items:center;
  	justify-content:center;
    background: linear-gradient(119.8deg, #83868C 0%, #292D36 69.96%);
    box-shadow: inset 0px 0px 4px 4px rgba(0, 0, 0, 0.42);
    border-radius: 2px;
    position: relative;
    z-index: 2;
  }

  /* TV CRT marco */
  .tv-crt {
    background: #111;
    border: 12px solid #333;
    border-radius: 8px;
    box-shadow:
      inset 0 0 50px #0f0,
      0 0 60px #0f0;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
  display: contents;
  }

  /* Header con franjas multicolor VHS Sync T-180 */
  header {
    width: 90%;
  	max-width:980px;
  	min-height:fit-content;
    font-weight: bold;
    font-size: 1.6rem;
    text-align: center;
    padding: 8px 0;
    font-family: 'VT323', monospace;
    user-select: none;
    position: relative;
    overflow: hidden;
  margin:2em auto;
  z-index:2;
  }

	header *{
		color:white;
    	font-family: system-ui;
	}

header h1{
	font-size:50px;
	text-align:left;
}

header h2{
	font-size:30px;
	text-align:left;
	font-weight:normal;
}

header h3{
	font-size:40px;
	text-align:left;
}

  /* Video con efecto VHS */
  video#vhs-video {
    width: 100%;
    height: 99%;
    object-fit: cover;
    filter: blur(1.5px) contrast(0.8) saturate(0.7);
    image-rendering: pixelated;
    transform-origin: center center;
    transform: scale(1);
    position: relative;
    z-index: 1;
  }

  /* Canvas para efectos VHS superpuesto */
  canvas.vhs-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
  }

  /* Controles personalizados */
  .controls {
    background: #bdb7a9;
    display: flex;
    align-items: center;
  	flex-flow:wrap;
    justify-content: space-between;
    padding: 0.5em 1em;
    font-size: 1.2rem;
    user-select: none;
    width: 85%;
    z-index: 3;
  	margin-bottom:0.5em;
  	border-radius:5px;
  }

.controls #progress{
	width:100%;
	min-width:100%;
	margin-bottom:1em;
}

  .btn {
    cursor: pointer;
    background: #222;
    border: 1px solid #555;
    color: #830b0b;
    padding: 6px 12px;
    border-radius: 6px;
    transition: background 0.3s ease;
    margin: 0 2px;
  	width: 3em;
    height: 2.6em;
    text-align: center;
    justify-content: center;
    align-items: center;
    display: flex;
  }
  .btn:hover {
    background: #3b3b3b;
    color: #830b0b;
  	transform: scale(0.95);
  }

  .btn.active {
    background: #3b3b3b;
    color: #000;
  }

  .btn-group {
    display: flex;
  	align-items: center;
  }

  input[type="range"] {
    -webkit-appearance: none;
    width: 150px;
    height: 8px;
    background: #333;
    border-radius: 5px;
    cursor: pointer;
    margin: 0 5px;
  }
  input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #830b0b; /* Bolita del slider del control */
    border-radius: 50%;
    cursor: pointer;
    border: none;
  }
  input[type="range"]:focus {
    outline: none;
  }

  .time {
    font-variant-numeric: tabular-nums;
  	color:black;
    min-width: 120px;
    text-align: center;
  }

  /* Efecto de distorsión VHS */
  .vhs-distortion {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, 
      rgba(0,255,0,0.03) 0%, 
      rgba(0,255,0,0) 20%, 
      rgba(0,255,0,0.03) 40%, 
      rgba(0,255,0,0) 60%, 
      rgba(0,255,0,0.03) 80%, 
      rgba(0,255,0,0) 100%);
    pointer-events: none;
    z-index: 2;
  }

  /* Modal de ajustes */
  .settings-modal {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 20px;
    z-index: 10;
    width: 300px;
  }

	.settings-modal  input[type="range"] {
    	width: 100%;
	}

  .settings-modal h3 {
    margin-top: 0;
    color: white;
    border-bottom: 1px solid white;
    padding-bottom: 10px;
  	margin-bottom:1em
  }

  .settings-row {
    margin-bottom: 15px;
  }

  .settings-row label {
    display: block;
    margin-bottom: 5px;
  }

  .close-settings {
    position: absolute;
    top: 5px;
    right: 5px;
    background: none;
    border: none;
    color: #830b0b;
    font-size: 1.2rem;
    cursor: pointer;
  }

  /* Efecto de cinta VHS */
  .tape-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="none" stroke="%2300ff00" stroke-width="0.5" opacity="0.1"/></svg>');
    pointer-events: none;
    z-index: 1;
    opacity: 0.3;
  }

  /* Upload de video */
  .upload-container {
    margin-top: 0px;
    color: black;
    font-family: 'VT323', monospace;
    z-index: 100;
    position: relative;
  }

  #video-upload {
    background: #111;
    border: none;
    color: #b6b6b6;
    padding: 5px;
    border-radius: 4px;
  }

	footer{
		position:fixed;
    	bottom:0px;
    	width:100%;
    	padding:0.5em 1em;
    	background-color:#DCD1BB;
    	color:black;
    	text-align:center;
    	z-index:99999;
	}

@media(min-width:1081px){
	.monitor{
		max-height: 55vh;
	}
}



@media(max-width:980px){
header h1{
    font-size:45px;
}
header h2{
    font-size:25px;
}
header h3{
    font-size:35px;
}

.monitor::after,
.monitor::before {
    min-height: 30vh;
	max-height: 40vh;
}

.monitor {
	height: 55vh;
}

}

@media(min-width:769px) and (max-width:980px){
	.monitor {
    	max-width: 90%;
	}
}

@media(max-width:768px){
header{
	margin-top:1em;
	margin-bottom:0em;
}
header h1{
    font-size:40px;
}
header h2{
    font-size:20px;
}
header h3{
    font-size:30px;
}

/*.monitor,
.upload-container{
	transform:scale(0.7);
}*/

.monitor::after,
.monitor::before {
    min-height: 50vh;
	max-height: 60vh;
}

.monitor {
	max-width:90%;
	height: 80vh;
	margin-bottom:4em;
	margin-top:1em;
}

}

@media(min-width:721px) and (max-width:768px){
	.monitor {
    	max-height:500px;
	}
}

@media(max-width:720px){
	.monitor {
    	max-height:400px;
	}
	.monitor-bezel{
		height:60%;
	}
	.controls{
		flex-flow:wrap;
	}

}

@media(max-width:840px){
	button#rewind,
	button#forward,
	button#stop{
		display:none;
	}
}

@media(max-width:640px){

	.upload-container {
    	display:flex;
    	flex-flow:column;
	}

}

@media(min-width:981px){
	.monitor{
    	height: 600px;
	}
.monitor-bezel {
    height: 75%;
}
}

@media(max-width:540px){

	.upload-container {
    	max-width:85%;
	}

}

@media(max-width:480px){

	.controls {
    	width:95%;
    	background:#DCD1BB;
	}

}