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

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f5f5f5;
  padding: 20px;
}

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

h1 {
  color: #2c3e50;
  margin-bottom: 30px;
  font-size: 2em;
  text-align: center;
}

/* Input Section */
.input-section {
  background: white;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.input-label {
  display: block;
  font-weight: 600;
  color: #495057;
  margin-bottom: 10px;
  font-size: 1.1em;
}

.embed-input {
  width: 100%;
  min-height: 150px;
  padding: 15px;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  font-family: "Courier New", monospace;
  font-size: 14px;
  resize: vertical;
  background: white;
}

.embed-input:focus {
  outline: none;
  border-color: #3498db;
}

.load-btn {
  margin-top: 20px;
  padding: 12px 30px;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.load-btn:hover {
  background: #2980b9;
}

/* Video Test Section */
.video-test-section {
  display: none;
  background: white;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.video-test-section.active {
  display: block;
}

/* Ratio selector for testing */
.test-ratio-selector {
  margin-bottom: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
}

.test-ratio-selector label {
  font-weight: 600;
  margin-right: 10px;
}

.test-ratio-selector select {
  padding: 8px 15px;
  border: 2px solid #dee2e6;
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
}

/* Test video container */
.test-video-container {
  position: relative;
  width: 100%;
  max-width: 100%;
}

.test-video-wrapper {
  position: relative;
  height: 0;
  overflow: hidden;
  background: #000;
  border-radius: 12px;
  padding-bottom: 56.25%;
  /* Default 16:9 */
  transition: padding-bottom 0.3s ease;
}

/* Override Vidalytics for testing */
.test-video-wrapper > div[id^="vidalytics_embed_"] {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  padding-top: 0 !important;
}

.test-video-wrapper iframe,
.test-video-wrapper video,
.test-video-wrapper > div {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border: none !important;
}

/* Code Output Sections */
.code-section {
  background: white;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.code-section h2 {
  color: #2c3e50;
  margin-bottom: 20px;
  font-size: 1.5em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.code-block {
  background: #2c3e50;
  color: #ecf0f1;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  position: relative;
}

.code-block pre {
  margin: 0;
  font-family: "Courier New", monospace;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px 12px;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
}

.copy-btn:hover {
  background: #2980b9;
}

.copy-btn.copied {
  background: #27ae60;
}

/* Info box */
.info-box {
  background: #e8f4f8;
  border-left: 4px solid #3498db;
  padding: 15px;
  margin-top: 20px;
  border-radius: 4px;
}

.warning-box {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 15px;
  margin-top: 20px;
  border-radius: 4px;
}
