/*! HTML5 Boilerplate v4.3.0 | MIT License | http://h5bp.com/ */

html,
button,
input,
select,
textarea {
    color: #222;
}

html {
    font-size: 1em;
    line-height: 1.4;
}

::-moz-selection {
    background: #b3d4fc;
    text-shadow: none;
}

::selection {
    background: #b3d4fc;
    text-shadow: none;
}

hr {
    display: block;
    height: 1px;
    border: 0;
    border-top: 1px solid #ccc;
    margin: 1em 0;
    padding: 0;
}

audio,
canvas,
img,
video {
    vertical-align: middle;
}

fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

textarea {
    resize: vertical;
}

.browsehappy {
    margin: 0.2em 0;
    background: #ccc;
    color: #000;
    padding: 0.2em 0;
}


/* ==========================================================================
   Author's custom styles
   ========================================================================== */

html {
  height: 100%;
}

body {
  background: #000;
  height: 100%;
  /* Optimizaciones para mobile */
  -webkit-text-size-adjust: none;
  -ms-text-size-adjust: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* ===== PELOTA ===== */
#pelota-futbol {
  /* Posicionamiento base */
  position: absolute;
  left: 46.875%;
  top: 85%;
  z-index: 1000; /* Arriba del portero (500), abajo de modales (5000+) */
  
  /* Tamaño responsive base */
  width: 80px;
  height: 80px;
  
  /* Optimización de rendimiento */
  transform: translateZ(0);
  will-change: transform, left, top;
  backface-visibility: hidden;
}

#kickAnimation {
  position: absolute;
  top: 250px;
  left: 280px;
}

#zee-game {
  /* DESKTOP: Posicionamiento clásico */
  margin: 0 auto 0 auto;
  width: 1280px;
  height: 720px;
  max-width: 100vw;
  max-height: 100vh;
  position: relative;
  background: url('../img/background.jpg') no-repeat center center transparent;
  background-size: contain;
  cursor: pointer;
  overflow: hidden;
  
  /* Hardware acceleration */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: transform;

  /* DESKTOP: center vertically on the screen */
  top: 50%;
  margin-top: -360px;
}


.small-ball {
  position: absolute;
  width: 13px;
  height: 13px;
  background: url('../img/small-ball.png') no-repeat 0 0 transparent;
}

#win-ticket {
  position: absolute;
  top: 400px;
  left: 510px;
  width: 332px;
  height: 159px;
  background: url('../img/ticket.png') no-repeat center center transparent;
  background-size: contain;
  display: none; /* oculto por defecto */
  z-index: 5000; /* Arriba de la pelota (1000) */
  pointer-events: none;
}

#flecha {
  position: absolute;
  width: 332px;
  height: 88px;
  background: url('../img/flecha.png') no-repeat center center transparent;
  background-size: contain;
  display: none; /* oculto por defecto */
  z-index: 50;
  pointer-events: none;
}


/* ===== PORTERO ===== */
/* Estilos base comunes */
#goal-keeper-state-1,
#goal-keeper-state-2,
#goal-keeper-state-3 {
  position: absolute;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center bottom;
  z-index: 500;
}

/* Estado 1: Centro (posición inicial) */
#goal-keeper-state-1 {
  left: 43%;
  bottom: 20%;
  width: 12%;
  height: 30%;
  background-image: url('../img/golero-centro.png');
  display: block;
}

/* Estado 2: Salto izquierda */
#goal-keeper-state-2 {
  left: 22%;
  bottom: 18%;
  width: 15%;
  height: 35%;
  background-image: url('../img/golero-izquierda.png');
  display: none;
}

/* Estado 3: Salto derecha */
#goal-keeper-state-3 {
  right: 22%;
  bottom: 18%;
  width: 15%;
  height: 35%;
  background-image: url('../img/golero-derecha.png');
  display: none;
}

.goal-keeper.standing {
  background: url('../img/golero-centro.png') no-repeat 0 0 transparent;
}

.goal-keeper.right-jump {
  background: url('../img/golero-derecha.png') no-repeat 0 0 transparent;
  display: none;
}

.goal-keeper.left-jump {
  background: url('../img/golero-izquierda.png') no-repeat 0 0 transparent;
  display: none;
}

/* ===== MODALES ===== */
.modal {
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  max-width: 90vw;
  min-height: 120px;
  padding: 10px;
  box-sizing: border-box;
  z-index: 50000 !important;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #ddd;
  border-radius: 12px;
  text-align: center;
  transition: top 0.3s ease;
  line-height: 1.4;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  font-size: 18px;
  font-family: sans-serif;
}

.modal h1 {
  margin: 0 0 10px 0;
  font-size: 1.3em; /* Relativo al font-size del modal */
  color: #333;
  font-weight: bold;
}

.modal p {
  margin: 0 0 15px 0;
  font-size: 0.85em; /* Relativo al font-size del modal */
  color: #666;
}

.modal .continue-btn {
  background: #007bff;
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.75em; /* Relativo al font-size del modal */
  border: none;
  cursor: pointer;
  font-weight: bold;
}

.modal.active {
  top: 50%;
  transform: translate(-50%, -50%);
}

/* continue button on modal */
.modal .continue-btn {
  padding: 5px 10px;
  font: 16px sans-serif;
  cursor: pointer;
}

#score-board {
  list-style: none;
  padding: 6px 0 0 64px;
  margin: 0;
}

#score-board li {
  float: left;
  margin-right: 6px;
  zoom: 1;
	filter: alpha(opacity=56);
	opacity: 0.56;
}

#score-board li.scored {
  zoom: 1;
	filter: alpha(opacity=100);
	opacity: 1;
}

/* splash screen */
#splash-screen {
  position: absolute;
  top: 0; left: 5px;
  width: 800px; height: 800px;
  background: url('../img/splash-screen.jpg') no-repeat 0 0 #fff;
  -webkit-transition: top 0.38s ease-out;
  -moz-transition: top 0.38s ease-out;
  -ms-transition: top 0.38s ease-out;
  -o-transition: top 0.38s ease-out;
  transition: top 0.38s ease-out;
}

#splash-screen.out {
  top: -800px;
}

/* form */
#form-thing .labels {
  font: 16px sans-serif;
  line-height: 1;
}

#form-thing input[type="text"] {
  border: 1px solid #CCC;
  border-radius: 8px;
  -moz-border-radius: 8px;
  -webkit-border-radius: 8px;
  padding: 9px 13px;
  margin: 9px 0 9px 18px;
  font: 16px sans-serif;
  color: #666;
  line-height: 1;
  width: 212px;
}

#form-thing button {
  border: none;
  background: #CFCFCF;
  font: 16px sans-serif;
  line-height: 1;
  padding: 12px 18px;
  border-radius: 8px;
  margin-top: 14px;
  width: 309px;
}

#form-thing button:hover {
  background: #dfdfdf;
}

#form-thing button.submitted {
  background: #dfdfdf;
}

#form-thing form {
  padding: 102px 0 0 254px;
  zoom: 1;
	filter: alpha(opacity=90);
	opacity: 0.9;
}

#form-thing form label {
  color: #eee;
}

#form-thing {
  position: absolute;
  width: 800px; height: 800px;
  top: 0; left: 5px;
  background: #fff;
  -webkit-transition: top 0.38s ease-out;
  -moz-transition: top 0.38s ease-out;
  -ms-transition: top 0.38s ease-out;
  -o-transition: top 0.38s ease-out;
  transition: top 0.38s ease-out;
  background: url('../img/form.jpg') no-repeat 0 0 #fff;
}

#form-thing.out {
  top: -800px;
}

#zee-button {
  position: absolute;
  top: 497px;
  left: 318px;
  width: 177px;
  height: 49px;
  cursor: pointer;
}

#form-message {
  text-align: center;
  color: #ddd;
}

/* instructions */
#instructions {
  position: absolute;
  width: 800px; height: 800px;
  top: 0; left: 5px;
  background: url('../img/instructions.jpg') no-repeat 0 0 #fff;
  -webkit-transition: top 0.38s ease-out;
  -moz-transition: top 0.38s ease-out;
  -ms-transition: top 0.38s ease-out;
  -o-transition: top 0.38s ease-out;
  transition: top 0.38s ease-out;
}

#instructions.out {
  top: -800px;
}

#like-gate {
  position: absolute;
  width: 800px; height: 800px;
  top: 0; left: 5px;
  background: url('../img/like-gate.jpg') no-repeat 0 0 #fff;
}

/* ==========================================================================
   Media Queries
   ========================================================================== */

/* Sistema responsive universal */
@media only screen and (max-width: 1024px) {
  body {
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    width: 100vw !important;
    height: 100vh !important;
    position: relative !important;
  }
  
  #zee-game {
    /* MOBILE/TABLET: Sobrescribir COMPLETAMENTE el CSS de desktop */
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    margin: 0 !important;
    margin-top: 0 !important;
    margin-left: 0 !important;
    transform: translate(-50%, -50%) !important;
    
    /* Dimensiones responsivas manteniendo ratio 16:9 */
    width: min(100vw, calc(100vh * 16 / 9)) !important;
    height: min(100vh, calc(100vw * 9 / 16)) !important;
    max-width: none !important;
    max-height: none !important;
    
    /* Background y otros */
    background: url('../img/background.jpg') no-repeat center center !important;
    background-size: cover !important;
    cursor: pointer !important;
    overflow: hidden !important;
    z-index: 1 !important;
  }
  
  /* Pelota en mobile - tamaño responsive */
  #pelota-futbol {
    width: 6.25% !important;
    height: 11.11% !important;
    min-width: 50px !important;
    min-height: 50px !important;
    max-width: 80px !important;
    max-height: 80px !important;
  }
  
  /* Arquero - sistema robusto para todas las resoluciones */
  #goal-keeper-state-1,
  #goal-keeper-state-2,
  #goal-keeper-state-3 {
    position: absolute !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center bottom !important;
    z-index: 500 !important;
  }
  
  /* Arquero en mobile - EN EL SUELO como desktop/tablet */
  #goal-keeper-state-1 {
    left: 43% !important;
    bottom: 20% !important; /* En el suelo también en mobile */
    top: auto !important; /* Resetear top */
    width: 12% !important;
    height: 28% !important;
    background-position: center bottom !important;
    display: block;
    max-width: 100px !important;
    max-height: 150px !important;
  }
  
  #goal-keeper-state-2 {
    left: 22% !important;
    bottom: 18% !important; /* En el suelo también en mobile */
    top: auto !important; /* Resetear top */
    width: 15% !important;
    height: 32% !important;
    background-position: center bottom !important;
    display: none;
    max-width: 120px !important;
    max-height: 170px !important;
  }
  
  #goal-keeper-state-3 {
    right: 22% !important;
    bottom: 18% !important; /* En el suelo también en mobile */
    top: auto !important; /* Resetear top */
    width: 15% !important;
    height: 32% !important;
    left: auto !important;
    background-position: center bottom !important;
    display: none;
    max-width: 120px !important;
    max-height: 170px !important;
  }
  
  /* Asegurar que las imágenes de fondo funcionen */
  .goal-keeper.standing {
    background-image: url('../img/golero-centro.png') !important;
  }
  
  .goal-keeper.right-jump {
    background-image: url('../img/golero-derecha.png') !important;
  }
  
  .goal-keeper.left-jump {
    background-image: url('../img/golero-izquierda.png') !important;
  }

/* ==========================
   TABLET ESPECÍFICO (768px - 1024px)
   ========================== */
@media screen and (min-width: 768px) and (max-width: 1024px) {
  /* Ajustes específicos para tablets */
  #goal-keeper-state-1 {
    top: 40% !important;
    width: 10% !important;
    height: 28% !important;
  }
  
  #goal-keeper-state-2,
  #goal-keeper-state-3 {
    top: 35% !important;
    width: 13% !important;
    height: 32% !important;
  }
  
  /* Pelota en tablet - tamaño intermedio */
  #pelota-futbol {
    width: 5% !important;
    height: 9% !important;
    min-width: 45px !important;
    min-height: 45px !important;
    max-width: 70px !important;
    max-height: 70px !important;
  }
  
  /* Modal tamaño intermedio para tablet */
  .modal {
    font-size: 16px !important;
    width: 320px !important;
  }
}
  
  /* Ajustes de tamaño solo para mobile */
  .modal {
    font-size: 14px !important; /* Solo cambiar el tamaño del texto */
    width: 280px !important;
    max-width: 85vw !important;
  }
  
  /* Ticket de premio - centrado y más pequeño */
  #win-ticket {
    position: fixed !important;
    width: 45% !important;
    max-width: 280px !important;
    height: auto !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 15000 !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    aspect-ratio: 332/159 !important;
  }
  
  /* Flecha direccional - posicionamiento dinámico */
  #flecha {
    width: 20% !important;
    height: 15% !important;
    max-width: 250px !important;
    max-height: 100px !important;
    position: absolute !important;
    z-index: 2000 !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
  }
}

/* Eliminadas las reglas de tablet para evitar conflictos */

@media only screen and (min-width: 35em) {

}

@media print,
       (-o-min-device-pixel-ratio: 5/4),
       (-webkit-min-device-pixel-ratio: 1.25),
       (min-resolution: 120dpi) {

}

/* ==========================================================================
   Helper classes
   ========================================================================== */

.ir {
    background-color: transparent;
    border: 0;
    overflow: hidden;
    *text-indent: -9999px;
}

.ir:before {
    content: "";
    display: block;
    width: 0;
    height: 150%;
}

.hidden {
    display: none !important;
    visibility: hidden;
}

.visuallyhidden {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus {
    clip: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    position: static;
    width: auto;
}

.invisible {
    visibility: hidden;
}

.clearfix:before,
.clearfix:after {
    content: " ";
    display: table;
}

.clearfix:after {
    clear: both;
}

.clearfix {
    *zoom: 1;
}

/* ==========================================================================
   Print styles
   ========================================================================== */

@media print {
    * {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }

    abbr[title]:after {
        content: " (" attr(title) ")";
    }

    .ir a:after,
    a[href^="javascript:"]:after,
    a[href^="#"]:after {
        content: "";
    }

    pre,
    blockquote {
        border: 1px solid #999;
        page-break-inside: avoid;
    }

    thead {
        display: table-header-group;
    }

    tr,
    img {
        page-break-inside: avoid;
    }

    img {
        max-width: 100% !important;
    }

    @page {
        margin: 0.5cm;
    }

    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }

    h2,
    h3 {
        page-break-after: avoid;
    }
}
