@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500&family=Press+Start+2P&display=swap'); 
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@900&display=swap');

.main-container {
  background-image: url('../images/pozadie.jpeg');
  background-size: cover;
  background-position: center;
  height: 100vh; /* Ensure the container fills the viewport height */
}

.ruka-image {
  position: absolute;
  height: 75%;
  top: 45%; /* Adjust as needed */
  left: 36%; /* Adjust as needed */
  z-index: 0; /* Ensure the ruka image is above the background */
}
.phone {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 1;
}

.welcome-message {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 2;
  width: fit-content; /* New style to fit the content */
}

.welcome-message p {
  margin: 30px 0;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  display: block; /* Each <p> on its own line */
}

.welcome-line1 {
  color: white;
  font-size: 2rem; /* Using 'rem' for consistency */
  font-family: "Montserrat", sans-serif;
}

.welcome-line2 {
  color: white;
  font-size: 1.5rem;
  font-family: "Montserrat", sans-serif;
}

.welcome-line3 {
  color: white;
  font-size: 2.5rem;
  font-family: "Press Start 2P", system-ui;
}

.welcome-line4 {
  color: white;
  font-size: 0.9rem;
  white-space: nowrap;
  margin-top: 1rem; /* Space after the previous line */
}

.welcome-line5 {
  color: white;
  font-size: 4rem;
  animation: moveArrow 2s infinite alternate;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  margin-top: 1.5rem; /* Space after the previous line */
}



.game-description {
  position: absolute;
  top: 50%; 
  left: 50%;
  transform: translate(-50%, -50%);
  width: 15%; 
  text-align: center;
  font-size: 0.9em; 
  color: white; 
  font-family: "Montserrat", sans-serif; 
  z-index: 2;
  max-width: 300px;
  overflow: hidden; 
}



.game-description p {
  margin: 10px 0;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  display: block; 
}

.game-desc-line1 {
  text-align: center;
  color: white;
  font-size: 2rem; 
  font-family: "Montserrat", sans-serif;
}

.game-desc-line2 {
  color: white;
  font-size: 0.7rem;
  text-align: left;
  font-family: "Open Sans", sans-serif;
}

.game-desc-line3 {
  color: white;
  font-size: 1.5rem;
  text-align: left;
  font-family: "Montserrat", sans-serif;
}


.game-desc-line4 {
  color: white;
  font-size: 0.7rem;
  text-align: left;
  font-family: "Open Sans", sans-serif;
}


.game-desc-line5 {
  color: white;
  font-size: 0.7rem;
  text-align: left;
  font-family: "Open Sans", sans-serif;
}

.game-desc-line6 {
  color: white;
  font-size: 0.7rem;
  text-align: left;
  font-family: "Open Sans", sans-serif;
}
.game-desc-line7 {
  color: white;
  font-size: 0.7rem;
  text-align: left;
  font-family: "Open Sans", sans-serif;
}

.game-desc-line8 {
  color: red;
  font-size: 0.7rem;
  text-align: center;
  font-family: "Montserrat", sans-serif;
}

.start-button {
  background-color: #4CAF50; 
  color: white;
  padding: 5px 10px; 

  font-family: 'Montserrat', sans-serif;
  font-size: 1em;
  border: none; 
  border-radius: 5px; 
  box-shadow: 0 4px #999; 
  cursor: pointer; 
  transition: background-color 0.3s, box-shadow 0.3s; 
}

.start-button:hover {
  background-color: #45a049;
  box-shadow: 0 2px #666; 
}

.start-button:active {
  background-color: #3e8e41; 
  box-shadow: 0 1px #333; 
  transform: translateY(2px); 
}





@keyframes moveArrow {
  0% {
    transform: translateY(0); /* Initial position */
  }
  100% {
    transform: translateY(30px); /* Move arrow down by 20px */
  }
}


.phone img {
  margin-top: 1%;
  max-width: 100%;
  height: auto;
  width: 41%;
  z-index: 1 ;
}

.centered-container {
  position: absolute;
  top: 50%;
  left: 62.8%;
  width: 43%;
  transform: translate(-50%, -50%);
  z-index: 1;
  opacity: 1;
}

.chats {
  position: absolute;
  top: 5%;
  font-size: 1em;
  left: 2%;
  width: 37%;
  height: 83%;
  overflow-y: auto;
  border-radius: 10px;
  padding: 10px;
}

.chat-button {
  min-width: 90px;
  margin: 0px 18px;
  width: 50%; 
  font-size: 1em; 
}

.chat-button--report {
  background: #e53246;
  border: 0;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(155, 24, 39, .25);
}
.chat-button--next {
  background: #198b55;
  border: 0;
  color: #fff;
  font-size: 1.8em;
  box-shadow: 0 10px 22px rgba(17, 109, 64, .25);
}

.report-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(5, 12, 25, .78);
}
.report-modal__content {
  position: relative;
  width: min(100%, 1000px);
  padding: 48px 40px 36px;
  border-radius: 15px;
  background: #fff;
  color: #555;
  box-shadow: 0 20px 55px rgba(0,0,0,.35);
}
.report-modal h2 {
  margin: 0 0 78px;
  text-align: center;
  font: 800 clamp(2.1rem, 6vw, 5.7rem)/1 Montserrat, sans-serif;
}
.report-modal__close {
  position: absolute;
  right: 27px;
  top: 19px;
  border: 0;
  background: transparent;
  color: #888;
  font-size: 3rem;
  line-height: 1;
}
.report-modal textarea {
  display: block;
  width: 100%;
  min-height: 125px;
  margin-bottom: 32px;
  padding: 14px;
  border: 2px solid #d8dde2;
  border-radius: 12px;
  resize: vertical;
  font: 1rem Roboto, sans-serif;
}
.report-modal__actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-top: 28px;
  border-top: 2px solid #d8dde2;
}
.reason-button {
  min-height: 72px;
  border: 0;
  border-radius: 12px;
  background: #1374f5;
  color: #fff;
  font: 500 clamp(1rem, 2.2vw, 1.9rem) Roboto, sans-serif;
}
.reason-button--close { background: #888; }
.reason-button:nth-child(4) { grid-column: 1 / span 2; }

@media (max-width: 600px) {
  .report-modal { padding: 12px; }
  .report-modal__content { padding: 34px 20px 22px; }
  .report-modal h2 { margin-bottom: 35px; }
  .report-modal__actions { gap: 9px; }
  .reason-button { min-height: 54px; }
}

/* Final in-phone spacing: controls and the long description stay within the
   visible screen, including on narrower displays. */
.phone > .game-description {
  width: 42.6%;
  max-width: none;
  max-height: 72%;
  box-sizing: border-box;
  padding: 12px 18px 20px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.game-description p { line-height: 1.38; }
.game-desc-line1 { margin-top: 0 !important; }
.game-desc-line8 { margin-top: 18px !important; }

.button-container {
  left: 28.7%;
  bottom: 14.4%;
  width: 42.6%;
  padding: 0;
  box-sizing: border-box;
}

#actionButtons:not([style*="display: none"]) { gap: 5px; }
.chat-button {
  min-height: 31px;
  padding: 6px 5px;
  border-radius: 4px;
}
.chat-button--report { font-size: clamp(.58rem, 1.05vw, .86rem); }
.chat-button--next { font-size: clamp(.9rem, 1.5vw, 1.35rem); }

@media (max-width: 600px) {
  .phone > .game-description {
    width: 42.6%;
    max-height: 70%;
    padding: 9px 10px 15px;
  }
  .game-description p { line-height: 1.28; }
  .button-container { bottom: 14.6%; padding: 0 3px; }
  .chat-button { min-height: 27px; padding: 4px 3px; }
}

/* Reserve clear space above the lower action bar. */
.chats { height: 69.5%; }

/* More compact report dialog and a clearer action bar below the chat screen. */
.report-modal__content {
  width: min(90vw, 820px);
  padding: 32px 30px 26px;
  border-radius: 14px;
}
.report-modal h2 {
  margin: 0 0 34px;
  font-size: clamp(2rem, 4vw, 3.4rem);
}
.report-modal textarea {
  min-height: 86px;
  margin-bottom: 20px;
}
.report-modal__actions { gap: 10px; padding-top: 20px; }
.reason-button { min-height: 54px; font-size: clamp(1rem, 1.7vw, 1.35rem); }
.report-modal__close { right: 18px; top: 14px; font-size: 2.3rem; }

.button-container { bottom: 11.7%; }
.chat-button { min-height: 43px; padding: 8px 6px; }
.chat-button--report { font-size: clamp(.7rem, 1.15vw, .95rem); }
.chat-button--next { font-size: clamp(1.15rem, 1.8vw, 1.55rem); }

/* Responsive phone layout.  The toggle sits inside the phone on mobile. */
@media (max-width: 600px) {
  .main-container { min-height: 540px; overflow: hidden; }
  .phone { width: 120vw; height: 120vw; min-height: 0; margin-left: -10vw; }
  .phone > .game-description {
    top: 48.5%; width: 43%; max-height: 67%; padding: 8px 9px 12px;
    overflow-y: auto; font-size: .68rem;
  }
  .game-description p { margin: 5px 0; line-height: 1.25; }
  .game-desc-line1 { font-size: 1.28rem; }
  .game-desc-line3 { font-size: 1.08rem; }
  .game-desc-line8 { margin-top: 9px !important; }
  .start-button { position: sticky; bottom: 0; padding: 5px 10px; font-size: .88rem; }
  .centered-button {
    top: 90vw; bottom: auto; width: min(44vw, 205px); height: auto;
    min-height: 34px; padding: 6px 8px; opacity: .95; border: 0;
    border-radius: 6px; background: #198b55; color: #fff; font-size: .72rem;
    line-height: 1.15; box-shadow: 0 3px 0 rgba(0,0,0,.32); z-index: 6;
  }
  .chats { height: 66.5%; padding: 5px; font-size: .68rem; }
  .sender, .recipient { margin-bottom: 5px; padding: 5px 6px; }
  #actionButtons:not([style*="display: none"]) { gap: 4px; }
}
@media (max-width: 380px), (max-width: 600px) and (max-height: 720px) {
  .phone > .game-description { max-height: 64%; font-size: .62rem; }
  .game-desc-line1 { font-size: 1.12rem; }
  .game-desc-line3 { font-size: .96rem; }
  .game-description p { margin: 3px 0; }
  .centered-button { top: 88vw; font-size: .66rem; }
  .chats { height: 65%; }
}

@media (max-width: 600px) {
  .report-modal__content { width: min(94vw, 540px); padding: 28px 18px 20px; }
  .report-modal h2 { margin-bottom: 25px; }
  .report-modal textarea { min-height: 70px; }
  .reason-button { min-height: 48px; }
  .button-container { bottom: 11.8%; }
  .chat-button { min-height: 36px; padding: 6px 4px; }
}

/* The initial game toggle is the iPhone's visible Home button, not a separate
   button below the phone. */
@media (max-width: 600px) {
  .centered-button {
    top: 104vw;
    bottom: auto;
    left: 50%;
    width: 15vw;
    height: 15vw;
    min-width: 44px;
    min-height: 44px;
    max-width: 76px;
    max-height: 76px;
    padding: 0;
    transform: translateX(-50%);
    opacity: 0;
    background: transparent;
    box-shadow: none;
    border: 0;
    border-radius: 50%;
    z-index: 6;
  }
}

/* Mobile overrides must be last, otherwise legacy breakpoints move controls
   outside the phone. */
@media (max-width: 600px) {
  .main-container { min-height: 540px; overflow: hidden; }
  .phone { width: 120vw; height: 120vw; min-height: 0; margin-left: -10vw; }
  .phone > .game-description {
    top: 48.5%; width: 43%; max-height: 67%; padding: 8px 9px 12px;
    overflow-y: auto; font-size: .68rem;
  }
  .game-description p { margin: 5px 0; line-height: 1.25; }
  .game-desc-line1 { font-size: 1.28rem; }
  .game-desc-line3 { font-size: 1.08rem; }
  .game-desc-line8 { margin-top: 9px !important; }
  .start-button { position: sticky; bottom: 0; padding: 5px 10px; font-size: .88rem; }
  .centered-button {
    top: 90vw; bottom: auto; width: min(44vw, 205px); height: auto;
    min-height: 34px; padding: 6px 8px; opacity: .95; border: 0;
    border-radius: 6px; background: #198b55; color: #fff; font-size: .72rem;
    line-height: 1.15; box-shadow: 0 3px 0 rgba(0,0,0,.32); z-index: 6;
  }
  .chats { height: 66.5%; padding: 5px; font-size: .68rem; }
  .sender, .recipient { margin-bottom: 5px; padding: 5px 6px; }
  .button-container { bottom: 11.8%; }
  #actionButtons:not([style*="display: none"]) { gap: 4px; }
  .chat-button { min-height: 36px; padding: 6px 4px; }
}
@media (max-width: 380px), (max-width: 600px) and (max-height: 720px) {
  .phone > .game-description { max-height: 64%; font-size: .62rem; }
  .game-desc-line1 { font-size: 1.12rem; }
  .game-desc-line3 { font-size: .96rem; }
  .game-description p { margin: 3px 0; }
  .centered-button { top: 88vw; font-size: .66rem; }
  .chats { height: 65%; }
}

/* Final mobile layout — this block deliberately comes last. */
@media (max-width: 600px) {
  .main-container {
    min-height: 540px;
    overflow: hidden;
  }
  .phone {
    width: 120vw;
    height: 120vw;
    min-height: 0;
    margin-left: -10vw;
  }
  .phone > .game-description {
    top: 48.5%;
    width: 43%;
    max-height: 67%;
    padding: 8px 9px 12px;
    overflow-y: auto;
    font-size: .68rem;
  }
  .game-description p { margin: 5px 0; line-height: 1.25; }
  .game-desc-line1 { font-size: 1.28rem; }
  .game-desc-line3 { font-size: 1.08rem; }
  .game-desc-line8 { margin-top: 9px !important; }
  .start-button { position: sticky; bottom: 0; padding: 5px 10px; font-size: .88rem; }

  .centered-button {
    top: 90vw;
    bottom: auto;
    width: min(44vw, 205px);
    height: auto;
    min-height: 34px;
    padding: 6px 8px;
    opacity: .95;
    border: 0;
    border-radius: 6px;
    background: #198b55;
    color: #fff;
    font-size: .72rem;
    line-height: 1.15;
    box-shadow: 0 3px 0 rgba(0,0,0,.32);
    z-index: 6;
  }

  .chats { height: 66.5%; padding: 5px; font-size: .68rem; }
  .sender, .recipient { margin-bottom: 5px; padding: 5px 6px; }
  .button-container { bottom: 11.8%; }
  #actionButtons:not([style*="display: none"]) { gap: 4px; }
  .chat-button { min-height: 36px; padding: 6px 4px; }
}

@media (max-width: 380px), (max-width: 600px) and (max-height: 720px) {
  .phone > .game-description { max-height: 64%; font-size: .62rem; }
  .game-desc-line1 { font-size: 1.12rem; }
  .game-desc-line3 { font-size: .96rem; }
  .game-description p { margin: 3px 0; }
  .centered-button { top: 88vw; font-size: .66rem; }
  .chats { height: 65%; }
}

/* Narrow phones: keep every game control inside the phone, without clipping
   the long translated description. */
@media (max-width: 480px) {
  .main-container { min-height: calc(100svh - 56px); }
  .phone {
    width: 128vw;
    height: 128vw;
    min-height: 0;
    margin-left: -14vw;
  }

  .phone > .welcome-message,
  .phone > .game-description { width: 43%; }

  .phone > .game-description {
    top: 48.5%;
    max-height: 68%;
    padding: 7px 8px 10px;
    font-size: .67rem;
  }
  .game-description p { margin: 5px 0; line-height: 1.24; }
  .game-desc-line1 { font-size: 1.25rem; }
  .game-desc-line3 { font-size: 1.05rem; }
  .game-desc-line8 { margin-top: 9px !important; font-size: .7rem; }
  .start-button {
    position: sticky;
    bottom: 0;
    padding: 5px 9px;
    font-size: .88rem;
  }

  .chats { height: 67%; padding: 5px; font-size: .68rem; }
  .sender, .recipient { margin-bottom: 5px; padding: 5px 6px; }
  .button-container { bottom: 11.9%; }
  #actionButtons:not([style*="display: none"]) { gap: 4px; }
  .chat-button { min-height: 35px; padding: 5px 3px; }
}

@media (max-width: 480px) and (max-height: 720px) {
  .phone > .game-description { max-height: 64%; font-size: .62rem; }
  .game-desc-line1 { font-size: 1.12rem; }
  .game-desc-line3 { font-size: .96rem; }
  .game-description p { margin: 3px 0; }
  .chats { height: 65.5%; }
}




.sender {
  text-align: left; 
  background-color: #e5e5e5;
  color: black; 
  clear: both;
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  margin-bottom: 10px;
  padding: 6px;
  display: block;
  max-width: 80%;
  border-radius: 10px;
  float: left;
}

.recipient {
  text-align: right; 
  background-color: #0084ff; 
  color: white; 
  clear: both;
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  margin-bottom: 10px;
  padding: 8px;
  display: block;
  max-width: 80%;
  border-radius: 10px;
  width: fit-content;
  float: right; 
}


.centered-button {
  position: absolute;
  bottom: 4%;
  opacity: 0;
  height: 6%;
  width: 6%;
  left: 50%;
  transform: translateX(-50%);
  top:97%;
  z-index: 1;
}

.button-container {
  position: absolute;
  bottom: 2%;
  width: 0%;
  text-align: center;
  z-index: 3;
}


.modal-content {
  font-family: 'Roboto', sans-serif;
  color: #333;
  background-color: #fff;
  border-radius: 8px;
  padding: 20px;
  text-align: center; /* Ensures text aligns centrally */
}

.modal-header, .modal-footer {
  border-bottom: none;
  padding: 10px 20px;
}

.modal-title {
  transform: translateX(25%);
  font-size: 3em; /* Larger size for 'GAME OVER' */
  font-family: 'Roboto', sans-serif;
  color: #5a5a5a;
  margin-bottom: 15px; /* Adds space below the title */
  margin-left: 0%;
}

.modal-button {
  background-color: gray;
  color: white;
  border: none;
  border-radius: 5px;
  padding: 15px 24px; /* Larger padding for better readability */
  display: inline-block;
  width: 100%; /* Makes all buttons the same width */
  box-sizing: border-box; /* Ensures padding doesn't affect width */
  font-size: 18px; /* Larger font size */
  margin: 5px 0; /* Adds vertical spacing between buttons */
  transition-duration: 0.4s;
  cursor: pointer;
}

.modal-button:hover {
  background-color: #45a049;
}

.modal-text {
  font-size: 1.2em; /* Larger text for readability */
  margin-bottom: 20px; /* Adds spacing below the paragraph */
  font-family: 'Roboto', sans-serif;
}

.close {
  color: #aaaaaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover, .close:focus {
  color: #000;
  text-decoration: none;
  cursor: pointer;
}

.button-grid {
  width: 80%; /* Controls the width of the button container */
  margin: 0 auto; /* Centers the button grid */
  display: flex;
  flex-direction: column; /* Stacks buttons vertically */
}




@media (min-width: 450px) and (max-width: 600px){
  .phone img {
    width: 85%;
    top: 50%;
  }
  .phone {
    top: 20%;
    
  }
  
  .centered-container {
    left: 53.4%;
    width: 43%;
 
  }

  .chats {
    font-size: 0.8em;
    width: 82%;
  }

  .chat-button {
    min-width: 60px;
    margin: 0px 15px;
    font-size: 0.7em; 
  }


  .ruka-image {
    position: absolute;
    height: 60%;
    top: 89%; 
    left: 50%; 
    z-index: 0; 
    transform: translate(-50%, -50%);
  }
  .welcome-message {
    top: 50%;
 
  }
 
  
  .welcome-message p {
    margin: 20px 0;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    display: block; 
  }
  .welcome-line1 {
    font-size: 1.8rem;
  }
  .welcome-line2 {
    font-size: 1.3rem;
  }
  .welcome-line3 {
    font-size: 1.7rem;
  }

  .welcome-line4 {
    font-size: 0.6rem;
  }

  .welcome-line5 {
    font-size: 3rem;
  }
 
 

}
@media (min-width: 550px) and (max-width: 649px){
  .phone img {
    width: 85%;
    top: 0%;
 
  }

  .phone {
    top: 3%;
    
  }
  
  .centered-container {
    left: 53.4%;
    width: 43%;
 
  }

  .centered-button{
    top:90%;
  }
  .chats {
    font-size: 0.8em;
    width: 82%;
  
   
  }

 
  .chat-button {
    min-width: 70px;
    margin: 0px 20px;
    font-size: 0.8em; 
  }
  .centered-container {
    top: 50%;
  }


  .welcome-message {
    top: 50%;
 
  }
 
  
  .welcome-message p {
    margin: 20px 0;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    display: block; 
  }
  .welcome-line1 {
    font-size: 2rem;
  }
  .welcome-line2 {
    font-size: 1.3rem;
  }
  .welcome-line3 {
    font-size: 2.2rem;
  }

  .welcome-line4 {
    font-size: 0.8rem;
  }

  .welcome-line5 {
    font-size: 3rem;
  }
 

  .ruka-image {
    position: absolute;
    height: 75%;
    top: 90%; 
    left: 53%; 
    z-index: 0;
    transform: translate(-50%, -50%);
  }
 
}

@media (min-width: 650px) and (max-width: 749px){
.phone img {
    width: 85%;
    top: 0%;
 
  }

  .phone {
    top: 3%;
    
  }
  
  .centered-container {
    left: 53.4%;
    width: 43%;
    top: 50%;
 
  }
  .centered-button{
    transform: translateX(-50%);
    top: 100%;
  }

  .chats {
    font-size: 0.8em;
    width: 82%;
  
   
  }

 
  .chat-button {
    min-width: 90px;
    margin: 0px 20px;
    font-size: 1em; 
  }



  .welcome-message {
    top: 50%;
 
  }
 
  
  .welcome-message p {
    margin: 20px 0;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    display: block; 
  }
  .welcome-line1 {
    font-size: 2rem;
  }
  .welcome-line2 {
    font-size: 1.3rem;
  }
  .welcome-line3 {
    font-size: 2.2rem;
  }

  .welcome-line4 {
    font-size: 0.8rem;
  }

  .welcome-line5 {
    font-size: 3rem;
  }
 

  .ruka-image {
    position: absolute;
    height: 75%;
    top: 90%; 
    left: 53%; 
    z-index: 0;
    transform: translate(-50%, -50%);
  }

}


@media (min-width: 750px) and (max-width:849px){
  .phone img {
    width: 45%;

  }
  .phone {
    top:15%;
    left: -13%;
    width: 130%;
    
  }

  .centered-container {
 
    left: 61.9%;
    width: 43%;
  
  }
  .centered-button{
    transform: translateX(-50%);
    top: 95%
  }

  .chats {
    font-size: 0.7em;
    width: 41%;
    height: 83%;
   
  }

  .chat-button {
    min-width: 70px;
    margin: 0px 15px;
    width: 50%; 
    font-size: 0.6em; 
  }

  .welcome-line1 {
    font-size: 1.8rem;
  }
  .welcome-line2 {
    font-size: 1.3rem;
  }
  .welcome-line3 {
    font-size: 1.9rem;
  }

  .welcome-line4 {
    font-size: 0.6rem;
  }
  .welcome-line5 {
    font-size: 2.5rem;
  }
  
  
  .ruka-image {
    position: absolute;
    height: 60%;
    top: 68%;
    left: 31%; 
    z-index: 0; 
  }
}


@media (min-width: 850px) and (max-width:949px){
  .phone img {
    width: 45%;

  }
  .phone {
    top:10%;
    
  }

  .centered-container {
 
    left: 61.9%;
    width: 43%;
  
  }
  .centered-button{
    transform: translateX(-50%);
    top: 85%
  }

  .chats {
    font-size: 0.7em;
    width: 41%;
    height: 83%;
   
  }

  .chat-button {
    min-width: 70px;
    margin: 0px 10px;
    width: 50%; 
    font-size: 0.6em; 
  }

  .welcome-line1 {
    font-size: 1.8rem;
  }
  .welcome-line2 {
    font-size: 1.3rem;
  }
  .welcome-line3 {
    font-size: 1.9rem;
  }

  .welcome-line4 {
    font-size: 0.6rem;
  }
  .welcome-line5 {
    font-size: 2.5rem;
  }
  
  
  .ruka-image {
    position: absolute;
    height: 70%;
    top: 51%;
    left: 31%; 
    z-index: 0; 
  }
}


@media (min-width: 950px) and (max-width:1050px){
  .phone img {
    width: 45%;

  }
  .phone {
    top:10%;
    
  }

  .centered-container {
 
    left: 61.9%;
    width: 43%;
  
  }
  .centered-button{
    transform: translateX(-50%);
    top: 85%
  }

  .chats {
    font-size: 0.9em;
    width: 41%;
    height: 83%;
   
  }

  .chat-button {
    min-width: 70px;
    margin: 0px 14px;
    width: 50%; 
    font-size: 0.8em; 
  }

  .welcome-line1 {
    font-size: 1.8rem;
  }
  .welcome-line2 {
    font-size: 1.3rem;
  }
  .welcome-line3 {
    font-size: 1.9rem;
  }

  .welcome-line4 {
    font-size: 0.6rem;
  }
  .welcome-line5 {
    font-size: 2.5rem;
  }
  
  
  .ruka-image {
    position: absolute;
    height: 70%;
    top: 51%;
    left: 31%; 
    z-index: 0; 
  }
}


@media (min-width: 1050px) and (max-width:1149px){
  .phone img {
   
    width: 45%;
  }
  .phone {
    top:8%
  }

  .centered-container {
 
    left: 61.9%;
    width: 43%;
  
  }
  .centered-button{
    transform: translateX(-50%);
    top: 86%
  }

  .chats {
    font-size: 0.9em;
    width: 41%;
    height: 83%;
   
  }

  .chat-button {
    min-width: 70px;
    margin: 0px 20px;
    width: 50%; 
    font-size: 0.8em; 
  }

  .welcome-line1 {
    font-size: 1.8rem;
  }
  .welcome-line2 {
    font-size: 1.3rem;
  }
  .welcome-line3 {
    font-size: 2rem;
  }

  .welcome-line4 {
    font-size: 0.7rem;
  }
  
  
  .ruka-image {
    position: absolute;
    height: 70%;
    top: 51%;
    left: 32%; 
    z-index: 0; 
  }
}


@media (min-width: 1150px) and (max-width:1249px){
  .phone img {
   
    width: 45%;
  }

  .centered-container {
 
    left: 61.9%;
    width: 43%;
  
  }
  .centered-button{
    transform: translateX(-50%);
    top: 85%
  }

  .chats {
    font-size: 0.9em;
    width: 41%;
    height: 83%;
   
  }

  .chat-button {
    min-width: 80px;
    margin: 0px 18px;
    width: 50%; 
    font-size: 1em; 
  }

  .welcome-line1 {
    font-size: 1.8rem;
  }
  .welcome-line2 {
    font-size: 1.3rem;
  }
  .welcome-line3 {
    font-size: 2.1rem;
  }

  .welcome-line4 {
    font-size: 0.8rem;
  }
  
  
  .ruka-image {
    position: absolute;
    height: 76%;
    top: 45%;
    left: 33%; 
    z-index: 0; 
  }

}


@media (min-width: 1250px) and (max-width:1349px){
  .phone img {
   
    width: 45%;
  }

  .centered-container {
  
    left: 61.9%;
    width: 43%;
  
  }

  .chats {
    font-size: 0.9em;
    width: 41%;
    height: 83%;
   
  }

  .chat-button {
    min-width: 90px;
    margin: 0px 18px;
    width: 50%; 
    font-size: 1em; 
  }
  
  
  .ruka-image {
    position: absolute;
    height: 76%;
    top: 45%;
    left: 35%; 
    z-index: 0; 
  }

  .welcome-line3 {
    font-size: 2.2rem;
  }

  .welcome-line4 {
    font-size: 0.8rem;
  }
  

 
  

}

/* PHP game layout: keep the phone frame and its content in the same coordinate
   system.  These rules intentionally override the legacy React breakpoints. */
.main-container {
  position: relative;
  min-height: calc(100vh - 80px);
  height: auto;
  overflow: hidden;
  isolation: isolate;
}

.phone {
  position: relative;
  width: min(940px, 120vw);
  height: min(940px, 120vw);
  min-height: 640px;
  margin: 0 auto;
  display: block;
  z-index: 2;
}

.phone > #phoneFrame {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  object-fit: contain;
}

.phone > .welcome-message,
.phone > .game-description {
  top: 49%;
  left: 50%;
  width: 43%;
  max-width: 410px;
  transform: translate(-50%, -50%);
}

.phone > .game-description { font-size: clamp(.8rem, 1.15vw, 1rem); }
.phone > .welcome-message p { margin: clamp(18px, 2vw, 30px) 0; }

.centered-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: none;
  z-index: 3;
}

/* The legacy white screen layer is fitted inside the phone frame. */
.centered-container > img {
  position: absolute;
  top: 13.2%;
  left: 28.7%;
  display: block;
  width: 42.6%;
  height: 69.5%;
  max-width: none;
  margin: 0;
  z-index: 1;
}

.chats {
  position: absolute;
  top: 13.2%;
  left: 28.7%;
  width: 42.6%;
  height: 72.8%;
  box-sizing: border-box;
  overflow-y: auto;
  padding: 12px;
  font-size: clamp(.72rem, 1.2vw, 1rem);
  scrollbar-width: thin;
  z-index: 2;
}

.button-container {
  position: absolute;
  left: 28.7%;
  bottom: 10.8%;
  width: 42.6%;
  padding: 0;
  box-sizing: border-box;
  z-index: 4;
}

#actionButtons:not([style*="display: none"]) {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.chat-button {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 5px 3px;
  font-size: clamp(.58rem, 1vw, .9rem);
  line-height: 1.15;
}

.sender, .recipient {
  max-width: 84%;
  margin-bottom: 7px;
  padding: 6px 8px;
  font-size: inherit;
}
.sender .sprava, .recipient .sprava { margin: 0; }

.ruka-image {
  position: absolute;
  height: min(76%, 720px);
  top: 43%;
  left: calc(50% - 270px);
  z-index: 1;
  pointer-events: none;
}

.centered-button {
  position: absolute;
  top: auto;
  bottom: 20px;
  left: 50%;
  width: 220px;
  height: auto;
  opacity: .01;
  z-index: 5;
}

@media (max-width: 600px) {
  .main-container { min-height: calc(100vh - 60px); }
  .phone { width: 120vw; height: 120vw; min-height: 520px; margin-left: -10vw; }
  .phone > .welcome-message, .phone > .game-description { width: 44%; }
  .welcome-line1 { font-size: 1.55rem; }
  .welcome-line2 { font-size: 1.15rem; }
  .welcome-line3 { font-size: 1.30rem; }
  .welcome-line4 { font-size: .60rem; }
  .welcome-line5 { font-size: 2.6rem; }
  .game-desc-line1 { font-size: 1.55rem; }
  .game-description p { margin: 6px 0; }
  .ruka-image { height: 90%; left: 10%; top: 45%; }
  .chats { padding: 7px; }
}

/* Keep the final messages above the lower action bar. */
.chats { height: 69.5%; }

/* Compact report dialog and a visually balanced action bar. */
/* Final responsive behaviour for the current PHP page. */
@media (max-width: 600px) {
  .main-container { min-height: 540px; overflow: hidden; }
  .phone { width: 120vw; height: 120vw; min-height: 0; margin-left: -10vw; }
  .phone > .game-description { top: 48.5%; width: 43%; max-height: 67%; padding: 8px 9px 12px; overflow-y: auto; font-size: .68rem; }
  .game-description p { margin: 5px 0; line-height: 1.25; }
  .game-desc-line1 { font-size: 1.28rem; }
  .game-desc-line3 { font-size: 1.08rem; }
  .game-desc-line8 { margin-top: 9px !important; }
  .start-button { position: sticky; bottom: 0; padding: 5px 10px; font-size: .88rem; }
  .centered-button { top: 104vw; bottom: auto; width: 15vw; height: 15vw; min-width: 44px; min-height: 44px; max-width: 76px; max-height: 76px; padding: 0; transform: translateX(-50%); opacity: 0; border: 0; border-radius: 50%; background: transparent; box-shadow: none; z-index: 6; }
  .chats { height: 66.5%; padding: 5px; font-size: .68rem; }
  .sender, .recipient { margin-bottom: 5px; padding: 5px 6px; }
  #actionButtons:not([style*="display: none"]) { gap: 4px; }
}
@media (max-width: 380px), (max-width: 600px) and (max-height: 720px) {
  .phone > .game-description { max-height: 64%; font-size: .62rem; }
  .game-desc-line1 { font-size: 1.12rem; }
  .game-desc-line3 { font-size: .96rem; }
  .game-description p { margin: 3px 0; }
  .centered-button { top: 104vw; font-size: 0; }
  .chats { height: 65%; }
}
.report-modal__content { width: min(90vw, 820px); padding: 32px 30px 26px; border-radius: 14px; }
.report-modal h2 { margin: 0 0 34px; font-size: clamp(2rem, 4vw, 3.4rem); }
.report-modal textarea { min-height: 86px; margin-bottom: 20px; }
.report-modal__actions { gap: 10px; padding-top: 20px; }
.reason-button { min-height: 54px; font-size: clamp(1rem, 1.7vw, 1.35rem); }
.report-modal__close { right: 18px; top: 14px; font-size: 2.3rem; }

.button-container { bottom: 11.7%; }
.chat-button { min-height: 43px; padding: 8px 6px; }
.chat-button--report { font-size: clamp(.7rem, 1.15vw, .95rem); }
.chat-button--next { font-size: clamp(1.15rem, 1.8vw, 1.55rem); }

@media (max-width: 600px) {
  .report-modal__content { width: min(94vw, 540px); padding: 28px 18px 20px; }
  .report-modal h2 { margin-bottom: 25px; }
  .report-modal textarea { min-height: 70px; }
  .reason-button { min-height: 48px; }
  .button-container { bottom: 11.8%; }
  .chat-button { min-height: 36px; padding: 6px 4px; }
	
	.start-button {
  position: static;
  display: block;
  margin: 18px auto 8px;
  padding: 7px 14px;
  font-size: .88rem;
}
}
