* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Roboto, sans-serif;
}

body {
  background: #121214;
  color: #e5e7eb;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.app-header {
  background: #1a1a1f;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 1px solid #27272a;
}

.app-header h1 {
  font-size: 20px;
  color: #f9fafb;
}

.join-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.join-group input {
  padding: 8px 12px;
  border: 1px solid #3f3f46;
  border-radius: 6px;
  background: #27272a;
  color: white;
  font-size: 14px;
}

.join-group button {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  background: #2563eb;
  color: white;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.join-group button:hover {
  background: #1d4ed8;
}

.join-group button:disabled {
  background: #3b82f680;
  cursor: not-allowed;
}

.status-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}

.status-text {
  color: #94a3b8;
}

.zkp-status {
  color: #94a3b8;
}

/* Main Layout */
.app-main {
  flex: 1;
  display: flex;
  gap: 16px;
  padding: 16px;
  overflow: hidden;
}

.video-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
  overflow-y: auto;
}

.video-tile {
  position: relative;
  background: #1e1e24;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16/9;
}

.video-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-tile .label {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0,0,0,0.7);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.indicator {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(239,68,68,0.8);
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 12px;
}

.info-panel {
  width: 260px;
  background: #1a1a1f;
  border-radius: 8px;
  padding: 16px;
  border: 1px solid #27272a;
}

.info-panel h3 {
  margin-bottom: 12px;
  font-size: 16px;
}

.peer-count {
  font-size: 14px;
  color: #94a3b8;
  margin-bottom: 12px;
}

.greeting {
  font-size: 13px;
  color: #94a3b8;
  margin-top: 12px;
}

/* Kontrol Bar */
.controls-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  padding: 12px 20px;
  background: rgba(26,26,31,0.95);
  border-radius: 50px;
  border: 1px solid #3f3f46;
  backdrop-filter: blur(8px);
}

.control-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border: none;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  color: white;
}

.control-btn.active {
  background: #10b981; /* Hijau = Aktif */
}

.control-btn:not(.active) {
  background: #ef4444; /* Merah = Mati */
}

.control-btn:hover {
  transform: translateY(-2px);
}

/* Responsif */
@media (max-width: 900px) {
  .app-main {
    flex-direction: column;
  }
  .info-panel {
    width: 100%;
    max-height: 180px;
  }
  .controls-bar {
    padding: 10px 14px;
    gap: 8px;
  }
  .btn-label {
    display: none;
  }
}