
    body {
      font-family: sans-serif;
      text-align: center;
      background: #111;
      color: #eee;
      margin: 0;
      padding: 0;
      padding-bottom: 50px;
    }
    
    .logo-link {
      display: flex;
      align-items: center;
      gap: 8px;
      text-decoration: none;
    }
    
    .logo-text {
      position: relative;
      display: inline-block;
      font-size: 20px;
      font-weight: bold;
      line-height: 1;
    }
    
    .logo-outline {
      position: absolute;
      top: 0;
      left: 0;
      color: transparent;
      -webkit-text-stroke: 10px black; /* толщина рамки */
      text-stroke: 10px black;
      pointer-events: none;
    }
    
    .logo-fill {
      position: relative;
      color: white;
    }


    
    .logo-link img {
      display: block;
    }

    #user-info {
      display: flex;
      justify-content: flex-end;
      align-items: center;
      background: #222;
      padding: 5px 20px;
    }
    
    #top-info {
      display: flex;
      justify-content: flex-end;
      align-items: center;
      background: #222;
      padding: 0px 20px;
      height: 60px;
    }
    
    #username { margin-right: 15px; font-weight: bold; }
    
    /*#stats {
      position: fixed;
      bottom: 0;
      left: 0;
      width: 100%;
      background: #222;
      color: #eee;
      text-align: center;
      padding: 8px 0;
      font-size: 14px;
      height: 20px;
      z-index: 1000;
    }*/

    #footer {
      position: fixed;
      bottom: 0;
      left: 0;
      width: 100%;
      background: #222;
      padding: 10px 20px;
      font-size: 14px;
      border-top: 1px solid #333;
      color: #aaa;
      display: flex;
      justify-content: center;
      align-items: center;
      z-index: 1000;
    }

    
    .footer-nav {
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap; /* чтобы на мобильных переносилось */
      gap: 10px;
    }
    
    .footer-links {
      display: flex;
      gap: 20px;
    }
    
    .footer-links a {
      color: #aaa;
      text-decoration: none;
      transition: color 0.3s;
    }
    
    .footer-links a:hover {
      color: #fff;
    }
    
    #stats {
      font-size: 13px;
      color: #7A6F6D;
    }


    video {
      background: black;
      border: 2px solid #555;
      object-fit: cover;
    }
    .video-wrapper {
      background: black;
      display: flex;
      justify-content: center;
      align-items: center;
    }

    /* === Side by side === */
    .side-by-side {
      display: flex;
      justify-content: center;
      gap: 10px;
      margin: 0 auto;
      width: 70%;
    }
    .side-by-side .video-wrapper {
      flex: 1;
      aspect-ratio: 4/3;
    }
    .side-by-side video { width: 100%; height: 100%; }

    /* === Stacked === */
    .stacked {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 10px;
      width: 100%;
      max-width: 100%;
    }
    .stacked .video-wrapper {
      width: 90%;
      aspect-ratio: 4/3;
    }
    .stacked video { width: 100%; height: 100%; }

    /* === Picture-in-Picture === */
    .pip {
      position: relative;
      width: 70%;
      max-width: 900px;
      aspect-ratio: 4/3;
      margin: 0 auto;
      background: black;
      overflow: hidden;
      border-radius: 8px;
      max-height: 60vh;
    }
    .pip #remoteVideo {
      width: 99%;
      height: 99%;
      object-fit: cover;
    }
    .pip #localVideo {
      position: absolute;
      width: 25%;
      aspect-ratio: 4/3;
      bottom: 10px;
      right: 10px;
      border: 2px solid #fff;
      border-radius: 8px;
      background: black;
      z-index: 2;
    }

    button {
      padding: 8px 16px;
      font-size: 15px;
      cursor: pointer;
      border-radius: 6px;
      border: none;
    }

    #leaveBtn {
      background: transparent;
      color: #ffc107;
      border: 2px solid #ffc107;
      border-radius: 6px;
      padding: 6px 24px;
      font-size: 15px;
      cursor: pointer;
      transition: background 0.3s, color 0.3s, opacity 0.3s;
      width: 120px;
    }
    
    #leaveBtn:hover:not(:disabled) {
      background: #ffc107;
      color: black;
    }
    
    #leaveBtn:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }
    
    #nextBtn {
      background: transparent;
      color: #fff;
      border: 2px solid #007bff;
      border-radius: 6px;
      padding: 6px 24px;
      font-size: 15px;
      cursor: pointer;
      transition: background 0.3s, color 0.3s, opacity 0.3s;
      width: 120px;
    }
    
    #nextBtn:hover:not(:disabled) {
      background: #007bff;
      color: black;
    }
    
    #nextBtn:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }


    /*#loginBtn { background: #17a2b8; color: white; }*/
    /*#registerBtn { background: #6f42c1; color: white; }*/
    #logoutBtn:after {
      background-color: #7A6F6D;
    }
    
    button:disabled { opacity: 0.6; cursor: not-allowed; }
    .layout-controls { margin: 10px; font-size: 14px;}
    label { margin: 0 10px; }

    /* === Модалки === */
    .modal {
      display: none;
      position: fixed; z-index: 1000;
      left: 0; top: 0; width: 100%; height: 100%;
      background: rgba(0,0,0,0.7);
      justify-content: center; align-items: center;
    }
    .modal-content {
      background: #222; padding: 20px; border-radius: 8px;
      width: 300px; text-align: left;
    }
    .modal-content h2 { margin-top: 0; }
    .modal-content label { display: block; margin: 10px 0 5px; }
    .modal-content input {
      width: 95%; padding: 8px; border: none;
      border-radius: 4px; margin-bottom: 10px;
    }
    .modal-content button { width: 100%; margin-top: 10px; }
    .close {
      float: right; cursor: pointer; font-size: 20px;
      color: #aaa;
    }
    .close:hover { color: white; }

    /* === Mobile tweaks === */
    @media (max-width: 768px) {
      .option-side { display: none !important; }
      .stacked .video-wrapper { height: 25vh; }
      button { font-size: 18px; padding: 12px 20px; }
      .pip { max-height: 40vh; width: 90%;}
      .pip #remoteVideo { width: 98%; height: 98%; }
    }
    @media (min-width: 768px) {
      .option-stacked { display: none !important; }
    }
    
    .video-wrapper {
      position: relative;
    }
    .video-label {
      position: absolute;
      top: 5px;
      right: 5px;
      background: rgba(0,0,0,0.6);
      color: #fff;
      padding: 2px 6px;
      font-size: 13px;
      border-radius: 4px;
    }
    .reportBtn { color: red; font-size: 14px; margin-left: 0px; margin-right: 30px; }
    
    #forgotPasswordLink {
      cursor: pointer;
      color: grey;
      text-decoration: underline;
    }
    #forgotPasswordLink:hover {
      color: white;
    }


/* Рябь для пустого видео */
.video-wrapper video:empty,
.video-wrapper video[src=""],
.video-wrapper video:not([src]) {
  background: repeating-linear-gradient(
    0deg,
    #111,
    #111 2px,
    #222 2px,
    #222 4px
  );
  animation: noise 0.3s infinite;
}

/* Надпись по умолчанию */
.video-wrapper::before {
  content: "";
  position: absolute;
  bottom: 10px;
  left: 10px;
  width: 24px;
  height: 24px;
  background: url("/images/icon-logo.webp") no-repeat center/contain;
  opacity: 0.7;          /* полупрозрачная иконка */
  z-index: 2;
  pointer-events: none;
}

.video-wrapper::after {
  content: "RandomCall.net";
  position: absolute;
  bottom: 12px;
  left: 40px; /* отступ от иконки */
  font-size: 12px;
  font-weight: bold;
  color: grey;
  text-shadow: 0 0 6px rgba(0,0,0,0.8);
  font-family: Arial, sans-serif;
  white-space: nowrap;
  opacity: 0.7;          /* полупрозрачный текст */
  z-index: 2;
  pointer-events: none;
}


/*
.video-wrapper.has-video::before {
  display: none;
} */

/* Анимация ряби */
@keyframes noise {
  0% { background-position: 0 0; }
  100% { background-position: 0 10px; }
}

/* === Рябь для пустого маленького localVideo в PiP === */
.pip #localVideo:empty,
.pip #localVideo[src=""],
.pip #localVideo:not([src]) {
  background: repeating-linear-gradient(
    0deg,
    #111,
    #111 2px,
    #222 2px,
    #222 4px
  );
  animation: noise 0.3s infinite;
}
.pip #remoteVideo:empty,
.pip #remoteVideo[src=""],
.pip #remoteVideo:not([src]) {
  background: repeating-linear-gradient(
    0deg,
    #111,
    #111 2px,
    #222 2px,
    #222 4px
  );
  animation: noise 0.3s infinite;
}
.pip::before {
  content: "";
  position: absolute;
  bottom: 10px;
  left: 10px;
  width: 24px;
  height: 24px;
  background: url("/images/icon-logo.webp") no-repeat center/contain;
  opacity: 0.7;          /* полупрозрачная иконка */
  z-index: 2;
  pointer-events: none;
}

.pip::after {
  content: "RandomCall.net";
  position: absolute;
  bottom: 12px;
  left: 40px; /* отступ от иконки */
  font-size: 12px;
  font-weight: bold;
  color: grey;
  text-shadow: 0 0 6px rgba(0,0,0,0.8);
  font-family: Arial, sans-serif;
  white-space: nowrap;
  opacity: 0.7;          /* полупрозрачный текст */
  z-index: 2;
  pointer-events: none;
}
/*
.pip.has-video::before {
  display: none;
}*/




@media (min-width: 769px) {
    #startBtn {
      display: inline-block;
      width: 130px;
      padding: 0.4rem 0.6rem;
      color: white;
      cursor: pointer;
      text-align: center;
      font-family: inherit;
      transition: background-color 0.3s, border-color 0.3s;
      position: relative;
      z-index: 1;
      overflow: hidden;
    }
    .start-mode {
      background: black;
      border: 2px solid rgb(252, 70, 100);
    }
    .start-mode::before {
      content: "";
      position: absolute;
      inset: 0;
      background-color: rgb(252, 70, 100);
      transform: translateX(-100%);
      transition: transform 0.3s ease;
      z-index: -1;
    }
    .start-mode:hover::before {
      transform: translateX(0);
    }
    .stop-mode {
      background: rgb(252, 70, 100);
      border: 2px solid rgb(252, 70, 100);
    }
    .stop-mode:hover {
      background: rgb(220, 50, 80);
      border: 2px solid rgb(220, 50, 80);
    }
}

@media (max-width: 768px) {
    #startBtn {
      display: inline-block;
      width: 120px;
      padding: 0.6rem 1rem;
      font-size: 12px;
      font-weight: 600;
      color: white;
      cursor: pointer;
      text-align: center;
      font-family: inherit;
      transition: background 0.3s, border 0.3s, color 0.3s;
    }
    
    /* режим Start — чёрная с красным бордером */
    .start-mode {
      background: black;
      border: 2px solid rgb(252, 70, 100);
    }
    
    /* режим Stop — красная */
    .stop-mode {
      background: rgb(252, 70, 100);
      border: 2px solid rgb(252, 70, 100);
    }
    #pageTitle {
        font-size: 16px;
        color: #cccccc;;
    }
    #username {
        font-size: 14px;
    }
}
    #pageTitle {
        margin-right: auto;
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 20px;
        line-height: 1;
    }

/*-----------------*/
.menu-button {
  display: inline-flex;
  align-items: center; /* прижимаем ВСЁ содержимое кнопки к низу */
  justify-content: center;
  min-height: 26px;
  gap: 4px;
  padding: 3px;
  font-size: 12px;
  color: #e1e1e1;
  font-family: inherit;
  font-weight: 800;
  cursor: pointer;
  position: relative;
  border: none;
  background: none;
  text-transform: none;
  transition-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1);
  transition-duration: 400ms;
  transition-property: color;
  white-space: nowrap;
  margin-right: 5px;
}

.menu-button:focus,
.menu-button:hover {
  color: #fff;
}

.menu-button:focus:after,
.menu-button:hover:after {
  width: 100%;
  left: 0%;
}

.menu-button:after {
  content: "";
  pointer-events: none;
  bottom: -2px;
  left: 50%;
  position: absolute;
  width: 0%;
  height: 2px;
  background-color: #fff;
  transition-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1);
  transition-duration: 400ms;
  transition-property: width, left;
}
.menu-button img {
  width: 20px;
  height: 20px;
  display: block;
  flex-shrink: 0;
}
.description{
    max-width:50%; 
    margin:40px auto; 
    text-align:left; 
    font-size: 14px;
}
@media (max-width: 768px) {
    .menu-button img {
        width: 15px;
        height: 15px;
    }
    .menu-button {
        font-size: 12px;
    }
    #leaveBtn, #nextBtn {
        margin-top: 0px;
    }
    #pageTitle {
        font-size: 16px;
    }
    .description{
        max-width:90%; 
    }
    #rules {
        font-size: 14px;
    }
}

@media (max-width: 420px) {
  body {
    font-size: 12px !important;
  }
  #pageTitle {
    font-size: 14px !important;
  }
  #username {
    font-size: 12px !important;
  }
  button {
    font-size: 13px !important;
    padding: 6px 12px !important;
  }
  .menu-button {
    font-size: 11px !important;
  }
  .menu-button img {
    width: 14px !important;
    height: 14px !important;
  }
  .description {
    max-width: 95% !important;
    font-size: 12px !important;
  }
  .pip {
    width: 95% !important;
    max-height: 35vh !important;
  }
  #rules {
        font-size: 12px;
    }
}
