/***************************************************/
/* Base */
/***************************************************/
:root {
  --bg: #4a6486;
  --card: #e7e2d8;
  --accent: #5c6297;
  --accentHover: #ffb980;
  --panelBg: rgba(255, 255, 255, 0.45);
  --border: rgba(0, 0, 0, 0.08);
  --shadow: 0 0 10px rgba(0, 0, 0, 0.05);
  --shadowSoft: 0 0 10px rgba(0, 0, 0, 0.06);
}

* { box-sizing: border-box; }

body {
  background: var(--bg);
  margin: 0;
  font-family: sans-serif;
}

/* Main page container */
.container {
  max-width: 92%;
  margin: 0 auto;
  background: var(--card);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border-radius: 10px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/***************************************************/
/* Header */
/***************************************************/
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  overflow: visible !important;
}

.translate-box {
  font-size: 0.9rem;
  text-align: right;
  white-space: nowrap;
}


.fullLink{
  display:block;
  margin-left:auto;
  padding:8px 12px;
  border:1px solid rgba(255,255,255,0.18);
  background-color: var(--accent);
  color: #000;
  text-align: center;
  border-radius:10px;
  text-decoration:none;
  font-size:12px;
  opacity:0.9;
  white-space:nowrap;
}
.fullLink:hover{
  opacity:1;
}

/***************************************************/
/* Typography */
/***************************************************/
h1 { text-align: center; margin: 0 0 1rem 0; }
h2, h3 { position: relative; display: inline-block; padding-bottom: 0.2rem; }

hr {
  border: none;
  height: 4px;
  background: var(--accent);
  margin: 2rem 0;
  border-radius: 2px;
}

/***************************************************/
/* Buttons */
/***************************************************/
button,
.button-like {
  background-color: var(--accent);
  color: #000;
  font-weight: bold;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  text-decoration: none;
  display: inline-block;
} 

button:hover,
.button-like:hover {
  background-color: var(--accentHover);
}

.button-like input[type="file"] { display: none; }

.btnLink{
  display: inline-block; 
}

.btn{
  background-color: var(--accent);
  color: #000;
  font-weight: bold;
  padding: 0.5rem 1rem;

  border-width: 5px;
  border-style: solid;
  border-color: rgb(248, 11, 30);

  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  text-decoration: none;
  display: inline-block;
}

.btn:hover{ 
  background-color: var(--accentHover); }

/***************************************************/
/* Two-column layout */
/***************************************************/
 

.layout {
  display: grid;
  grid-template-columns: var(--demo-col, 1.15fr) 1fr;
  gap: 1.25rem;
  align-items: start;
  margin-top: 1rem;

  /* height propagation */
  flex: 1;
  min-height: 0;
}



/* Left + right panels */
.left, .right {
  background: var(--panelBg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
}
.right {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Panel titles / lead */
.panel-title { margin: 0 0 0.6rem 0; }
.panel-lead {
  margin: 0 0 0.8rem 0;
  line-height: 1.5;
  max-width: 75ch;
}

.panel-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}

/* Demo frame (big) */
.demo-frame {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.12);
  background: #fff;
  box-shadow: var(--shadowSoft);
}

.demo-frame iframe {
  width: 100%;
  height: 78vh;
  min-height: 720px;
  border: 0;
  display: block;
}

/* Right column docs scroll area */
#contentWrap {
  margin-top: 1rem;  
  padding-right: 0.25rem; 
  flex: 1;
  min-height: 0;
  overflow: auto;
}


/* Demo collapse behavior */
.layout.demo-collapsed {
  grid-template-columns: 72px 1fr;
}

.layout.demo-collapsed .left {
  padding: 0.6rem;
}

.layout.demo-collapsed .left .panel-lead,
.layout.demo-collapsed .left .demo-frame {
  display: none;
}

.layout.demo-collapsed .left .panel-title {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-align: center;
  margin: 0;
  font-size: 0.9rem;
}

/* Make toggle button small and clear */
#toggleDemo {
  padding: 0.25rem 0.4rem;
  font-size: 0.9rem;
}

/***************************************************/
/* Content card */
/***************************************************/
#content {
  background-color: #fff;
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
}

/***************************************************/
/* Markdown content */
/***************************************************/
.markdown {
  font-family: Georgia, serif;
  background: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
}

.markdown h1,
.markdown h2,
.markdown h3 {
  margin-top: 1.5em;
  color: #333;
}

.markdown ul,
.markdown ol {
  padding-left: 2rem;
  margin-bottom: 1rem;
}

.markdown code {
  background: #f4f4f4;
  padding: 2px 4px;
  border-radius: 4px;
  font-family: monospace;
}

.markdown pre code {
  display: block;
  background: #f4f4f4;
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
}

.markdown table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.markdown th,
.markdown td {
  border: 1px solid #ddd;
  padding: 0.6rem;
  text-align: left;
}

.markdown th { background-color: #f0f0f0; }

.markdown a {
  color: #0055cc;
  text-decoration: none;
}

.markdown a:hover {
  text-decoration: underline;
  color: var(--accent);
}

/* Markdown images: cap size */
.markdown img {
  display: block;
  max-width: 100%;
  height: auto;
  width: min(100%, 900px);
  margin: 0.75rem auto;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.10);
  cursor: zoom-in;
}

.markdown img:active {
  cursor: zoom-out;
  width: min(100%, 1200px);
}

/***************************************************/
/* Checklist (kept as-is, but deduped) */
/***************************************************/
label { display: block; margin: 0.4rem 0; }

.note-field {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.4rem;
  font-size: 1rem;
}

.checklist { list-style: none; padding-left: 0; }

.checklist li {
  margin: 0.4rem 0;
  line-height: 1.5;
}

.checklist-item {
  margin-bottom: 1.5rem;
  border-bottom: 1px dashed #ddd;
  padding-bottom: 0.8rem;
}

.checklist-item p { margin-bottom: 0.4rem; }

.checklist-item label {
  display: inline-flex;
  align-items: center;
  margin-right: 1rem;
  font-weight: normal;
  white-space: nowrap;
}

.checklist-item input[type="radio"] { margin-right: 0.4rem; }

.description-field {
  font-size: 0.9rem;
  padding: 0.4rem;
  font-family: sans-serif;
  background: #f9f9f9;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/***************************************************/
/* Logo animation */
/***************************************************/
#logo {
  display: block;
  width: min(92vw, 520px);
  height: auto;
  overflow: visible;
}

/* ensure nothing clips the svg */
.header, .header-left { overflow: visible !important; }

#logo .first { fill: #111111; }
#logo .second     { fill: #D50000; }
#logo .powered{ fill: #2496ED; }

#logo .first, #logo .second {
  stroke: currentColor;
  paint-order: stroke fill;
  stroke-width: 2px;
  stroke-linejoin: round;
  stroke-linecap: round;
  fill: transparent;
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
}

#logo .first {
  color: #111;
  animation: draw 1.2s ease-out forwards, fill-first .6s ease-out forwards .9s;
}

#logo .second {
  color: #D50000;
  animation: draw 1.2s ease-out .15s forwards, fill-second .6s ease-out 1.05s forwards;
}

#logo #tagline {
  opacity: 0;
  transform: translate(256,0);
  animation: tagline .6s ease-out 1.2s forwards;
}

#logo { transition: transform .2s ease, filter .2s ease; will-change: transform; }
#logo:hover { transform: translateY(-2px); filter: drop-shadow(0 2px 6px rgba(0,0,0,.08)); }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fill-first { to { fill: #111111; } }
@keyframes fill-second     { to { fill: #D50000; } }
@keyframes tagline     { to { opacity: 1; transform: translate(256,120); } }

/***************************************************/
/* Back to top */
/***************************************************/
#backToTop {
  position: fixed;
  right: 10px;
  bottom: 20px;
  z-index: 1000;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 8px;
  background: #222;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s;
}

#backToTop:hover { opacity: 1; }

/***************************************************/
/* Responsive */
/***************************************************/
@media (max-width: 1100px) {
  .container { max-width: 96%; }
}

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  #contentWrap { max-height: none; overflow: visible; }
  .demo-frame iframe { height: 70vh; min-height: 600px; }
}


/***************************************************/
/* Markdown */
/***************************************************/

/* Markdown images: default as thumbnails, clickable in md */
.markdown img {
  display: block;
  max-width: 100%;
  height: auto;

  /* thumbnail sizing */
  width: min(100%, 520px);
  margin: 0.75rem auto;

  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.10);

  cursor: zoom-in;
}

/* Don't try to "resize on active" (it causes layout jumps). */
.markdown img:active {
  cursor: zoom-in;
  width: min(100%, 520px);
}
