html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: hidden;
    -ms-overflow-style: none;
    scrollbar-width: none;
    background: #082946;
    color: #ffffff;
    font-family: Arial, Helvetica, sans-serif;
}
html::-webkit-scrollbar, body::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}
body.detail-page {
    overflow-y: auto !important;
}
* { box-sizing: border-box; }
a { color: inherit; outline: none; }
img { border: 0; }

body {
    scrollbar-face-color: #174f7c;
    scrollbar-highlight-color: #2f7fb6;
    scrollbar-shadow-color: #061f34;
    scrollbar-3dlight-color: #061f34;
    scrollbar-arrow-color: #ffffff;
    scrollbar-track-color: #061f34;
    scrollbar-darkshadow-color: #061f34;
}

#page {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 6px 12px 6px 12px;
    background:
      radial-gradient(circle at 18% 0%, rgba(53,136,193,.16) 0, rgba(53,136,193,0) 260px),
      linear-gradient(180deg, #092d4c 0%, #082946 55%, #061f34 100%);
    box-sizing: border-box;
}

#links {
    width: 100%;
    padding: 6px 8px 2px 8px;
    margin: 0 0 6px 0;
    background: rgba(13,56,93,.50);
    border: 1px solid rgba(61,130,183,.28);
    border-radius: 4px;
}
#links a {
    float: left;
    display: block;
    padding: 6px 12px;
    margin: 0 6px 6px 0;
    color: #dcefff;
    text-decoration: none;
    font-size: 12px;
    line-height: 16px;
    border: 1px solid rgba(70,143,197,.55);
    background: rgba(9,39,65,.92);
    border-radius: 3px;
    font-weight: bold;
}
#links a:hover {
    background:#2f7fb6;
    border-color:#95d3ff;
    color:#ffffff;
}

.section {
    width: 100%;
    padding: 2px 0 4px 0;
}
.section-head {
    width: 100%;
    min-height: 24px;
    margin-bottom: 4px;
}
.section-head h2 {
    float: left;
    margin: 0;
    padding: 0;
    color: #ffffff;
    font-size: 15px;
    line-height: 24px;
    font-weight: 900;
    text-shadow: 0 1px 0 rgba(0,0,0,.45);
}
.arrows { float: right; }
.arrows a, .arrows span {
    float:left;
    display:block;
    width:24px;
    height:24px;
    line-height:22px;
    text-align:center;
    margin-left:4px;
    border:1px solid rgba(67,139,193,.7);
    background:rgba(9,39,65,.92);
    font-weight:bold;
    color:#dcefff;
    text-decoration:none;
    user-select:none;
    cursor:pointer;
    box-sizing:border-box;
    border-radius:2px;
}
.arrows a:hover { background:#2f7fb6; border-color:#95d3ff; }
.arrows .disabled { opacity:.35; cursor:default; pointer-events:none; }
.section.loading { opacity:.58; pointer-events:none; }

.cards {
    width: 100%;
}
.card {
    display: block;
    width: calc(50% - 6px);
    color: #ffffff;
    text-decoration: none;
    border: 1px solid rgba(75,145,196,.76);
    background: #102c46;
    overflow: hidden;
    margin-bottom: 6px;
    position: relative;
    min-height: 145px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.035), 0 6px 18px rgba(0,0,0,.12);
}
.card.left { float: left; }
.card.right { float: right; }
.card img {
    display: block;
    width: 100%;
    height: 145px;
    object-fit: cover;
    object-position: center;
    border: 0;
    transition: transform .25s ease;
}
.card:hover img {
    transform: scale(1.03);
}
.caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 6px 10px 8px 10px;
    min-height: 56px;
    background: linear-gradient(180deg, rgba(8,28,47,.05) 0%, rgba(7,31,52,.78) 18%, rgba(7,31,52,.94) 100%);
    transition: all .25s ease;
}
.caption span {
    display: block;
    margin-bottom: 3px;
    color: #9db8d3;
    font-size: 10px;
}
.caption strong {
    display: block;
    color: #ffffff;
    font-size: 13px;
    line-height: 1.25;
    text-shadow: 0 1px 0 rgba(0,0,0,.45);
}
.caption .excerpt {
    display: none;
    margin-top: 14px;
    color: #9fb4ca;
    font-size: 12px;
    line-height: 1.45;
    max-height: 92px;
    overflow: hidden;
}
.card:hover .caption {
    top: 0;
    bottom: 0;
    background: rgba(7,31,52,.72);
}
.card:hover .caption .excerpt {
    display: block;
}
.clear { clear: both; height: 0; overflow: hidden; }

.launcher-brand,
.launcher-visual {
    display: none !important;
}

@media (max-width: 980px) {
    #page { padding: 9px 12px 18px; }
    .card img { height: 190px; }
    .card { min-height: 190px; }
    .caption strong { font-size: 14px; }
}
@media (max-width: 700px) {
    .card { width: 100%; float: none !important; min-height: 180px; }
    .card img { height: 180px; }
    .section-head h2 { font-size: 17px; }
    .arrows { float:none !important; display:block; text-align:right; padding-top:6px; }
    .arrows a, .arrows span { float:none; display:inline-block; margin-left:5px; }
}
@media (max-width: 520px) {
    #links a { width: calc(50% - 7px); text-align:center; }
}
@media (max-width: 420px) {
    #page { padding: 8px 9px 18px; }
    #links a { width:100%; margin-right:0; }
    .card { min-height: 164px; }
    .card img { height: 164px; }
    .caption { padding: 8px 10px; }
    .caption strong { font-size: 14px; }
}


/* TR/EN Language Switch */
.dm-lang-switch.public-lang{float:right;display:inline-flex;align-items:center;gap:5px;border:1px solid rgba(70,143,197,.55);border-radius:3px;padding:6px 9px;background:rgba(9,39,65,.92);font-size:13px;font-weight:bold;color:#dcefff;margin:0 0 7px 7px}
.dm-lang-switch.public-lang a{color:#dcefff;text-decoration:none;opacity:.65;padding:2px 4px;border-radius:3px}
.dm-lang-switch.public-lang a.active{opacity:1;background:#2f7fb6;color:#fff}
.dm-lang-switch.public-lang span{opacity:.45}

/* =========================================================
   Launcher Modern Web Kart Tema: Otomatik Genişleyen Orantılı Yapı
   - .exe boyutu büyüdükçe veya küçüldükçe kartlar ve görseller
     pencereyle orantılı olarak otomatik genişler (otomatik görsel genişletme).
   - Hem IE11/Trident (WPF WebBrowser) hem de modern WebView2/tarayıcılarda
     hiçbir dikey veya yatay scrollbar oluşturmaz.
   - Detay sayfalarını etkilemez (.detail-page scroll yapılabilir kalır).
   ========================================================= */
html:has(body.launcher-embedded),
body.launcher-embedded {
    height: 100% !important;
    min-height: 0 !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}
html:has(body.launcher-embedded)::-webkit-scrollbar,
body.launcher-embedded::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

body.launcher-embedded:not(.theme-metin2_legacy_gold) #page {
    display: -ms-flexbox !important;
    display: flex !important;
    -ms-flex-direction: column !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 100vh !important;
    height: 100% !important;
    max-height: 100vh !important;
    overflow: hidden !important;
    padding: 6px 12px 6px 12px !important;
    box-sizing: border-box !important;
}

/* Link listesi boş ise gereksiz dikey alan kaplamasın. */
body.launcher-embedded:not(.theme-metin2_legacy_gold) #links:empty {
    display: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
}

body.launcher-embedded:not(.theme-metin2_legacy_gold) #links {
    -ms-flex: 0 0 auto !important;
    flex: 0 0 auto !important;
    padding: 4px 8px 1px 8px !important;
    margin: 0 0 6px !important;
    box-sizing: border-box !important;
}

body.launcher-embedded:not(.theme-metin2_legacy_gold) #links a {
    padding: 5px 10px !important;
    margin: 0 5px 3px 0 !important;
    font-size: 12px !important;
    line-height: 15px !important;
}

body.launcher-embedded:not(.theme-metin2_legacy_gold) .section {
    display: -ms-flexbox !important;
    display: flex !important;
    -ms-flex-direction: column !important;
    flex-direction: column !important;
    -ms-flex: 1 1 0px !important;
    flex: 1 1 0px !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 0 6px 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

body.launcher-embedded:not(.theme-metin2_legacy_gold).sections-count-2 .section {
    height: calc(50% - 24px) !important;
}

body.launcher-embedded:not(.theme-metin2_legacy_gold).sections-count-1 .section {
    height: calc(100% - 46px) !important;
}

body.launcher-embedded:not(.theme-metin2_legacy_gold).sections-count-3 .section {
    height: calc(33.333% - 18px) !important;
    margin-bottom: 4px !important;
}

body.launcher-embedded:not(.theme-metin2_legacy_gold) .section:last-of-type {
    margin-bottom: 0 !important;
}

body.launcher-embedded:not(.theme-metin2_legacy_gold) .section-head {
    -ms-flex: 0 0 auto !important;
    flex: 0 0 auto !important;
    min-height: 24px !important;
    height: 24px !important;
    margin-bottom: 4px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

body.launcher-embedded:not(.theme-metin2_legacy_gold) .section-head h2 {
    font-size: 15px !important;
    line-height: 24px !important;
}

body.launcher-embedded:not(.theme-metin2_legacy_gold) .arrows a,
body.launcher-embedded:not(.theme-metin2_legacy_gold) .arrows span {
    width: 24px !important;
    height: 24px !important;
    line-height: 22px !important;
    margin-left: 4px !important;
}

body.launcher-embedded:not(.theme-metin2_legacy_gold) .cards {
    -ms-flex: 1 1 0px !important;
    flex: 1 1 0px !important;
    display: -ms-flexbox !important;
    display: flex !important;
    height: calc(100% - 28px) !important;
    min-height: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

body.launcher-embedded:not(.theme-metin2_legacy_gold) .cards > .clear {
    display: none !important;
}

body.launcher-embedded:not(.theme-metin2_legacy_gold) .card {
    -ms-flex: 1 1 0px !important;
    flex: 1 1 0px !important;
    width: calc(50% - 6px) !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    margin: 0 !important;
    position: relative !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.035), 0 6px 18px rgba(0,0,0,.12) !important;
}

body.launcher-embedded:not(.theme-metin2_legacy_gold) .card.left {
    float: left !important;
    margin-right: 6px !important;
}

body.launcher-embedded:not(.theme-metin2_legacy_gold) .card.right {
    float: right !important;
    margin-left: 6px !important;
}

body.launcher-embedded:not(.theme-metin2_legacy_gold) .card img {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    transition: transform .25s ease !important;
}

body.launcher-embedded:not(.theme-metin2_legacy_gold) .card:hover img {
    transform: scale(1.03) !important;
}

body.launcher-embedded:not(.theme-metin2_legacy_gold) .caption {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    padding: 6px 10px 8px 10px !important;
    min-height: 48px !important;
    background: linear-gradient(180deg, rgba(8,28,47,.05) 0%, rgba(7,31,52,.82) 24%, rgba(7,31,52,.96) 100%) !important;
    box-sizing: border-box !important;
    transition: all .25s ease !important;
}

body.launcher-embedded:not(.theme-metin2_legacy_gold) .caption span {
    display: block !important;
    margin-bottom: 3px !important;
    font-size: 10px !important;
}

body.launcher-embedded:not(.theme-metin2_legacy_gold) .caption strong {
    display: block !important;
    font-size: 13px !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

body.launcher-embedded:not(.theme-metin2_legacy_gold) .card:hover .caption {
    top: 0 !important;
    bottom: 0 !important;
    background: rgba(7,31,52,.88) !important;
}

body.launcher-embedded:not(.theme-metin2_legacy_gold) .card:hover .caption strong {
    white-space: normal !important;
}

body.launcher-embedded:not(.theme-metin2_legacy_gold) .caption .excerpt {
    margin-top: 6px !important;
    font-size: 11px !important;
    line-height: 1.35 !important;
    max-height: calc(100% - 44px) !important;
    overflow: hidden !important;
}

/* Büyük veya genişletilmiş .exe penceresinde daha belirgin tipografi */
@media (min-width: 1200px) and (min-height: 600px) {
    body.launcher-embedded:not(.theme-metin2_legacy_gold) .section-head h2 {
        font-size: 17px !important;
    }
    body.launcher-embedded:not(.theme-metin2_legacy_gold) .caption strong {
        font-size: 14px !important;
    }
    body.launcher-embedded:not(.theme-metin2_legacy_gold) .caption .excerpt {
        font-size: 12px !important;
    }
}


/* Gameforge benzeri sabit kart kesimi: dar pencere kartlari OLCEKLEMEZ. */
body.theme-metin2_modern_web_cards .section,
body.launcher-embedded.theme-metin2_modern_web_cards .section {
    -ms-flex: 0 0 286px !important;
    flex: 0 0 286px !important;
    height: 286px !important;
    min-height: 286px !important;
    max-height: 286px !important;
    overflow: hidden !important;
}
body.theme-metin2_modern_web_cards .cards,
body.launcher-embedded.theme-metin2_modern_web_cards .cards {
    -ms-flex: 0 0 248px !important;
    flex: 0 0 248px !important;
    height: 248px !important;
    min-height: 248px !important;
    max-height: 248px !important;
    width: 100% !important;
    overflow: hidden !important;
}
body.theme-metin2_modern_web_cards .card,
body.launcher-embedded.theme-metin2_modern_web_cards .card {
    -ms-flex: 0 0 442px !important;
    flex: 0 0 442px !important;
    width: 442px !important;
    min-width: 442px !important;
    max-width: 442px !important;
    height: 248px !important;
    min-height: 248px !important;
    max-height: 248px !important;
    float: none !important;
}
body.theme-metin2_modern_web_cards .card img,
body.launcher-embedded.theme-metin2_modern_web_cards .card img {
    width: 442px !important;
    height: 248px !important;
    min-width: 442px !important;
    max-width: 442px !important;
    object-fit: cover !important;
}
body.theme-metin2_modern_web_cards.sections-count-1 .section,
body.theme-metin2_modern_web_cards.sections-count-2 .section,
body.theme-metin2_modern_web_cards.sections-count-3 .section,
body.launcher-embedded.theme-metin2_modern_web_cards.sections-count-1 .section,
body.launcher-embedded.theme-metin2_modern_web_cards.sections-count-2 .section,
body.launcher-embedded.theme-metin2_modern_web_cards.sections-count-3 .section {
    height: 286px !important;
}

/* v5 / Gameforge kart kesimi: SADECE modern launcher temasi. IE11 destekli. */
body.launcher-embedded.theme-metin2_modern_web_cards .cards {
    display: -ms-flexbox !important;
    display: flex !important;
    -ms-flex-wrap: nowrap !important;
    flex-wrap: nowrap !important;
    -ms-flex-pack: start !important;
    justify-content: flex-start !important;
    -ms-flex: none !important;
    flex: none !important;
    width: 100% !important;
    height: 248px !important;
    min-height: 248px !important;
    max-height: 248px !important;
    overflow: hidden !important;
}
body.launcher-embedded.theme-metin2_modern_web_cards .cards > .card,
body.launcher-embedded.theme-metin2_modern_web_cards .cards > .card.left,
body.launcher-embedded.theme-metin2_modern_web_cards .cards > .card.right {
    -ms-flex: 0 0 442px !important;
    flex: 0 0 442px !important;
    width: 442px !important;
    min-width: 442px !important;
    max-width: 442px !important;
    height: 248px !important;
    min-height: 248px !important;
    max-height: 248px !important;
    float: none !important;
    margin: 0 12px 0 0 !important;
}
body.launcher-embedded.theme-metin2_modern_web_cards .cards > .card img {
    display: block !important;
    width: 442px !important;
    min-width: 442px !important;
    max-width: 442px !important;
    height: 248px !important;
    min-height: 248px !important;
    max-height: 248px !important;
}
/* Dar pencerede kart gorunur alani kirpilir, ikinci kart yeniden olceklenmez. */
body.launcher-embedded.theme-metin2_modern_web_cards .section {
    overflow: hidden !important;
}


/* === v7 / Modern Web Kart Tema: dikey kaydirma geri geldi ===
   Yalnizca sayfanin root scroll'u; kartlarin boyutu degismez.
   WPF WebBrowser / IE11 HTML scroll bar destekli, yatay overflow gizlidir. */
html {
    height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -ms-overflow-style: scrollbar !important;
    scrollbar-width: auto !important;
}
body.launcher-embedded.theme-metin2_modern_web_cards {
    height: auto !important;
    min-height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
    -ms-overflow-style: auto !important;
    scrollbar-width: auto !important;
}
body.launcher-embedded.theme-metin2_modern_web_cards #page {
    display: block !important;
    height: auto !important;
    min-height: 100% !important;
    max-height: none !important;
    overflow: visible !important;
}
body.launcher-embedded.theme-metin2_modern_web_cards .section {
    -ms-flex: none !important;
    flex: none !important;
    width: 100% !important;
    min-height: 286px !important;
    height: 286px !important;
    max-height: 286px !important;
    overflow: hidden !important;
}
html::-webkit-scrollbar,
body.launcher-embedded.theme-metin2_modern_web_cards::-webkit-scrollbar {
    display: block !important;
    width: 11px !important;
}
html::-webkit-scrollbar-track { background: #061f34 !important; }
html::-webkit-scrollbar-thumb { background: #286693 !important; border: 2px solid #061f34 !important; }
html {
    scrollbar-face-color: #286693;
    scrollbar-track-color: #061f34;
    scrollbar-arrow-color: #b9defa;
}

/* Modern motorlarin onceki :has() secicisi scrollbar'i gizlememeli.
   IE11 bu seciciyi yok sayar ve ustteki klasik html kurali kullanilir. */
html:has(body.launcher-embedded.theme-metin2_modern_web_cards) {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    scrollbar-width: auto !important;
}
html:has(body.launcher-embedded.theme-metin2_modern_web_cards)::-webkit-scrollbar {
    display: block !important;
    width: 11px !important;
}
