/* Glas des Handels – ergänzt style.css (Aufbau wie metin2alerts.com) */
.gl svg, .gl-top svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
main.gl { max-width: 1520px; margin: 0 auto; padding: 0 16px 48px; }

/* ---------- Kopfzeile: Serverwahl + Zähler ---------- */
.gl-top { display: flex; align-items: center; gap: 14px; margin-left: 18px; min-width: 0; }
.gl-srv .gl-ddb { width: 178px; height: 40px; border-radius: 10px; }
.gl-srv .gl-ddp { width: 214px; }
.gl-count { display: flex; align-items: center; gap: 6px; padding-left: 14px; border-left: 1px solid var(--line); font-size: 13px; color: var(--dim); white-space: nowrap; }
.gl-count svg { color: var(--gold); width: 15px; height: 15px; }
.gl-count b { color: var(--head); font-weight: 600; }
.gl-count em { display: inline-flex; align-items: center; gap: 5px; margin-left: 6px; padding: 2px 7px; border-radius: 4px; font-style: normal; font-size: 11px;
  background: rgba(255,255,255,.05); color: var(--dim); }
.gl-count em i { width: 5px; height: 5px; border-radius: 50%; background: var(--dim-2); }
@media (max-width: 1100px) { .gl-count { display: none !important; } }
@media (max-width: 640px) { .gl-top { margin-left: 6px; } .gl-srv .gl-ddb { width: 140px; height: 34px; } }

/* ---------- Aufklappmenüs ---------- */
.gl-dd { position: relative; }
.gl-ddb { display: flex; align-items: center; gap: 8px; width: 100%; height: 40px; padding: 0 10px 0 12px; border: 1px solid var(--line-2); border-radius: 6px;
  background: rgba(255,255,255,.02); color: var(--head); font: 600 13px var(--font); cursor: pointer; text-align: left; }
.gl-ddb:hover { border-color: var(--dim-2); }
.gl-ddb > svg:first-child { color: var(--gold); }
.gl-ddb .lab { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gl-ddb .ud, .gl-ddb .dn { color: var(--dim); width: 14px; height: 14px; }
.gl-ddb .clr { display: inline-flex; color: var(--dim); font-style: normal; }
.gl-ddb .clr:hover { color: var(--head); }
.gl-ddb .clr svg { width: 14px; height: 14px; }
.gl-ddp { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; min-width: 100%; padding: 4px; border: 1px solid var(--line-2); border-radius: 8px;
  background: #2a2927; box-shadow: 0 12px 32px rgba(0,0,0,.45); }
.gl-dds { display: flex; align-items: center; gap: 8px; padding: 6px 8px 8px; border-bottom: 1px solid var(--line); margin: -4px -4px 4px; color: var(--dim); }
.gl-dds input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: 13px var(--font); }
.gl-ddl { max-height: 320px; overflow-y: auto; scrollbar-width: thin; }
.gl-ddl button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 10px; border: 0; border-radius: 6px; background: none; color: var(--text);
  font: 13px var(--font); text-align: left; cursor: pointer; white-space: nowrap; }
.gl-ddl button.ind { padding-left: 30px; font-size: 12.5px; }
.gl-ddl button:hover { background: rgba(255,255,255,.05); color: var(--head); }
.gl-ddl button.on { background: #1d1c1b; color: var(--head); }
.gl-ddl button.dis { opacity: .35; cursor: not-allowed; }
.gl-ddl button.dis:hover { background: none; color: var(--text); }
.gl-ddl button span { flex: 1; }
.gl-ddl .ck { width: 14px; height: 14px; }
.gl-sort .gl-ddb { width: 132px; font-weight: 500; color: var(--text); }
.gl-sort .gl-ddp { left: auto; right: 0; width: 188px; }

/* ---------- Startbild ---------- */
.gl-land { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 78px 0 60px;
  background: radial-gradient(ellipse 40% 30% at 50% 38%, rgba(235,179,92,.07), transparent 70%); }
.gl-badge { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px; border: 1px solid rgba(235,179,92,.35); border-radius: 999px;
  background: rgba(235,179,92,.06); color: var(--gold); font: 600 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.gl-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green); }
.gl-title { display: flex; align-items: center; gap: 14px; margin: 40px 0 18px; font-size: clamp(32px, 5vw, 44px); font-weight: 700; color: var(--head); letter-spacing: -.01em; }
.gl-title span { color: var(--gold); }
.gl .gl-title svg { width: 36px; height: 36px; color: var(--gold); stroke-width: 1.6; }
.gl-sub { max-width: 440px; margin: 0; font-size: 16px; line-height: 1.75; color: var(--dim); }
.gl-hi { margin: 10px 0 46px; font-size: 16px; font-weight: 600; color: var(--gold); }
.gl-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 244px)); gap: 12px; text-align: left; }
.gl-card { display: flex; flex-direction: column; gap: 4px; min-height: 108px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.015); }
.gl-card .ic { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin-bottom: 8px; border-radius: 7px; }
.gl-card .ic svg { width: 15px; height: 15px; }
.ic.green { color: #3fbf6a; background: rgba(63,191,106,.15); } .ic.blue { color: var(--blue); background: rgba(79,141,240,.15); }
.ic.gold { color: var(--gold); background: rgba(235,179,92,.15); } .ic.pink { color: #f06a9a; background: rgba(240,106,154,.15); }
.gl-card b { font-size: 13px; color: var(--head); }
.gl-card span { font-size: 11.5px; line-height: 1.45; color: var(--dim); }
@media (max-width: 560px) { .gl-cards { grid-template-columns: 1fr; width: 100%; } .gl-land { padding-top: 48px; } }

/* ---------- Marktplatz ---------- */
.gl-market { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; padding-top: 28px; }
.gl-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.gl-side #catsel .gl-ddb { height: 40px; }
.gl-input { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 6px; color: var(--dim); background: rgba(255,255,255,.02); }
.gl-input:focus-within { border-color: var(--gold-line); }
.gl-input input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text); font: 13px var(--font); }

.gl-eq { border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.02); }
.gl-eqh { display: flex; align-items: center; gap: 8px; width: 100%; padding: 12px; border: 0; background: none; color: var(--head); font: 600 13px var(--font); cursor: pointer; }
.gl-eqh b { flex: 1; text-align: left; }
.gl-eqh .dn { color: var(--dim); transition: transform .15s; }
.gl-eq.closed .gl-eqh .dn { transform: rotate(-90deg); }
.gl-eq.closed .gl-eqb { display: none; }
.gl-eqb { padding: 0 12px 12px; }
.gl-eqb h4 { margin: 12px 0 6px; font-size: 11px; font-weight: 600; color: var(--dim); }
.gl-tg { display: grid; gap: 6px; }
.gl-tg.cols-1 { grid-template-columns: 1fr; } .gl-tg.cols-2 { grid-template-columns: 1fr 1fr; } .gl-tg.cols-4 { grid-template-columns: repeat(4, 1fr); }
.gl-tg button { height: 30px; border: 1px solid var(--line-2); border-radius: 4px; background: rgba(255,255,255,.04); color: var(--text); font: 600 11.5px var(--font); cursor: pointer; }
.gl-tg.sm button { height: 26px; font-weight: 500; }
.gl-tg button:hover { border-color: var(--dim-2); color: var(--head); }
.gl-tg button.on { border-color: var(--gold-line); background: rgba(235,179,92,.14); color: var(--gold); }
.gl-range2 { display: flex; align-items: center; gap: 6px; }
.gl-range2 span { color: var(--dim); }
.gl-range2 input, .gl-el input { width: 100%; min-width: 0; height: 30px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: 4px; background: #1f1e1d;
  color: var(--head); font: 12.5px var(--font); }
.gl-el { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.gl-el button { position: relative; aspect-ratio: 1; max-height: 40px; border: 1px solid var(--line-2); border-radius: 5px; background: #1f1e1d; cursor: pointer; }
.gl-el button i { position: absolute; inset: 7px; border-radius: 50%; background: radial-gradient(circle, color-mix(in oklab, var(--c) 70%, white) 0 18%, var(--c) 40%, color-mix(in oklab, var(--c) 40%, black) 75%);
  box-shadow: 0 0 8px color-mix(in oklab, var(--c) 60%, transparent); opacity: .75; }
.gl-el button.on { border-color: var(--c); } .gl-el button.on i { opacity: 1; }
.gl-el input { grid-column: span 2; height: 100%; }
.gl-cb { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 11.5px; font-weight: 600; color: var(--text); cursor: pointer; }
.gl-cb input { width: 15px; height: 15px; margin: 0; accent-color: var(--gold); }

.gl-bonus { margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.gl-bonus h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; color: var(--head); }
.gl-bonus h3 svg { color: var(--gold); }
#bonus-chips { display: flex; flex-wrap: wrap; gap: 6px; }
#bonus-chips:empty { display: none; }
#bonus-chips button { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border: 1px solid rgba(79,141,240,.4); border-radius: 4px;
  background: rgba(79,141,240,.12); color: #9cc0ff; font: 11.5px var(--font); cursor: pointer; }
#bonus-chips svg { width: 12px; height: 12px; }

.gl-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.gl-head h1 { margin: 0; font-size: 24px; color: var(--head); }
.gl-head p { margin: 4px 0 0; font-size: 15px; color: var(--dim); }
.gl-tools { display: flex; align-items: center; gap: 10px; }
.gl-ibtn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--line-2); border-radius: 6px;
  background: rgba(255,255,255,.03); color: var(--text); cursor: pointer; }
.gl-ibtn:hover { color: var(--head); border-color: var(--dim-2); }
.gl-ibtn.on { color: var(--gold); background: rgba(235,179,92,.12); border-color: var(--gold-line); }
.gl-ibtn .scroll { color: #e8a25c; }
.gl-seg { display: inline-flex; gap: 2px; }
.gl-seg .gl-ibtn { border-color: transparent; background: none; }
.gl-seg .gl-ibtn.on { background: rgba(235,179,92,.12); border-color: transparent; }

.gl-chipwrap { position: relative; display: flex; align-items: center; gap: 8px; margin: 26px 0 0; }
.gl-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.gl-chips::-webkit-scrollbar { display: none; }
.gl-chips button { display: inline-flex; align-items: center; gap: 8px; flex: none; height: 38px; padding: 0 16px; border: 1px solid transparent; border-radius: 999px;
  background: rgba(255,255,255,.04); color: var(--text); font: 500 14px var(--font); cursor: pointer; }
.gl-chips button > svg:first-child { color: var(--c); }
.gl-chips button .lock { width: 13px; height: 13px; color: var(--gold); }
.gl-chips button:hover { background: rgba(255,255,255,.07); color: var(--head); }
.gl-chips button.on { background: var(--gold); color: #1d1c1b; font-weight: 600; }
.gl-chips button.on svg { color: #1d1c1b; }
.gl-more { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border: 1px solid var(--line-2); border-radius: 50%;
  background: none; color: var(--text); cursor: pointer; }
.gl-more svg { width: 13px; height: 13px; }
.gl-subchips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.gl-subchips button { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border: 1px solid color-mix(in oklab, var(--c) 35%, transparent);
  border-radius: 4px; background: color-mix(in oklab, var(--c) 7%, transparent); color: var(--c); font: 500 14px var(--font); cursor: pointer; }
.gl-subchips button.on { border-color: var(--c); background: color-mix(in oklab, var(--c) 16%, transparent); }
.gl-subchips button svg { width: 13px; height: 13px; }

.gl-trend { margin-top: 30px; padding: 14px 16px 16px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.015); }
.gl-trend-h { display: flex; justify-content: space-between; align-items: center; }
.gl-trend-h b { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--head); }
.gl-trend-h b svg { color: var(--gold); width: 14px; height: 14px; }
.gl-range { display: flex; gap: 2px; }
.gl-range button { padding: 3px 9px; border: 0; border-radius: 4px; background: none; color: var(--dim); font: 500 11px var(--font); cursor: pointer; }
.gl-range button.on { background: var(--gold); color: #1d1c1b; font-weight: 600; }
.gl-stats { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 10px; }
.gl-stats div { display: grid; grid-template-columns: auto 1fr; column-gap: 6px; align-items: center; padding: 5px 10px; border-radius: 4px; background: rgba(255,255,255,.04); }
.gl-stats i { grid-row: span 2; width: 5px; height: 5px; border-radius: 50%; background: var(--c); }
.gl-stats span { font-size: 9.5px; color: var(--text); }
.gl-stats b { font-size: 14px; color: var(--head); }
.gl-chart { display: flex; align-items: center; justify-content: center; height: 200px; border-radius: 6px; color: var(--dim); font-size: 13px;
  background: repeating-linear-gradient(to bottom, transparent 0 49px, rgba(255,255,255,.04) 49px 50px); }
.gl-chart.has { display: block; background: none; }
.gl-chart svg { display: block; width: 100%; height: 200px; overflow: visible; }
.gl-chart text { fill: var(--dim); font: 9px var(--font); }
.gl-stats b.won { color: #4fd0f0; }
.gl-stats b em { margin-left: 4px; font: 600 8.5px var(--font); font-style: normal; }
.gl-stats b em.up { color: var(--green); } .gl-stats b em.dn { color: #e5484d; }
.gl-stats b small { font-size: 10px; font-weight: 400; color: var(--dim); }

.gl-table { margin-top: 18px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.gl-thead { display: grid; grid-template-columns: minmax(0, 1fr) 110px 90px 90px 170px; align-items: center; height: 40px; padding: 0 16px;
  background: rgba(0,0,0,.18); border-bottom: 1px solid var(--line); font-size: 13.5px; font-weight: 500; color: var(--text); text-align: center; }
.gl-thead .coin { color: var(--gold); } .gl-thead .won { color: #e8a25c; }
.gl-table.grid .gl-thead { display: none; }
.gl-empty { padding: 56px 16px; text-align: center; color: var(--dim); font-size: 13px; }

@media (max-width: 900px) {
  .gl-market { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .gl-tools { flex-wrap: wrap; }
  .gl-thead { grid-template-columns: minmax(0, 1fr) 70px 60px 60px 100px; font-size: 12px; padding: 0 10px; }
}

/* Angebotszeile + Item-Tooltip (Metin2-Stil) – greift, sobald echte Angebote kommen */
.gl-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) 110px 90px 90px 170px; align-items: center; min-height: 96px; padding: 10px 16px;
  border-bottom: 1px solid var(--line); }
.r-ic { position: relative; display: flex; justify-content: center; }
.r-ic img { width: 32px; height: 32px; image-rendering: pixelated; }
.r-ic .gl-tip { display: none; }
.r-ic:hover .gl-tip, .r-ic:focus .gl-tip { display: flex; }
.gl-tip { position: absolute; z-index: 50; left: 34px; top: -6px; flex-direction: column; align-items: center; gap: 2px; min-width: 190px; padding: 10px 14px;
  background: rgba(8,8,8,.94); border: 1px solid #5a5040; font: 12px Tahoma, Verdana, sans-serif; color: #f0f0f0; text-align: center; white-space: nowrap; }
.t-name { color: #f2c94c; font-weight: 600; margin-bottom: 2px; } .t-sung { color: #8fa8ff; }
.t-time { color: #f2e14c; font-weight: 700; } .t-sale { margin-top: 10px; color: #f2e14c; font-weight: 700; }
.t-won { color: #4fd0f0; } .t-yang { color: #f2c94c; }
.r-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.r-top b { color: var(--gold); font-size: 14px; }
.r-age { padding: 1px 5px; border-radius: 3px; background: rgba(255,255,255,.06); color: var(--dim); font-size: 10px; }
.r-age.new { background: rgba(63,191,106,.2); color: #5fe08a; }
.r-sung { padding: 2px 6px; border: 1px solid #3c3a8a; border-radius: 3px; background: #23214f; color: #c9c6ff; font-size: 10px; }
.r-time { margin-top: 4px; color: #f2c94c; font-size: 12px; font-weight: 600; }
.r-boni { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.r-boni span { padding: 3px 8px; border-radius: 3px; background: #7a1fc9; color: #fff; font-size: 12px; font-weight: 500; }
.r-qty { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.r-qty b { padding: 2px 8px; border-radius: 3px; background: rgba(0,0,0,.3); color: var(--head); font-size: 13px; }
.r-qty small { color: var(--dim); font-size: 10px; } .r-qty em { color: #5fe08a; font-style: normal; }
.r-yang { text-align: center; color: #ff7a2f; font-weight: 700; font-size: 14px; }
.r-won { text-align: center; color: #4fd0f0; font-weight: 700; font-size: 14px; }   /* Won türkis wie im Original (Tooltip „2 Won“, Stückpreis „17.5W“) */
.r-yang.zero, .r-won.zero { color: var(--dim-2); font-weight: 400; }
.r-seller { text-align: right; color: var(--text); font-size: 12px; }
.gl-tg.cols-3 { grid-template-columns: repeat(3, 1fr); }
.gl-tg.chips { display: flex; flex-wrap: wrap; }
.gl-tg.chips button { padding: 0 8px; min-width: 26px; height: 26px; font-size: 10.5px; }
.gl-tg.ds button { height: 32px; position: relative; }
.gl-tg.ds button i { position: absolute; inset: 6px calc(50% - 10px); border-radius: 50%;
  background: radial-gradient(circle, #fff3 0 15%, var(--c) 40%, #0008 80%); box-shadow: 0 0 6px var(--c); }
.gl-eqb h4.cnt { display: flex; justify-content: space-between; } .gl-eqb h4.cnt span { font-weight: 400; font-size: 10px; color: var(--dim-2); }
.gl-subchips button.plain { color: var(--text); border-color: var(--line-2); background: rgba(255,255,255,.03); }
.gl-subchips button.plain.on { color: var(--gold); border-color: var(--gold-line); background: rgba(235,179,92,.12); }
.gl-thead { grid-template-columns: 70px minmax(0, 1fr) 110px 90px 90px 170px; }
.gl-thead > span:first-child { grid-column: span 2; }

/* Ansichten umschalten: hidden muss display überstimmen */
.gl [hidden] { display: none !important; }
.gl-title .gl-tt span { color: var(--gold); }
/* Kopf wie im Original-Handelsglas: keine globale Suche, kein eigener Link */
.top .search, nav.main > a.on { display: none !important; }
.gl-count[hidden] { display: none !important; }
.gl-qclr { display: inline-flex; padding: 0; border: 0; background: none; color: var(--dim); cursor: pointer; }
.gl-qclr:hover { color: var(--head); }
/* Alchemie-Klassen: Spiel-Icons von m2icondb (public/ma/icons/ds/), gewählte Klasse goldgelb wie im Original */
.gl-tg.ds button { display: flex; align-items: center; justify-content: center; }
.gl-tg.ds button img { image-rendering: pixelated; }
.gl-tg.ds button.on { background: var(--gold); border-color: var(--gold); }
/* Element-Knöpfe mit Spiel-Icons statt Farbkreisen */
.gl-el button { display: flex; align-items: center; justify-content: center; padding: 0; }
.gl-el button img { width: 30px; height: 30px; image-rendering: pixelated; opacity: .8; }
.gl-el button:hover img, .gl-el button.on img { opacity: 1; }
.gl-el button.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.gl-el button { padding: 2px; max-height: 44px; }
.gl-el button img { width: 100%; height: 100%; max-width: 40px; max-height: 40px; }
.gl-thead img.coin { image-rendering: pixelated; vertical-align: middle; }

/* Preis/Won-Filter oben */
/* Preis-/Won-Filter in der Seitenleiste */
.gl-price { display: flex; flex-direction: column; gap: 8px; }
.gl-pf { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--dim); }
.gl-pf em { font-style: normal; font-weight: 600; color: var(--text); min-width: 32px; }
.gl-pf-won em { color: #4fd0f0; }
.gl-pf i { font-style: normal; color: var(--dim-2); }
.gl-pf input { flex: 1; min-width: 0; height: 32px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: 6px;
  background: rgba(255,255,255,.03); color: var(--text); font: 13px var(--font); }
.gl-pf input::placeholder { color: var(--dim-2); }
.gl-pf input:focus { outline: none; border-color: #b07af0; }
/* Fußzeilen-Zähler */
.foot-items { margin-top: 4px; font-size: 12.5px; color: var(--dim); opacity: .85; }

/* Bonusfilter-Chips mit Min-Wert */
#bonus-chips { display: flex; flex-direction: column; gap: 6px; }
.bchip { display: flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border: 1px solid var(--line-2);
  border-radius: 6px; background: rgba(176,122,240,.08); font-size: 12.5px; color: var(--text); }
.bchip > span { flex: 1; min-width: 0; }
.bchip .bmin { width: 54px; height: 26px; padding: 0 6px; border: 1px solid var(--line-2); border-radius: 5px;
  background: rgba(255,255,255,.03); color: var(--text); font: 12.5px var(--font); }
.bchip .bmin::placeholder { color: var(--dim-2); }
.bchip .bmin:focus { outline: none; border-color: #b07af0; }
.bchip .brm { display: inline-flex; align-items: center; color: var(--dim); background: none; border: 0; cursor: pointer; padding: 2px; }
.bchip .brm:hover { color: var(--text); }
