/* ===== Shared Base Styles ===== */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: url('rough_water.jpg') no-repeat center center fixed;
    background-size: cover;
    color: #fff;
    min-height: 100vh;
  }
  .overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 0;
  }
  
  /* ===== index.php styles ===== */
  .heading { white-space: nowrap; }
  @media (max-width: 480px) {
    .heading { font-size: 2rem; }
  }
  nav { position: fixed; top: 10px; right: 20px; z-index: 2; }
  nav a { margin-left: 20px; text-decoration: none; color: #fff; font-weight: bold; }
  .center-box {
    position: fixed; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1; text-align: center;
    width: 90%; max-width: 700px;
  }
  h1 {
    color: #fff; font-size: 60px;
    margin: 10px 0 18px; letter-spacing: 1px;
  }
  .quick-login {
    display: inline-flex; gap: 8px; align-items: center;
    margin-bottom: 15px; background: transparent; border: none; padding: 0;
  }
  .quick-login input[type="text"] {
    width: 260px; max-width: 70vw;
    padding: 10px 12px; border-radius: 8px;
    background: #fff; color: #111;
    border: 1px solid rgba(0,0,0,0.25); outline: none;
  }
  .quick-login button {
    padding: 10px 14px; border-radius: 6px; border: 1px solid #fff;
    background: transparent; color: #fff; cursor: pointer;
  }
  .quick-login button:hover { background: rgba(255,255,255,0.12); }
  .cta {
    display: inline-block; border: 1px solid #fff;
    padding: 12px 22px; cursor: pointer;
    border-radius: 8px; user-select: none;
  }
  .cta:hover { background: rgba(255,255,255,0.12); }
  
  /* popup */
  .popup {
    position: fixed; inset: 0;
    display: none; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.8); z-index: 10; padding: 16px;
  }
  .popup-content {
    width: 100%; max-width: 560px; max-height: 90vh; overflow: auto;
    border-radius: 10px; background: #fff; color: #000;
    padding: 18px 18px 24px; box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    text-align: left;
  }
  .popup-head { display: flex; justify-content: space-between; align-items: center; }
  .close { border: 0; background: transparent; color: #c00; font-weight: 900; font-size: 1.4rem; cursor: pointer; }
  .divider { margin: 16px 0; opacity: .25; }
  
  /* grey-box block */
  .grey-box {
    background: #eee; color: #222; border-radius: 10px;
    padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px;
  }
  .grey-box__text { flex: 1 1 auto; text-align: left; }
  .grey-box__text strong { display: block; font-size: 1.1rem; margin-bottom: 8px; }
  .grey-box__text p { margin: 0 0 12px; }
  .btn-comment {
    display: inline-block; text-decoration: none;
    background: #111; color: #fff; padding: 10px 16px;
    border-radius: 10px; border: 1px solid #111;
    transition: background .2s, color .2s;
  }
  .btn-comment:hover { background: transparent; color: #111; }
  .grey-box__image img {
    display: block; max-width: 220px; width: 35vw; height: auto; border-radius: 8px;
  }
  @media (max-width:700px) {
    .grey-box { flex-direction: column; align-items: flex-start; }
    .grey-box__image img { width: 100%; max-width: none; margin-top: 8px; }
  }
  
  /* ===== message.php & login.php ===== */
  .topbar {
    position: fixed; top: 0; left: 0; right: 0;
    padding: 10px 16px;
    display: flex; justify-content: space-between; align-items: center; z-index: 2;
  }
  .nav-left a, .nav-right a { color:#fff; text-decoration:none; font-weight:700; }
  .nav-right a { margin-left:18px; }
  
  .wrap {
    position: relative; z-index: 1;
    display: grid; place-items: center;
    min-height: 100svh; padding: 90px 16px 24px;
    text-align: left;
  }
  .card {
    width: 100%; max-width: 640px;
    background: #fff; color: #000;
    border-radius: 10px; padding: 20px 20px 26px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  }
  h2 { margin-top: 0; }
  .muted { font-size: .9rem; color: #444; }
  