/* ==========================================================================
   Glossary — modern prose & article styling
   deps: --orange, --background-70, --background-grey, --background-dark-grey,
         --background-black, --light-grey, --text-white-color, --text-black-color,
         --title-font
   ========================================================================== */

/* ----- Page/hero polish -------------------------------------------------- */
.glossary__tag {
    position: relative;
    isolation: isolate;
    border: 1px solid var(--orange);
    background:
        linear-gradient(180deg, rgba(255, 199, 0, 0.08), rgba(255, 199, 0, 0))
            padding-box,
        radial-gradient(
                180% 140% at 0% 120%,
                rgba(255, 199, 0, 0.25),
                transparent 70%
            )
            border-box;
    box-shadow: 0 8px 30px rgba(255, 199, 0, 0.12);
}
.glossary__tag-link {
    text-decoration: none;
    color: var(--text-white-color);
}

.glossary__title.title {
    background: linear-gradient(
        90deg,
        var(--text-white-color),
        rgba(255, 199, 0, 0.95)
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.01em;
}
.glossary__descr.title {
    color: var(--light-grey);
    max-width: 800px;
    margin-inline: auto;
}

/* game pill */
.glossary__game {
    backdrop-filter: saturate(140%) blur(4px);
    -webkit-backdrop-filter: saturate(140%) blur(4px);
    border: 1px solid var(--background-70);
    transition:
        border 0.25s,
        box-shadow 0.25s,
        transform 0.25s;
}
.glossary__game:hover {
    border-color: var(--orange);
    box-shadow: 0 8px 26px rgba(255, 199, 0, 0.12);
    transform: translateY(-1px);
}

/* ----- Prose core (text__editor + dynamic sections) ---------------------- */
.text__editor,
.glossary__body,
.glossary__text {
    font-size: clamp(16px, 1.05vw, 18px);
    line-height: 1.7;
    color: var(--text-white-color);
}

.text__editor p,
.glossary__text p {
    margin: 0 0 14px;
}

/* Lead paragraph (опционально: пометьте абзац классом .lead в админке) */
.text__editor .lead {
    font-size: 1.14em;
    color: var(--light-grey);
}

/* Headings inside editor/content */
.text__editor h2,
.text__editor h3,
.text__editor h4,
.glossary__text h2,
.glossary__text h3,
.glossary__text h4,
.text__editor h5,
.text__editor h6,
.glossary__text h5,
.glossary__text h6 {
    font-family: var(--title-font);
    font-weight: 700;
    letter-spacing: 0.005em;
    margin: 28px 0 12px;
    line-height: 1.25;
    color: var(--text-white-color);
    position: relative;
}
.text__editor h2,
.glossary__text h2 {
    font-size: clamp(22px, 1.6vw, 26px);
}
.text__editor h3,
.glossary__text h3 {
    font-size: clamp(19px, 1.4vw, 22px);
}
.text__editor h4,
.glossary__text h4 {
    font-size: clamp(18px, 1.2vw, 20px);
}

/* Accent underline */
.text__editor h2::after,
.glossary__text h2::after,
.text__editor h3::after,
.glossary__text h3::after {
    content: "";
    display: block;
    height: 2px;
    width: 64px;
    margin-top: 8px;
    background: linear-gradient(90deg, var(--orange), transparent);
    border-radius: 2px;
}

/* Links */
.text__editor a,
.glossary__text a {
    color: inherit;
    text-decoration: none;
    position: relative;
}
.text__editor a::after,
.glossary__text a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 1px;
    background: linear-gradient(90deg, var(--orange), rgba(255, 199, 0, 0));
    transform: scaleX(0.35);
    transform-origin: left;
    transition: transform 0.25s;
}
.text__editor a:hover::after,
.glossary__text a:hover::after {
    transform: scaleX(1);
}

/* Lists */
.text__editor ul,
.text__editor ol,
.glossary__text ul,
.glossary__text ol {
    margin: 14px 0 16px 0;
    padding-left: 24px;
}
.text__editor ul li,
.glossary__text ul li {
    margin: 6px 0;
    list-style: none;
    position: relative;
}
.text__editor ul li::before,
.glossary__text ul li::before {
    content: "";
    position: absolute;
    left: -18px;
    top: 0.65em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(
        circle at 30% 30%,
        var(--orange),
        rgba(255, 199, 0, 0.2)
    );
}
.text__editor ol li,
.glossary__text ol li {
    margin: 6px 0;
}

/* Blockquotes */
.text__editor blockquote,
.glossary__text blockquote {
    margin: 16px 0;
    padding: 14px 16px 14px 18px;
    border-left: 4px solid var(--orange);
    background: linear-gradient(
        180deg,
        rgba(255, 199, 0, 0.1),
        rgba(255, 199, 0, 0.02)
    );
    color: var(--light-grey);
    border-radius: 8px;
}

/* Inline emphasis */
.text__editor mark,
.glossary__text mark {
    background: linear-gradient(
        90deg,
        rgba(255, 199, 0, 0.25),
        rgba(255, 199, 0, 0.05)
    );
    color: inherit;
    padding: 0 0.2em;
    border-radius: 0.2em;
}
.text__editor code,
.glossary__text code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.95em;
    padding: 0.1em 0.35em;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--background-70);
}
.text__editor kbd,
.glossary__text kbd {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    padding: 0.12em 0.45em;
    border-radius: 6px;
    border: 1px solid var(--background-70);
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.06),
        rgba(255, 255, 255, 0.03)
    );
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.06);
}

/* HR / divider */
.text__editor hr,
.glossary__text hr {
    height: 1px;
    border: 0;
    margin: 26px 0;
    background: linear-gradient(
        90deg,
        transparent,
        var(--background-70),
        transparent
    );
}

/* Figures & images */
.text__editor figure,
.glossary__text figure {
    margin: 18px 0;
}
.text__editor img,
.glossary__text img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    border: 1px solid var(--background-70);
    background: var(--background-dark-grey);
}
.text__editor figcaption,
.glossary__text figcaption {
    font-size: 0.9em;
    color: var(--light-grey);
    margin-top: 8px;
    text-align: center;
}

/* Tables */
.text__editor table,
.glossary__text table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid var(--background-70);
    background: var(--background-dark-grey);
}
.text__editor thead th,
.glossary__text thead th {
    text-align: left;
    font-family: var(--title-font);
    font-weight: 700;
    padding: 12px 14px;
    background: rgba(255, 199, 0, 0.08);
}
.text__editor td,
.text__editor th,
.glossary__text td,
.glossary__text th {
    padding: 12px 14px;
    border-bottom: 1px solid var(--background-70);
}
.text__editor tbody tr:last-child td,
.glossary__text tbody tr:last-child td {
    border-bottom: 0;
}
.text__editor table::-webkit-scrollbar,
.glossary__text table::-webkit-scrollbar {
    height: 8px;
}
.text__editor table::-webkit-scrollbar-thumb,
.glossary__text table::-webkit-scrollbar-thumb {
    background: var(--orange);
}

/* Definition lists (если используете <dl>) */
.text__editor dl,
.glossary__text dl {
    margin: 16px 0;
}
.text__editor dt,
.glossary__text dt {
    font-family: var(--title-font);
    font-weight: 700;
    margin: 14px 0 6px;
    color: var(--text-white-color);
}
.text__editor dd,
.glossary__text dd {
    margin: 0 0 10px 0;
    color: var(--light-grey);
}

/* Callouts (можно вставлять в редактор как <div class="callout is-tip">...</div>) */
.callout {
    position: relative;
    padding: 14px 16px 14px 44px;
    border-radius: 14px;
    border: 1px solid var(--background-70);
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.06),
        rgba(255, 255, 255, 0.03)
    );
}
.callout::before {
    content: "💡";
    position: absolute;
    left: 12px;
    top: 12px;
    font-size: 18px;
}
.callout.is-info::before {
    content: "ℹ️";
}
.callout.is-warn::before {
    content: "⚠️";
}
.callout.is-danger::before {
    content: "⛔";
}
.callout.is-tip::before {
    content: "✨";
}
.callout strong {
    color: var(--text-white-color);
}

/* Small chips for inline terms (используйте <span class="chip">MMR</span>) */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid var(--background-70);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    font-family: var(--title-font);
    font-weight: 600;
    font-size: 15px;
    line-height: 1;
}

/* meta row */
.glossary__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 16px 0 24px;
}

/* базовый чип уже есть (.chip), добавим иконки/состояния */
.chip .icon {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    flex: 0 0 auto;
}
.chip--btn {
    cursor: pointer;
    user-select: none;
}
.chip--btn:hover {
    border-color: var(--orange);
    box-shadow: 0 4px 16px rgba(255, 199, 0, 0.12);
}

/* необязательно: стиль “успешно скопировано” */
.chip--ok {
    border-color: var(--orange);
    background: linear-gradient(
        180deg,
        rgba(255, 199, 0, 0.12),
        rgba(255, 199, 0, 0.04)
    );
}
/* ===== Secret Promo FX =================================================== */
@property --ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }

.secret.secret--fx{
  --ang: 0deg;
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    padding: 28px 28px 32px;
    border: 1px solid var(--background-70);
    background: linear-gradient(180deg, rgba(255, 255, 255, 1%), rgba(255, 255, 255, 0%)) padding-box, conic-gradient(from var(--ang), rgb(255 199 0 / 5%), rgba(255, 199, 0, 0) 20%, rgba(0, 229, 255, 5%) 50%, rgba(255, 199, 0, 0) 80%, rgba(255, 199, 0, 5%)) border-box;
    box-shadow: 0 18px 44px rgba(0, 0, 0, .35);
    animation: secret-rotate 10s linear infinite;
}
@keyframes secret-rotate { to { --ang: 360deg; } }

.secret__glow{
  position:absolute; inset:-30%;
  background:
    radial-gradient(40% 40% at 20% 20%, rgba(255,199,0,.25), transparent 60%),
    radial-gradient(50% 50% at 80% 70%, rgba(0,229,255,.18), transparent 65%);
  filter: blur(22px);
  opacity:.9; pointer-events:none; mix-blend-mode: screen;
}
.secret__shine{
  position:absolute; inset:0;
  background: linear-gradient(120deg, transparent 35%, rgba(255,255,255,.14) 50%, transparent 65%);
  transform: translateX(-100%);
  animation: secret-shine 6s ease-in-out infinite;
  pointer-events:none;
}
@keyframes secret-shine{
  0%,55% { transform: translateX(-110%); }
  70%    { transform: translateX(10%); }
  100%   { transform: translateX(110%); }
}
.secret__grid{
  position:absolute; inset:0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 24px 24px, 24px 24px;
  mask-image: radial-gradient(80% 80% at 50% 50%, #000 0%, transparent 80%);
  pointer-events:none;
}

/* Title / text polish */
.secret__title{ color: var(--orange); margin-bottom: 10px; }
.secret__descr{ color: var(--text-white-color); display:flex; align-items:center; gap:32px; flex-wrap:wrap; }

/* Promo chip */
.code-chip{
  display:inline-flex; align-items:center; gap:8px;
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--orange);
  background:
    linear-gradient(180deg, rgba(255,199,0,.14), rgba(255,199,0,.05));
  font-family: var(--title-font); font-weight: 700; letter-spacing:.02em;
  transition: transform .2s, box-shadow .2s, background .2s, border-color .2s;
}
.code-chip .icon{
  width:18px; height:18px; stroke: currentColor; fill: none; stroke-width:2;
}
.code-chip .icon--tail{ margin-left: 2px; }
.code-chip:active{ transform: translateY(0) scale(.98); }

/* success state */
.code-chip.is-ok{
  background: linear-gradient(180deg, rgba(46,255,167,.18), rgba(46,255,167,.06));
  border-color: rgba(46,255,167,.8);
}

.secret__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.secret__text {
  flex: 1 1 auto;
  min-width: 260px;
}

.secret__image {
  flex: 0 0 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.secret__image img {
  max-width: 350px;
    top: -60px;
    height: auto;
    display: block;
    position: absolute;
    right: -10px;
}
@media (max-width: 47.99875em) {
  .secret__content {
    flex-direction: column;
    align-items: flex-start;
  }
  .secret__image {
    margin-top: 20px;
    flex: 0 0 auto;
    width: 100%;
    display: none;
    justify-content: center;
  }
  .secret__image img {
    max-width: 240px;
  }
}

.secret.secret--fx {
  overflow: hidden; /* залишається, ефекти обрізаються */
}

/* click burst */
.secret__burst{
  position:absolute; pointer-events:none; inset:0; display:none;
}
.secret--fx.burst .secret__burst{
  display:block;
  --bx: 50%; --by: 50%;
  background:
    radial-gradient(closest-side, rgba(255,199,0,.28), transparent 70%) no-repeat;
  background-position: var(--bx) var(--by);
  background-size: 0 0;
  animation: secret-burst 650ms ease-out forwards;
}
@keyframes secret-burst{
  0%   { background-size: 0 0; opacity: .9; }
  100% { background-size: 260px 260px; opacity: 0; }
}

/* mobile adjustments */
@media (max-width: 47.99875em){
  .secret.secret--fx{ padding: 22px; border-radius: 20px; }
  .code-chip{ padding: 8px 12px; }
}

/* ----- Secret card polish ----------------------------------------------- */
.secret {
    position: relative;
    border: 1px solid var(--background-70);
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.06),
            rgba(255, 255, 255, 0.03)
        ),
        radial-gradient(
            180% 120% at 10% 10%,
            rgba(255, 199, 0, 0.18),
            rgba(255, 199, 0, 0) 70%
        );
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
}
.secret__title {
    color: var(--orange);
}
.secret__descr {
    color: var(--text-white-color);
}

/* ----- Smooth reveal ----------------------------------------------------- */
.glossary__article {
    animation: gsr-rise 0.45s ease-out both;
}
@keyframes gsr-rise {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* ----- Mobile tweaks ----------------------------------------------------- */
@media (max-width: 47.99875em) {
    .glossary__title.title {
        font-size: 44px;
    }
    .text__editor,
    .glossary__body,
    .glossary__text {
        font-size: 16.5px;
    }
}
