* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0a0a0a;
  color: #e0e0e0;
  min-height: 100vh;
}

/* -- Shared -- */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

h1 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: #fff;
}

h1 span { color: #888; font-weight: 300; }

.status {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.status.info    { background: #1a1a2e; color: #8888cc; }
.status.success { background: #0a2e0a; color: #4caf50; }
.status.error   { background: #2e0a0a; color: #f44336; }

button {
  padding: 0.6rem 1.4rem;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: opacity 0.2s;
}
button:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-primary   { background: #4caf50; color: #fff; }
.btn-danger    { background: #f44336; color: #fff; }
.btn-secondary { background: #333; color: #ddd; }

/* -- Sender -- */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1.5rem;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.control-group label {
  font-size: 0.8rem;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

select {
  background: #1a1a1a;
  color: #e0e0e0;
  border: 1px solid #333;
  border-radius: 4px;
  padding: 0.5rem;
  font-size: 0.9rem;
}

.session-info {
  background: #111;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.session-info .session-id {
  font-family: monospace;
  font-size: 1.4rem;
  color: #4caf50;
}

.session-info a {
  color: #6688cc;
  word-break: break-all;
  font-size: 0.85rem;
}

.session-info .link-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* -- Dual Panel -- */
.dual-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.panel-title {
  font-size: 0.85rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.panel-content {
  background: #111;
  border: 1px solid #222;
  border-radius: 8px;
  padding: 1rem;
  height: 400px;
  overflow-y: auto;
  font-size: 0.95rem;
  line-height: 1.6;
}

.panel-line {
  padding: 0.2rem 0;
  border-bottom: 1px solid #1a1a1a;
  animation: slideIn 0.3s ease;
}

@media (max-width: 600px) {
  .dual-panel { grid-template-columns: 1fr; }
}

/* -- Receiver -- */
.receiver-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 2rem;
}

.receiver-header {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

#subtitle {
  font-size: 2.2rem;
  font-weight: 500;
  text-align: center;
  color: #fff;
  max-width: 90vw;
  padding: 1rem;
  min-height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

#subtitle.fade-in {
  animation: fadeIn 0.3s ease;
}

#history {
  margin-top: 2rem;
  max-height: 30vh;
  overflow-y: auto;
  width: 100%;
  max-width: 800px;
}

.history-line {
  color: #666;
  font-size: 1rem;
  padding: 0.3rem 0;
  text-align: center;
  border-bottom: 1px solid #151515;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: translateX(0); }
}
