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

/* Cloud Demo Banner */
.demo-banner {
  background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
  color: white;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.demo-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.demo-banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #48bb78;
  flex-shrink: 0;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.demo-banner-content a {
  color: #bee3f8;
  text-decoration: none;
  margin-left: auto;
  white-space: nowrap;
  font-weight: 500;
}

.demo-banner-content a:hover {
  color: white;
  text-decoration: underline;
}

.demo-banner-content a + a {
  margin-left: 1.5rem;
}

#demo-banner-credentials {
  color: #bee3f8;
  font-size: 0.85rem;
  margin-left: 1rem;
}

#demo-banner-credentials code {
  background: rgba(255, 255, 255, 0.15);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  font-size: 0.8rem;
}

/* Connection Status Indicator */
.connection-status {
  display: none;
  align-items: center;
  font-size: 0.8rem;
  color: #e2e8f0;
  margin-top: 0.5rem;
  font-weight: 400;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell',
    sans-serif;
  padding: 2rem;
  background: #f5f7fa;
  min-height: 100vh;
  color: #1a202c;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.header {
  background: #1a365d;
  color: white;
  padding: 2rem;
  border-bottom: 1px solid #2c5282;
}

.header h1 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.header p {
  font-size: 1rem;
  color: #e2e8f0;
  font-weight: 400;
}

/* Tab Navigation */
.tabs {
  display: flex;
  background: #f7fafc;
  border-bottom: 2px solid #e2e8f0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.tab {
  flex: 1;
  min-width: 140px;
  padding: 1rem 1.5rem;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: #4a5568;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.tab:hover {
  background: #edf2f7;
  color: #2d3748;
}

.tab.active {
  color: #1a365d;
  border-bottom-color: #1a365d;
  background: white;
}

.tab-icon {
  font-size: 1.1rem;
}

.tab-count {
  font-size: 0.75rem;
  padding: 0.125rem 0.375rem;
  background: #cbd5e0;
  border-radius: 10px;
  color: #2d3748;
}

.tab.active .tab-count {
  background: #1a365d;
  color: white;
}

/* Tab Content */
.tab-content {
  display: none;
  padding: 2rem;
  animation: fadeIn 0.3s ease-in;
}

.tab-content.active {
  display: block;
}

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

.section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #f7fafc;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.section h2 {
  color: #2d3748;
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.section p {
  color: #4a5568;
  margin-bottom: 1rem;
  line-height: 1.6;
  font-size: 0.95rem;
}

.button-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

button {
  padding: 0.625rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

button:hover {
  opacity: 0.95;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

button:active {
  opacity: 1;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: #2c5282;
  color: white;
}

.btn-primary:hover {
  background: #2a4365;
}

.btn-success {
  background: #2f855a;
  color: white;
}

.btn-success:hover {
  background: #276749;
}

.btn-warning {
  background: #c05621;
  color: white;
}

.btn-warning:hover {
  background: #9c4221;
}

.btn-danger {
  background: #c53030;
  color: white;
}

.btn-danger:hover {
  background: #9b2c2c;
}

.btn-info {
  background: #2b6cb0;
  color: white;
}

.btn-info:hover {
  background: #2c5282;
}

.btn-capture {
  grid-column: 1 / -1;
  background: #1a365d;
  color: white;
  font-size: 1rem;
  padding: 1rem;
  font-weight: 500;
  letter-spacing: 0.025em;
}

.btn-capture:hover {
  background: #2c5282;
}

#output {
  margin-top: 2rem;
  padding: 1.25rem;
  background: #f8fafc;
  color: #1a365d;
  border-radius: 4px;
  font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  max-height: 600px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px solid #e2e8f0;
}

#output:empty::before {
  content: 'Click "Capture Bug Report" to see captured data...';
  color: #718096;
  font-style: italic;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  background: #edf2f7;
  color: #2d3748;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 0.5rem;
  border: 1px solid #e2e8f0;
}

.test-element {
  padding: 1rem;
  background: white;
  border: 2px dashed #cbd5e0;
  border-radius: 4px;
  margin-top: 1rem;
  text-align: center;
  color: #718096;
}

@keyframes fade {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.9;
  }
}

.loading {
  animation: fade 1s ease-in-out infinite;
}

/* Scrollbar styling */
#output::-webkit-scrollbar {
  width: 8px;
}

#output::-webkit-scrollbar-track {
  background: #1a202c;
  border-radius: 4px;
}

#output::-webkit-scrollbar-thumb {
  background: #4a5568;
  border-radius: 4px;
}

#output::-webkit-scrollbar-thumb:hover {
  background: #718096;
}

/* Replay Player Styles */
#replay-player-container {
  display: none;
  margin-top: 1rem;
  padding: 1.5rem;
  background: white;
  border: 2px solid #3182ce;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#replay-player-container.active {
  display: block;
}

.player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e2e8f0;
}

.player-header h3 {
  font-size: 1.1rem;
  color: #2d3748;
  font-weight: 600;
}

.player-stats {
  font-size: 0.85rem;
  color: #718096;
}

.player-controls {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

#replay-player {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}

/* Extension Tab Styles */
.extension-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.extension-feature {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 1rem;
}

.extension-feature strong {
  display: block;
  color: #1a365d;
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}

.extension-feature span {
  font-size: 0.85rem;
  color: #718096;
}

.extension-steps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.extension-step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 1rem;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1a365d;
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.extension-step strong {
  display: block;
  color: #2d3748;
  margin-bottom: 0.25rem;
}

.extension-step p {
  font-size: 0.85rem;
  color: #718096;
  margin: 0;
}

.extension-step code {
  background: #edf2f7;
  padding: 0.125rem 0.375rem;
  border-radius: 3px;
  font-size: 0.8rem;
}

.api-key-display {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.75rem 1rem;
}

.api-key-display code {
  flex: 1;
  font-size: 0.85rem;
  color: #2d3748;
  word-break: break-all;
  background: #f7fafc;
  padding: 0.5rem;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}
