/* ============================================================
   XR Task System Product Page Styles (English Version)
   Follows elfnaga.com template visual language:
   - Primary color #51cbce (matches template cyan)
   - Fonts: Merriweather / Merriweather Sans (matching site defaults)
   - Structure aligned with HDRP Detail Map Generator page
   ============================================================ */

/* --- Image placeholder (for design mockups, replace with real images on launch) --- */
.xr-img-placeholder {
    width: 100%;
    background: #f5f7fa;
    border: 2px dashed #51cbce;
    border-radius: 4px;
    padding: 60px 40px;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}
.xr-img-tag {
    display: inline-block;
    padding: 4px 14px;
    background: #51cbce;
    color: #fff;
    font-size: 12px;
    font-family: "Merriweather Sans", "Helvetica", Arial, sans-serif;
    font-weight: 700;
    border-radius: 20px;
    margin-bottom: 14px;
    letter-spacing: 0.5px;
}
.xr-img-priority {
    display: inline-block;
    padding: 3px 12px;
    background: #fbbf24;
    color: #1a1200;
    font-size: 11px;
    font-family: "Merriweather Sans", "Helvetica", Arial, sans-serif;
    font-weight: 700;
    border-radius: 12px;
    margin-left: 8px;
    margin-bottom: 14px;
    vertical-align: middle;
}
.xr-img-priority.p1 { background: #4a9eff; color: #fff; }
.xr-img-priority.p2 { background: #999; color: #fff; }
.xr-img-name {
    font-size: 20px;
    font-family: "Merriweather Sans", "Helvetica", Arial, sans-serif;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}
.xr-img-desc {
    font-size: 14px;
    color: #777;
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.7;
}
.xr-img-size {
    margin-top: 12px;
    font-size: 12px;
    color: #51cbce;
    font-family: "Courier New", monospace;
}

/* --- Design spec note bar --- */
.xr-spec-note {
    background: #f0faf9;
    border-left: 4px solid #51cbce;
    padding: 14px 20px;
    margin: 0 0 2rem 0;
    font-size: 14px;
    color: #555;
    line-height: 1.7;
    font-style: normal;
}
.xr-spec-note strong {
    color: #51cbce;
    font-style: normal;
}

/* --- Node type cards (2x3 grid, left color bar + left-aligned + SVG icon) --- */
.xr-node-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 1.6rem 0 2rem 0;
}
.xr-node-card {
    position: relative;
    background: #fff;
    border: 1px solid #e8ecf1;
    border-radius: 0;
    padding: 20px 20px 18px 20px;
    transition: all 0.25s ease;
    text-align: left;
    overflow: hidden;
}
.xr-node-card::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
}
.xr-node-card.counter::before { background: #4a9eff; }
.xr-node-card.timer::before   { background: #f472b6; }
.xr-node-card.flag::before    { background: #2dd4bf; }
.xr-node-card.and::before     { background: #fbbf24; }
.xr-node-card.or::before      { background: #fb923c; }
.xr-node-card.end::before     { background: #a78bfa; }
.xr-node-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(15,23,42,0.08);
    border-color: transparent;
}
.xr-node-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    color: #0b0d12;
}
.xr-node-icon svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.xr-node-icon.counter { background: rgba(74,158,255,0.15);  color: #2563eb; }
.xr-node-icon.timer   { background: rgba(244,114,182,0.15); color: #be185d; }
.xr-node-icon.flag    { background: rgba(45,212,191,0.15);  color: #0f766e; }
.xr-node-icon.and     { background: rgba(251,191,36,0.18);  color: #92400e; }
.xr-node-icon.or      { background: rgba(251,146,60,0.15);  color: #c2410c; }
.xr-node-icon.end     { background: rgba(167,139,250,0.15); color: #6d28d9; }
.xr-node-name {
    font-family: "Merriweather Sans", "Helvetica", Arial, sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
}
.xr-node-desc {
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 14px;
}
.xr-node-role {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 5px;
    letter-spacing: 0.3px;
}
.xr-node-role.leaf   { background: rgba(45,212,191,0.1); color: #0f766e; }
.xr-node-role.middle { background: rgba(251,191,36,0.15); color: #92400e; }
.xr-node-role.root   { background: rgba(167,139,250,0.12); color: #6d28d9; }

/* Node hierarchy hint diagram */
.xr-node-tree-hint {
    text-align: center;
    margin: 0 0 18px 0;
    padding: 18px 0 4px 0;
}
.xr-node-tree-hint svg { max-width: 220px; opacity: 0.7; }

/* --- Architecture diagram (3-layer stack) --- */
.xr-arch-diagram {
    background: #f8fafc;
    border-radius: 8px;
    padding: 40px 30px;
    margin: 2rem 0;
    text-align: center;
}
.xr-arch-layer {
    max-width: 520px;
    margin: 0 auto;
    background: #fff;
    border: 2px solid #e0e6ed;
    border-radius: 10px;
    padding: 20px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
}
.xr-arch-layer.editor { border-color: #4a9eff; }
.xr-arch-layer.importer { border-color: #fbbf24; }
.xr-arch-layer.runtime { border-color: #a78bfa; }
.xr-arch-layer-name {
    font-family: "Merriweather Sans", "Helvetica", Arial, sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #333;
}
.xr-arch-layer-desc {
    font-size: 13px;
    color: #888;
    margin-top: 2px;
}
.xr-arch-layer-tag {
    font-size: 11px;
    font-family: "Merriweather Sans", "Helvetica", Arial, sans-serif;
    color: #999;
    letter-spacing: 0.5px;
    font-weight: 600;
    white-space: nowrap;
}
.xr-arch-arrow {
    font-size: 18px;
    color: #51cbce;
    padding: 6px 0;
}

/* --- Premium 3-layer architecture diagram --- */
.xr-arch-wrap {
    width: 100%;
    margin: 0;
    padding: 30px 20px;
    background: #f8fafc;
    border-radius: 0;
    text-align: center;
}
.xr-arch-title {
    font-family: "Merriweather Sans", "Helvetica", Arial, sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 28px;
    letter-spacing: -0.3px;
}
.xr-arch-title span { color: #51cbce; }
.xr-arch-title small {
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    margin-left: 4px;
}
.xr-arch-card {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 22px 26px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow:
      0 1px 2px rgba(15,23,42,0.04),
      0 8px 24px rgba(15,23,42,0.06);
    border: 1px solid #e2e8f0;
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.xr-arch-card:hover {
    transform: translateY(-2px);
    box-shadow:
      0 2px 4px rgba(15,23,42,0.05),
      0 14px 36px rgba(15,23,42,0.08);
}
.xr-arch-card::before {
    content: "";
    position: absolute;
    left: 0; top: 16px; bottom: 16px;
    width: 4px;
    border-radius: 0 4px 4px 0;
}
.xr-arch-card.editor::before   { background: #4a9eff; }
.xr-arch-card.importer::before { background: #f59e0b; }
.xr-arch-card.runtime::before  { background: #a78bfa; }

.xr-arch-icon {
    flex-shrink: 0;
    width: 52px; height: 52px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
}
.xr-arch-icon.editor   { background: linear-gradient(135deg, rgba(74,158,255,0.15), rgba(74,158,255,0.05)); color: #4a9eff; }
.xr-arch-icon.importer { background: linear-gradient(135deg, rgba(245,158,11,0.15), rgba(245,158,11,0.05)); color: #f59e0b; }
.xr-arch-icon.runtime  { background: linear-gradient(135deg, rgba(167,139,250,0.15), rgba(167,139,250,0.05)); color: #a78bfa; }

.xr-arch-text { flex: 1; }
.xr-arch-name {
    font-family: "Merriweather Sans", "Helvetica", Arial, sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}
.xr-arch-desc {
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.55;
}
.xr-arch-desc code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    color: #475569;
    font-family: Menlo, Consolas, "Courier New", monospace;
}
.xr-arch-tag {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.xr-arch-tag.editor   { background: rgba(74,158,255,0.1);  color: #4a9eff; }
.xr-arch-tag.importer { background: rgba(245,158,11,0.1);  color: #f59e0b; }
.xr-arch-tag.runtime  { background: rgba(167,139,250,0.1); color: #a78bfa; }

.xr-arch-connector {
    height: 50px;
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
.xr-arch-connector::before {
    content: "";
    position: absolute;
    width: 2px; height: 100%;
    background: #51cbce;
    opacity: 0.55;
    border-radius: 2px;
}
.xr-arch-connector::after {
    content: "";
    position: absolute;
    bottom: -1px;
    width: 0; height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 7px solid #51cbce;
}
.xr-arch-dot {
    position: relative; z-index: 1;
    width: 9px; height: 9px;
    background: #51cbce;
    border-radius: 50%;
    box-shadow:
      0 0 0 4px rgba(81,203,206,0.15),
      0 0 12px rgba(81,203,206,0.55);
    animation: xr-arch-pulse 2.2s ease-in-out infinite;
}
@keyframes xr-arch-pulse {
    0%, 100% { transform: scale(1);   box-shadow: 0 0 0 4px rgba(81,203,206,0.15), 0 0 12px rgba(81,203,206,0.55); }
    50%      { transform: scale(1.2); box-shadow: 0 0 0 7px rgba(81,203,206,0.08), 0 0 20px rgba(81,203,206,0.75); }
}

.xr-arch-caption {
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 20px;
}

/* --- Code block --- */
.xr-code-block {
    background: #333333;
    border-radius: 0;
    padding: 0;
    margin: 1.8rem 0;
    overflow: hidden;
}
.xr-code-block pre {
    margin: 0;
    padding: 22px 24px;
    overflow-x: auto;
    font-family: Menlo, Consolas, "Courier New", "JetBrains Mono", monospace;
    font-size: 13px;
    line-height: 1.75;
    color: #e2e8f0;
    -webkit-overflow-scrolling: touch;
}
.xr-code-block pre code {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    white-space: pre;
    display: block;
}
/* Syntax highlighting (C# style) */
.xr-code-block .xr-cm { color: #666666; font-style: italic; }   /* comment */
.xr-code-block .xr-kw { color: #c084fc; }                       /* keyword var/using */
.xr-code-block .xr-st { color: #86efac; }                       /* string */
.xr-code-block .xr-fn { color: #7dd3fc; }                       /* function */
.xr-code-block .xr-tp { color: #fbbf24; }                       /* type */
.xr-code-block .xr-nu { color: #fca5a5; }                       /* number */

/* --- Metrics / highlights (4 columns) --- */
.xr-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 2rem 0;
}
.xr-metric {
    background: #f8fafc;
    border-radius: 0;
    padding: 24px 16px;
    text-align: center;
    border-bottom: 3px solid #51cbce;
}
.xr-metric-num {
    font-family: "Merriweather Sans", "Helvetica", Arial, sans-serif;
    font-size: 36px;
    font-weight: 800;
    color: #51cbce;
    line-height: 1;
    margin-bottom: 8px;
}
.xr-metric-label {
    font-size: 13px;
    color: #666;
    font-family: "Merriweather Sans", "Helvetica", Arial, sans-serif;
}

/* --- CTA button area --- */
.xr-cta-box {
    background: linear-gradient(135deg, #f0faf9, #e8f4fd);
    border-radius: 0;
    padding: 40px 32px;
    text-align: center;
    margin: 3rem 0 2rem 0;
}
.xr-cta-box h3 {
    font-family: "Merriweather Sans", "Helvetica", Arial, sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
}
.xr-cta-box p {
    color: #666;
    margin-bottom: 24px;
    font-size: 15px;
}
.xr-cta-btn {
    display: inline-block;
    padding: 14px 32px;
    background: #51cbce;
    color: #fff !important;
    font-family: "Merriweather Sans", "Helvetica", Arial, sans-serif;
    font-weight: 700;
    font-size: 15px;
    border-radius: 0;
    text-decoration: none;
    transition: background 0.2s;
    margin: 0 6px;
}
.xr-cta-btn:hover {
    background: #2ba9cd;
    text-decoration: none;
}
.xr-cta-btn.secondary {
    background: transparent;
    color: #51cbce !important;
    border: 2px solid #51cbce;
    padding: 12px 30px;
}
.xr-cta-btn.secondary:hover {
    background: #51cbce;
    color: #fff !important;
}
.xr-coming-soon {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    background: #fbbf24;
    color: #1a1200;
    font-size: 10px;
    font-weight: 700;
    border-radius: 4px;
    vertical-align: middle;
    letter-spacing: 0.5px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .xr-node-grid { grid-template-columns: repeat(2, 1fr); }
    .xr-metrics { grid-template-columns: repeat(2, 1fr); }
    .xr-arch-layer { flex-direction: column; text-align: center; gap: 8px; }
    .xr-cta-btn { display: block; margin: 8px 0; }
    .xr-img-placeholder { padding: 40px 20px; }
}
@media (max-width: 600px) {
    .xr-arch-card { flex-direction: column; text-align: center; gap: 12px; }
    .xr-arch-tag { align-self: center; }
}
@media (max-width: 480px) {
    .xr-node-grid { grid-template-columns: 1fr; }
    .xr-metrics { grid-template-columns: 1fr; }
}
