:root{
  --bg:#0b0f14; --card:#111826; --muted:#93a3b5; --text:#e7edf5;
  --accent:#7dd3fc; --border:#1f2a37; --focus:#22d3ee;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0; background:linear-gradient(180deg,#0b0f14 0%,#0b1220 100%);
  color:var(--text); font:14px/1.45 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}

.container{max-width:1150px;margin:22px auto;padding:0 16px}

/* Headings */
.header{margin-bottom:10px;text-align:center}
.page-title{
  margin:0 0 6px;
  font-size:40px; line-height:1.1; font-weight:800;
}
@media (max-width: 640px){
  .page-title{font-size:32px}
}
.subtitle{margin:0;color:var(--muted)}

.section{margin:22px 0}
.section h2{margin:0 0 6px;font-size:22px;font-weight:700}

/* Colored section titles (override base h2 size/color) */
.title-red{
  color:#f87171 !important;
  font-size:24px !important;
  font-weight:800 !important;
}
.title-green{
  color:#4ade80 !important;
  font-size:24px !important;
  font-weight:800 !important;
}

.section-sub{margin:0 0 12px;color:var(--muted)}

/* Controls grid */
.controls-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap:12px;
  align-items:end;
}

.field{display:flex;flex-direction:column;gap:6px}
.field span{color:var(--muted);font-size:12px}
.field input[type="url"], .field select{
  padding:10px 12px; border-radius:10px; border:1px solid var(--border);
  background:var(--card); color:var(--text); outline:none;
}
.field input[type="url"]:focus, .field select:focus{
  border-color:var(--focus); box-shadow:0 0 0 3px rgba(34,211,238,.15);
}

.actions{display:flex;gap:10px;justify-content:center}
.actions button{
  padding:10px 14px; border:1px solid var(--border); border-radius:10px;
  background:linear-gradient(180deg,#1a2532,#111924); color:var(--text); cursor:pointer;
  font-weight:700;
}
.actions button:hover{filter:brightness(1.08)}

/* POST body block */
.post-body{}
.post-body.hidden{display:none}
.field.full textarea{
  width:100%; min-height:90px; padding:10px 12px; border-radius:10px; border:1px solid var(--border);
  background:var(--card); color:var(--text); resize:vertical;
  font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Panes grid for Raw/Render */
.panes-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
}
@media (max-width: 980px){
  .panes-grid{grid-template-columns:1fr}
}

.warning-note {
  margin: 8px 0 14px;
  padding: 10px 12px;
  border-left: 4px solid #f87171; /* red accent */
  background: rgba(248, 113, 113, 0.1);
  color: #fca5a5;
  font-size: 13px;
  border-radius: 6px;
}

.pane{
  background:var(--card); border:1px solid var(--border); border-radius:14px;
  display:flex; flex-direction:column; overflow:hidden; min-height:360px;
}
.pane-title{
  padding:10px 12px; border-bottom:1px solid var(--border);
  background:#0f1620; color:var(--accent); font-weight:700;
}
textarea#fetchedResource{
  flex:1; width:100%; min-height:360px; resize:vertical; padding:12px;
  background:transparent; color:var(--text); border:0;
  font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.iframe-wrap{flex:1; min-height:360px; background:#0a0f16; position:relative}
#renderFrame{
  display:block; width:100%; height:100%; border:0; background:#ffffff;
}

/* Static snapshot fallback */
#renderStatic{ display:none; }
.static-snapshot{
  padding:12px; color:var(--text); background:#0a0f16;
  font:14px/1.45 system-ui, sans-serif;
  word-break:break-word;
}
.static-snapshot img, 
.static-snapshot video, 
.static-snapshot audio {
  max-width:100%; height:auto; display:block; margin:6px 0;
}

/* Meta / tips */
.meta{}
.meta pre{
  white-space:pre-wrap; word-break:break-word; margin:8px 0 0;
  background:var(--card); border:1px solid var(--border); border-radius:12px;
  padding:12px; color:var(--muted);
}
.tips{padding:8px 12px;color:var(--muted)}

.footer{margin:18px 0 30px;color:var(--muted);text-align:center}
