/* Custom CSS for Caption Safe-Zone Checker */
:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --text-main: #1f2937;
  --text-light: #4b5563;
  --bg-main: #ffffff;
  --bg-light: #f3f4f6;
  --danger: rgba(239, 68, 68, 0.5);
  --danger-solid: #ef4444;
  --border: #e5e7eb;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, sans-serif;
}

body {
  color: var(--text-main);
  line-height: 1.6;
  background: var(--bg-main);
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1rem;
}

.site-header {
  background: var(--bg-main);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-header nav a {
  margin-left: 1rem;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 500;
}

.hero {
  padding: 4rem 0;
  text-align: center;
}

.hero h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.125rem;
  color: var(--text-light);
  max-width: 800px;
  margin: 0 auto;
}

.bg-light {
  background: var(--bg-light);
}

.content-section {
  padding: 3rem 0;
}

.content-section h2 {
  margin-bottom: 1.5rem;
  font-size: 2rem;
}

.content-section p {
  margin-bottom: 1.5rem;
}

.content-section h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.tool-section {
  padding: 3rem 0;
}

.tool-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 768px) {
  .tool-layout {
    grid-template-columns: 1fr;
  }
}

.tool-controls h3 {
  margin-bottom: 1rem;
}

.help-text {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}

input[type="file"] {
  display: block;
  width: 100%;
  padding: 1rem;
  border: 2px dashed var(--border);
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
}

.platform-toggles {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.btn {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  background: var(--bg-main);
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
  text-align: left;
}

.btn:hover {
  background: var(--bg-light);
}

.btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.legend {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  gap: 0.5rem;
  color: var(--text-light);
}

.swatch {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.25rem;
}

.swatch.danger {
  background: var(--danger-solid);
  opacity: 0.5;
}

.tool-canvas-wrapper {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  border: 2px solid var(--text-main);
  border-radius: 1rem;
  overflow: hidden;
  aspect-ratio: 9/16;
  background: #000;
}

canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.ad-container {
  padding: 2rem 0;
  text-align: center;
}

.site-footer {
  background: var(--bg-light);
  padding: 2rem 0;
  margin-top: 4rem;
  text-align: center;
}

.site-footer nav a {
  margin: 0 0.5rem;
  color: var(--text-light);
  text-decoration: none;
}


/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
