/* ================================
   BEACH THEME — Message in Bottle
================================ */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: linear-gradient(to bottom, #87ceeb 0%, #fdd9a0 55%, #f5d6a0 100%);
  background-attachment: fixed;
  color: #2b2b2b;
  min-height: 100vh;
}

/* ================================
   Topbar (Glass Ocean Style)
================================ */

.topbar {
  position: sticky;
  top: 0;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.65);
  padding: 14px 24px;
  display: flex;
  gap: 18px;
  align-items: center;
  border-bottom: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 4px 20px rgba(0,0,0,.05);
  z-index: 1000;
}

.topbar a {
  text-decoration: none;
  font-weight: 600;
  color: #0369a1;
  transition: all .2s ease;
}

.topbar a:hover {
  color: #0ea5e9;
  transform: translateY(-1px);
}

/* ================================
   Page Container
================================ */

.page {
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 20px;
}

/* ================================
   Cards (Sand Style)
================================ */

.card {
  background: #fffaf2;
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 26px;
  box-shadow: 0 15px 40px rgba(0,0,0,.08);
  border: 1px solid rgba(0,0,0,.05);
  transition: transform .2s ease, box-shadow .2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 50px rgba(0,0,0,.12);
}

h1, h2 {
  margin-top: 0;
  color: #075985;
}

/* ================================
   Inputs & Textareas
================================ */

.input,
textarea,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.1);
  background: #ffffff;
  font-size: 14px;
  transition: all .2s ease;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.input:focus,
textarea:focus,
input:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56,189,248,.25);
}

/* ================================
   Buttons
================================ */

button {
  padding: 10px 16px;
  border-radius: 14px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: white;
  transition: all .2s ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,.15);
}

button.secondary {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

button.danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* ================================
   Status / Alerts
================================ */

.success {
  background: #d1fae5;
  color: #065f46;
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 14px;
}

.error {
  background: #fee2e2;
  color: #991b1b;
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 14px;
}

.muted {
  opacity: .7;
  font-size: .9em;
}

/* ================================
   Pills
================================ */

.pill {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: .8em;
  font-weight: 600;
  background: rgba(14,165,233,.15);
  color: #075985;
}

.pill.green {
  background: rgba(34,197,94,.15);
  color: #166534;
}

.pill.red {
  background: rgba(239,68,68,.15);
  color: #7f1d1d;
}

/* ================================
   Tables
================================ */

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

.table th {
  text-align: left;
  padding: 12px;
  font-size: 13px;
  text-transform: uppercase;
  background: rgba(14,165,233,.1);
  color: #075985;
}

.table td {
  padding: 12px;
  border-bottom: 1px solid rgba(0,0,0,.05);
  vertical-align: top;
}

.table tr:hover {
  background: rgba(14,165,233,.05);
}

/* ================================
   Cooldown
================================ */

.cooldown {
  color: #b45309;
  font-weight: 600;
  margin-top: 8px;
}

/* ================================
   Footer Space
================================ */

body::after {
  content: "";
  display: block;
  height: 60px;
}

/* ================================
   Animated Wave Footer
================================ */
.wave-footer {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 120px;
  pointer-events: none;
  z-index: 0; /* keep behind UI */
  overflow: hidden;
}

.wave-footer svg {
  width: 200%;
  height: 100%;
  display: block;
}

.wave {
  opacity: 0.55;
}

.wave1 { animation: waveMove1 10s linear infinite; opacity: 0.55; }
.wave2 { animation: waveMove2 14s linear infinite; opacity: 0.35; }
.wave3 { animation: waveMove3 18s linear infinite; opacity: 0.25; }

@keyframes waveMove1 {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-25%); }
}
@keyframes waveMove2 {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-35%); }
}
@keyframes waveMove3 {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-45%); }
}

/* ensure content stays above waves */
.topbar, .page, .card {
  position: relative;
  z-index: 1;
}

/* ================================
   Chat Fixes
================================ */

/* Chat input text */
.chat-input,
.chat-input input,
.chat-input textarea {
  color: #000 !important;
  background: #ffffff !important;
}

/* Placeholder darker */
.chat-input input::placeholder,
.chat-input textarea::placeholder {
  color: #666 !important;
  opacity: 1;
}

/* Chat messages */
.chat-message {
  color: #000 !important;
}

/* Sender name / timestamp */
.chat-meta {
  color: #444 !important;
}