/* Modern Minimal Design - Dark Theme */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #1a1a1a;
  --bg-card: #1f1f1f;
  --text-primary: #ffffff;
  --text-secondary: #b3b3b3;
  --accent: #00F782;
  --border: #2a2a2a;
  --shadow: rgba(0, 0, 0, 0.5);
}

body {
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  padding: 1.5rem 1rem;
}

.container {
  max-width: 900px;
  margin: 0 auto;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.header-logo-center {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.header-logo-main {
  width: 100%;
  max-width: 700px;
  height: auto;
  border-radius: 0;
  object-fit: contain;
}

.subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 3rem;
}

/* Room Cards Grid */
.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.room-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1.5rem;
  cursor: pointer;
}

.room-card:hover {
  transform: translateY(-2px);
  background: var(--bg-secondary);
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(0, 247, 130, 0.1);
}

.room-card:active {
  transform: translateY(0);
}

.room-logo {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.room-name {
  font-size: 1.2rem;
  font-weight: 600;
  text-align: left;
  flex: 1;
}

/* QR Section */
.qr-section {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
}

.qr-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem 1.5rem;
  text-align: center;
  max-width: 550px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.qr-container:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 247, 130, 0.2);
  border-color: var(--accent);
}

.qr-container img {
  width: 280px;
  height: 280px;
  border-radius: 16px;
  margin-bottom: 1.5rem;
  border: 3px solid var(--accent);
  padding: 10px;
  background: white;
  box-shadow: 0 4px 20px rgba(0, 247, 130, 0.15);
}

.url-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.room-url {
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  margin: 1rem 0;
  word-break: break-all;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 0.9rem;
  color: var(--accent);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.room-url:hover {
  background: var(--bg-primary);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.room-url.copying {
  border-color: var(--accent);
  animation: pulse 0.5s ease;
}

.room-url.copied {
  background: var(--accent);
  border-color: var(--accent);
}

.room-url.copied #urlText {
  opacity: 0;
}

.copy-feedback-room {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--bg-primary);
  font-weight: 700;
  font-size: 1.1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.room-url.copied .copy-feedback-room {
  opacity: 1;
}

.copy-hint {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 0.5rem;
  opacity: 0.7;
}

/* Tutorial Steps */
.tutorial {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0 0 0;
}

.step-line {
  display: flex;
  align-items: center;
  padding: 0.75rem 0;
  font-size: 1.05rem;
  color: var(--text-secondary);
}

.step-line:not(:last-child) {
  border-bottom: 1px solid var(--border);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--accent);
  color: var(--bg-primary);
  border-radius: 50%;
  font-weight: 700;
  margin-right: 1rem;
  flex-shrink: 0;
}

/* Messages Section */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  margin: 2rem 0;
}

#messages {
  list-style: none;
  padding: 0;
}

#messages li {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  transition: all 0.2s ease;
}

#messages li:hover {
  border-color: var(--accent);
}

#messages li.loading {
  text-align: center;
  color: var(--text-secondary);
  font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    padding: 1rem 0.5rem;
  }

  h1 {
    font-size: 2rem;
  }

  .qr-container {
    padding: 2rem 1.5rem;
  }

  .qr-container img {
    width: 220px;
    height: 220px;
  }

  .rooms-grid {
    grid-template-columns: 1fr;
  }

  .tutorial {
    padding: 1.5rem;
  }

  .step-line {
    font-size: 1rem;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.container > * {
  animation: fadeIn 0.6s ease forwards;
}
