body {
    font-family: Arial, sans-serif;
    background-color: #0f0f0f;
    color: white;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    text-align: center;
    
  }
  
  .container {
    width: 400px;   
  }
  
  .tagline {
    color: #ccc;
    margin-bottom: 20px;
  }
  
  .start-btn {
    padding: 12px 25px;
    font-size: 16px;
    background-color: #00bcd4;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    margin-top: 15px;
  }
  
  .rules {
    margin-top: 25px;
    font-size: 13px;
    color: #aaa;
  }
  
  .terms-box {
    margin: 25px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #ccc;
  }
  
  .terms-box input {
    transform: scale(1.2);
    cursor: pointer;
  }
  .chat-container {
    width: 95%;
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
  }
  
  #chat-box {
    height: 65vh;
    width: 100%;
    border: 1px solid #adf484;
    border-radius: 16px;
    padding: 20px;
    overflow-y: auto;
    background: rgba(25, 25, 25, 0.9);
  }
  
  .input-area {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
  }
  
  input {
    padding: 10px;
    width: 60%;
    border-radius: 5px;
    border: none;
  }
  
  button {
    padding: 10px 15px;
    background-color: #00bcd4;
    border: none;
    cursor: pointer;
    border-radius: 5px;
  }
  h1 {
    font-size: 80px;
    margin-bottom: 10px;
    color: #dff70b;
  }

  .system-message {
    font-weight: bold;
    margin-top: 5px;
  }
  
  .disconnect-message {
    color: #ff4d4d; /* red */
  }

  /* Common message styling */
.chat-message {
    margin: 8px 0;
    line-height: 1.5;
  }
  
  /* You messages */
  .you-message {
    color: #0bef47; /* light blue */
  }
  
  /* Stranger messages */
  .stranger-message {
    color: #10100f;
  }
  
  /* Make sender name bold slightly brighter */
  .you-message strong {
    color: #121212;
  }
  
  .stranger-message strong {
    color: #320dad; /* yellow name */
  }
  #chat-box {
    padding: 15px;
    border-radius: 8px;
  }
  
  .chat-message {
    margin: 10px 0;
    font-size: 15px;
  }
  
  #chat-box::-webkit-scrollbar {
    width: 6px;
  }
  
  #chat-box::-webkit-scrollbar-thumb {
    background: #cada81;
    border-radius: 10px;
  }
  /* ===== CLEAN TEXT CHAT STYLE ===== */

.chat-message {
  margin: 8px 0;
  font-size: 15px;
  line-height: 1.6;
  text-align: left;
}

/* You messages */
.you-message {
  color: #0b0c0c; /* modern blue */
  font-weight: 500;
}

/* Stranger messages */
.stranger-message {
  color: #111827; /* dark readable text on light chat bg */
  font-weight: 500;
}

/* Sender name bold */
.you-message strong {
  color: #0284c7;
}

.stranger-message strong {
  color: #88060d;
}
  .system-message {
    margin-top: 8px;
    font-weight: bold;
  }
  
  .disconnect-message {
    color: #ff4d4d;
  }

  /* ===== BACKGROUND ANIMATION ===== */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: radial-gradient(circle at center, #1f2937 0%, #0f172a 70%);
  color: white;
  min-height: 100vh;
}
  
  @keyframes bgAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
  }
  
  /* ===== TOP BAR ===== */
  .top-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
  }
  
  .logo {
    color: rgb(7, 236, 220);
    font-size: 60px;
    text-shadow: 0 0 8px rgba(142, 242, 242, 0.6);
  }
  
  .online-count {
    position: absolute;
    right: 0;
    color: rgb(12, 174, 47);
    font-weight: bold;
    font-size: 14px;
  }
  
  /* ===== CHAT CONTAINER ===== */
  .chat-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 15px;
    box-sizing: border-box;
  }
  
  /* ===== CHAT BOX BIGGER ===== */
  #chat-box {
    height: 60vh;
    width: 100%;
    border-radius: 16px;
    padding: 15px;
    overflow-y: auto;
    background: rgba(197, 223, 221, 0.85);
    box-sizing: border-box;
  }
  /* ===== MESSAGE BUBBLES ===== */
  .message-wrapper {
    display: flex;
    margin: 10px 0;
  }
  
  .you-wrapper {
    justify-content: flex-end;
  }
  
  .stranger-wrapper {
    justify-content: flex-start;
  }
  
  .message-bubble {
    max-width: 65%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
  }
  
  .you-bubble {
    background: #00e5ff;
    color: rgb(241, 195, 241);
    border-bottom-right-radius: 6px;
  }
  
  .stranger-bubble {
    background: #333;
    color: white;
    border-bottom-left-radius: 6px;
  }
  
  /* ===== SYSTEM MESSAGE ===== */
  .system-message {
    margin-top: 10px;
    font-weight: bold;
  }
  
  .disconnect-message {
    color: red;
  }
  
  /* ===== INPUT AREA ===== */
  .input-area {
    margin-top: 12px;
    display: flex;
    gap: 8px;
  }
  
  input[type="text"] {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    border: none;
    font-size: 16px; /* prevents zoom on iOS */
  }
  
  /* ===== RECONNECT OPTION ===== */
  .reconnect-option {
    display: block;
    margin-bottom: 10px;
    font-size: 13px;
    color: #ccc;
  }

  .typing-indicator {
    height: 20px;
    font-size: 13px;
    color: #aaa;
    margin-bottom: 10px;
  }

  button {
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
  }
  
  button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,255,255,0.3);
  }

  @media (max-width: 600px) {

    .logo {
      font-size: 22px;
    }
  
    .online-count {
      font-size: 12px;
    }
  
    #chat-box {
      height: 65vh;
      padding: 12px;
    }
  
    .message-bubble {
      max-width: 85%;
      font-size: 14px;
    }
  
    .input-area {
      gap: 6px;
    }
  
    button {
      padding: 8px 10px;
      font-size: 13px;
    }
  }
  html, body {
    overflow-x: hidden;
  }
.agreement {
  margin-top: 20px;
  font-size: 14px;
  color: #9ca3af;
  text-align: center;
}

.agreement label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.agreement input[type="checkbox"] {
  margin: 0;
  width: 16px;
  height: 16px;
}