/* Universe – Style */

:root {
  --bg:       #0d0f14;
  --surface:  #161820;
  --border:   rgba(255,255,255,.08);
  --accent:   #7c6dfa;
  --accent2:  #4ade80;
  --text:     #e2e8f0;
  --muted:    #6b7280;
  --danger:   #ef4444;
  --radius:   12px;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}
.header-inner {
  max-width: 960px;
  margin: 0 auto;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon { font-size: 24px; }
.logo-text { font-size: 20px; font-weight: 700; color: var(--accent); letter-spacing: -.5px; }
.logo-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

.badge {
  background: rgba(124,109,250,.15);
  color: var(--accent);
  border: 1px solid rgba(124,109,250,.3);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 13px;
}

/* Main */
main {
  flex: 1;
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* Section Header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
h2 { font-size: 18px; font-weight: 600; }
h3 { font-size: 16px; font-weight: 600; margin-bottom: 10px; }

.btn-icon {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 8px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .15s, border-color .15s;
}
.btn-icon:hover { color: var(--text); border-color: rgba(255,255,255,.2); }

/* Room List */
.room-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.loading, .empty {
  color: var(--muted);
  padding: 40px 0;
  text-align: center;
  grid-column: 1 / -1;
}

/* Room Card */
.room-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .15s;
  cursor: pointer;
}
.room-card:hover { border-color: rgba(124,109,250,.4); }

.room-name {
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.room-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}

.room-guests {
  display: flex;
  align-items: center;
  gap: 4px;
}
.guest-bar {
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,.1);
  width: 60px;
  overflow: hidden;
}
.guest-fill {
  height: 100%;
  background: var(--accent2);
  border-radius: 2px;
}

.join-badge {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid;
}
.join-open    { color: var(--accent2); border-color: rgba(74,222,128,.3); background: rgba(74,222,128,.08); }
.join-friends { color: #60a5fa; border-color: rgba(96,165,250,.3); background: rgba(96,165,250,.08); }
.join-request { color: #f59e0b; border-color: rgba(245,158,11,.3); background: rgba(245,158,11,.08); }

.btn-join {
  margin-top: 4px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: opacity .15s;
}
.btn-join:hover { opacity: .85; }

/* Info Section */
.info-section p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 20px;
}
.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.info-icon  { font-size: 22px; margin-bottom: 8px; }
.info-title { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.info-text  { font-size: 13px; color: var(--muted); }

/* Footer */
footer {
  text-align: center;
  padding: 16px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--border);
}
