/********************************************************
 * Design Tokens
 ********************************************************/
:root {
    --radius: 1.25rem;

    /* Primary brand color */
    --primary: #078BFF;
    --primary-rgb: 7, 139, 255;
}

/********************************************************
 * Base
 ********************************************************/
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

/********************************************************
 * Effects & Utilities
 ********************************************************/
.glass {
    backdrop-filter: blur(10px);
    background: rgba(12, 12, 12, 0.7);
}

.shadow-soft {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* Hero gradient: lớp 1 dùng primary, lớp 2 giữ nguyên màu hồng như cũ */
.hero-gradient {
    background:
        radial-gradient(1200px 600px at 50% -10%, rgba(var(--primary-rgb), .18), transparent 60%),
        radial-gradient(800px 400px at 80% 20%, rgba(236, 72, 153, .12), transparent 60%);
}

/* Entrance animation helpers */
.fade-up {
    opacity: 0;
    transform: translateY(12px);
    transition: all .6s ease;
}

.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Scroll helpers */
.snap-x {
    scroll-snap-type: x mandatory;
}

.snap-start {
    scroll-snap-align: start;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/********************************************************
 * Typography
 ********************************************************/
.prose a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.prose a:hover {
    text-decoration: underline;
}

.prose h2 {
    margin-top: 3.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 1.375rem;
    font-weight: 600;
    color: #f1f5f9;
}

.prose h2:first-child {
    border-top: none;
    margin-top: 2rem;
    padding-top: 0;
}

.prose h3 {
    letter-spacing: -0.01em;
}

.table-scroll-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-scroll-wrap table {
    min-width: 640px;
}

/********************************************************
 * Forms: Inputs & Selects
 ********************************************************/
.ip {
    background: rgba(24, 24, 27, .6);
    border: 1px solid rgba(63, 63, 70, .7);
    border-radius: var(--radius, 1rem);
    padding: .75rem .9rem;
    width: 100%;
    color: #e5e7eb;
    outline: none;
}

.ip:focus {
    border-color: rgba(var(--primary-rgb), .9);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .25);
}

.ip-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='none' stroke='%23a1a1aa' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'><path d='M19 9l-7 7-7-7'></path></svg>");
    background-repeat: no-repeat;
    background-position: right .9rem center;
    background-size: 1rem;
    padding-right: 2.75rem;
    cursor: pointer;
}

.ip-select::-ms-expand {
    display: none;
}

/********************************************************
 * Buttons
 ********************************************************/
.btn {
    border-radius: .9rem;
    padding: .8rem 1rem;
    font-weight: 600;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:disabled {
    opacity: .6;
    cursor: not-allowed;
}

/********************************************************
 * Helper Texts & Misc
 ********************************************************/
.hint {
    font-size: .85rem;
    opacity: .7;
}

.hp-wrap {
    position: absolute;
    left: -5000px;
    top: -5000px;
}

.counter {
    text-align: right;
    font-size: .85rem;
    opacity: .6;
    margin-top: .25rem;
}

/********************************************************
 * Validation
 ********************************************************/
.ip.error {
    border-color: rgba(239, 68, 68, .9);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, .25);
}

.err-msg {
    color: #fca5a5;
    font-size: .85rem;
    margin-top: .25rem;
    display: none;
}

.err-msg.show {
    display: block;
}

/********************************************************
 * Pixel Hero
 ********************************************************/
.pixel-showcase {
    position: relative;
    width: min(100%, 460px);
    margin: 12px auto 0;
    display: grid;
    place-items: center;
}

.pixel-showcase__halo {
    position: absolute;
    inset: 18% 18% 10%;
    background:
        radial-gradient(circle at 50% 35%, rgba(var(--primary-rgb), .2), transparent 30%),
        radial-gradient(circle at 52% 72%, rgba(244, 114, 182, .12), transparent 20%);
    filter: blur(54px);
    opacity: .95;
}

.pixel-hero-stage {
    position: relative;
    width: min(100%, 340px);
    aspect-ratio: 9 / 16;
    display: grid;
    place-items: center;
}

.pixel-hero-render {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center center;
}

@media (min-width: 1024px) {
    .pixel-showcase {
        width: min(100%, 520px);
    }

    .pixel-hero-stage {
        width: min(100%, 400px);
    }
}

@media (max-width: 767px) {
    .pixel-showcase {
        width: min(94vw, 430px);
        margin-top: 8px;
    }

    .pixel-hero-stage {
        width: min(100%, 320px);
    }
}

.prose p {
  margin-top: 1.1rem;
  margin-bottom: 1.1rem;
  line-height: 1.75;
}

.prose ul,
.prose ol {
  margin-top: 1.2rem;
  margin-bottom: 1.2rem;
  padding-left: 1.6rem;
}

.prose ul li,
.prose ol li {
  margin-bottom: 0.7rem;
}

.prose ul {
  list-style-type: disc;
}

.prose ol {
  list-style-type: decimal;
}

.prose ul ul,
.prose ol ol {
  margin-top: 0.6rem;
  margin-bottom: 0.6rem;
  list-style-type: circle;
}

.prose code {
  background: rgba(255, 255, 255, 0.06);
  padding: 0.15rem 0.4rem;
  border-radius: 0.4rem;
  font-size: 0.95em;
}

.prose .overflow-x-auto {
  padding: 0px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(20, 20, 22, 0.6);
  margin: 1.25rem 0 2rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}

.prose table {
  width: 100%;
  min-width: 640px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.95rem;
  line-height: 1.55;
}

.prose thead th {
  text-align: left;
  font-weight: 600;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  color: #f1f5f9;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  white-space: nowrap;
}

.prose tbody td {
  padding: 12px 14px;
  vertical-align: top;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.prose tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.prose table tr:first-child th:first-child,
.prose table tr:first-child td:first-child {
  border-top-left-radius: 10px;
}
.prose table tr:first-child th:last-child,
.prose table tr:first-child td:last-child {
  border-top-right-radius: 10px;
}
.prose table tr:last-child td:first-child {
  border-bottom-left-radius: 10px;
}
.prose table tr:last-child td:last-child {
  border-bottom-right-radius: 10px;
}

.prose table + * {
  margin-top: 1.25rem;
}

@media (max-width: 420px) {
  .prose table {
    font-size: 0.9rem;
  }
  .prose thead th,
  .prose tbody td {
    padding: 10px 12px;
  }
}
