/* Galaxy Gate - Resimdeki arayüzle birebir */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Sadece tek başına açılan galaxy-gate.html sayfasında body düzeni */
body.galaxy-standalone {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #0a0c12;
    color: #fff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Mobil dikey mod engeli: sadece yatay (landscape) */
.portrait-block-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    pointer-events: auto;
    user-select: none;
    box-sizing: border-box;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.portrait-block-content { text-align: center; padding: 24px; max-width: 90vw; }
.portrait-block-icon { font-size: 64px; line-height: 1; margin-bottom: 16px; opacity: 0.9; }
.portrait-block-title { font-size: 1.25rem; font-weight: bold; margin-bottom: 8px; color: #fff; }
.portrait-block-desc { font-size: 1rem; color: rgba(255,255,255,0.85); }
@media (max-width: 768px) and (orientation: portrait) {
    .portrait-block-overlay { display: flex !important; }
}
@media (max-height: 768px) and (orientation: portrait) {
    .portrait-block-overlay { display: flex !important; }
}

/* Ana çerçeve - kalın koyu gri metalik, üst/alt mavi glow */
/* Oyun ekranında pencere olarak açılan Galaxy Kapısı */
#galaxyGateWindowContent .galaxy-frame {
    max-width: none;
    min-height: 320px;
}
.galaxy-frame {
    display: flex;
    width: 100%;
    max-width: 1200px;
    min-height: 700px;
    background: linear-gradient(180deg, #1a1d26 0%, #0d0f14 100%);
    border: 4px solid #2a2e38;
    border-radius: 4px;
    box-shadow:
        0 0 20px rgba(0, 150, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    position: relative;
    overflow: hidden;
}

.galaxy-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 180, 255, 0.6), transparent);
    box-shadow: 0 0 12px rgba(0, 180, 255, 0.5);
}
.galaxy-frame::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 180, 255, 0.6), transparent);
    box-shadow: 0 0 12px rgba(0, 180, 255, 0.5);
}

/* ========== Kapı butonları - orta panelde sol-orta alanda (kırmızı daire alanı) ========== */
.left-panel.gate-buttons-overlay {
    position: absolute;
    left: 0;
    top: 1%;
    transform: none;
    width: 160px;
    min-width: 160px;
    z-index: 15;
    background: transparent;
    border: none;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

/* Eski sol panel (galaxy-frame içinde yan yana kullanılıyorsa) */
.left-panel {
    width: 160px;
    min-width: 160px;
    background: linear-gradient(180deg, #1e2129 0%, #16181f 100%);
    border-right: 1px solid #2a2e38;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gate-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    padding: 6px 10px 6px calc(10px + 10%); /* metin %10 sağa */
    background: url('img/gg/buton.png') no-repeat left center;
    background-size: auto !important;
    border: none;
    border-radius: 2px;
    color: #e0e0e0;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    text-align: left;
    transition: color 0.2s, filter 0.2s;
}

.gate-btn:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.9), 0 0 20px rgba(255, 255, 255, 0.6);
    filter: brightness(1.1);
}

.gate-btn.active {
    background-image: url('img/gg/buton1.png');
    background-repeat: no-repeat;
    background-position: left center;
    background-size: auto !important;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.9), 0 0 20px rgba(255, 255, 255, 0.6);
}

/* Etharnel: uzun metin — aynı font, sol padding biraz az (sağa taşmasın) */
.gate-btn[data-gate="etharnel"] {
    padding: 6px 6px 6px 10px;
}

.gate-icons {
    display: none;
}

.gate-icon {
    display: none;
}

/* Delta ile Hades arasında yaklaşık bir kapı butonu yüksekliği boşluk */
.gate-btn-spacer {
    flex-shrink: 0;
    width: 100%;
    min-height: 32px;
    pointer-events: none;
}

/* ========== ORTA PANEL - Kapı detayı ========== */
.center-panel {
    position: relative;
    flex: 1;
    min-width: 0;
    background: linear-gradient(180deg, #0f1218 0%, #080a0e 100%),
        radial-gradient(ellipse 120% 100% at 50% 45%, rgba(20, 40, 80, 0.4) 0%, transparent 50%);
    padding: 11px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Kapı seçiliyken orta panel arka planı (img/maps kullanılmıyor) */
.center-panel--alpha,
.center-panel--beta,
.center-panel--gamma,
.center-panel--delta,
.center-panel--hades,
.center-panel--etharnel {
    background: linear-gradient(180deg, rgba(15, 18, 24, 0.85) 0%, rgba(8, 10, 14, 0.9) 100%);
}

.gate-header {
    width: 100%;
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 8px 12px;
    min-height: 40px;
    box-sizing: border-box;
    background: transparent;
    border: none;
    border-radius: 0;
    margin-bottom: 5px;
}

.gate-header h1 {
    position: absolute;
    left: 45%;
    transform: translate(-50%, -6px);
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #a8b4c0;
    z-index: 1;
}

.header-icons {
    display: flex;
    gap: 10px;
}

.header-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a4a6e;
    color: #7dd3ff;
    border-radius: 2px;
    font-size: 14px;
    font-weight: bold;
}

/* Kapı görseli - 3D halka, dişliler, metalik yapı */
.gate-visual {
    position: relative;
    width: 280px;
    height: 280px;
    flex-shrink: 0;
    margin: 3px 0;
    background: radial-gradient(ellipse at center,
        rgba(10, 30, 60, 0.6) 0%,
        transparent 70%);
}

/* Kapı tamamlama ödülleri — sağ üst bilgi ikonu (img/gg/blg.png) */
.gate-rewards-info-btn {
    position: absolute;
    top: 4px;
    right: 22px;
    z-index: 12;
    width: auto;
    height: auto;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    cursor: pointer;
    pointer-events: auto;
    display: block;
    line-height: 0;
}
.gate-rewards-info-img {
    display: block;
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}
.gate-rewards-info-btn:hover,
.gate-rewards-info-btn:focus {
    filter: brightness(1.12);
    outline: none;
}
.gate-rewards-tooltip {
    position: absolute;
    top: 36px;
    right: 16px;
    z-index: 13;
    min-width: 200px;
    max-width: 260px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 220, 80, 0.55);
    border-radius: 6px;
    background: rgba(8, 14, 28, 0.94);
    color: #f0f4ff;
    font-size: 12px;
    line-height: 1.45;
    text-align: left;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
    pointer-events: auto;
}
.gate-rewards-tooltip.hidden {
    display: none;
}
.gate-rewards-tooltip-title {
    display: block;
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 700;
    color: #ffe566;
}
.gate-rewards-tooltip-line {
    display: block;
    margin: 2px 0;
}
.gate-rewards-tooltip-subtitle {
    display: block;
    margin: 8px 0 4px;
    font-size: 11px;
    font-weight: 700;
    color: #9fd4ff;
}

/* Halka/çekirdek/çizim kaldırıldı - sadece kapı resimleri kullanılır */
.gate-visual-rings {
    display: none !important;
}

/* 1. En arkada: arka plan paneli */
.gate-background-img {
    display: block;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    object-fit: none;
    pointer-events: none;
    z-index: 0;
}

/* 2. Ortada: kapı görselleri (alfabg, betabg, gamabg, deltabg) */
.gate-bg-img {
    display: block;
    position: absolute;
    left: 35%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    object-fit: none;
    pointer-events: none;
    z-index: 1;
}

/* 3. En önde: kapı portalları (alfa, beta, gama, delta) */
.gate-portal-img {
    display: block;
    position: absolute;
    left: 35%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    object-fit: none;
    pointer-events: none;
    z-index: 2;
}

/* Hades: portal görseli hafif küçültme */
.gate-visual.gate-visual--hades .gate-portal-img {
    transform: translate(-50%, -50%) scale(0.9);
}

/* Etharnel (img/gg/ether.png): portal %10 küçük */
.gate-visual.gate-visual--etharnel .gate-portal-img {
    transform: translate(-50%, -50%) scale(0.9);
}

/* Kapı parçası tamamlandığında veya açık kurulu kapı (hangar'da) varsa gösterilen jump resmi - tüm kapı resimlerinin önünde */
.gate-jump-img {
    display: none;
    position: absolute;
    bottom: 6%;
    left: 34%;
    transform: translateX(-56%) rotate(135deg) skewX(-25deg);
    max-width: 81%;
    max-height: 75%;
    object-fit: contain;
    pointer-events: none;
    z-index: 10;
}
.gate-visual.gate-ready .gate-jump-img,
.gate-visual.gate-hangar-ready .gate-jump-img {
    display: block;
}
.gate-visual.gate-visual--alpha.gate-ready .gate-jump-img,
.gate-visual.gate-visual--alpha.gate-hangar-ready .gate-jump-img {
    bottom: 9%;
    max-width: 85%;
    max-height: 79%;
}
.gate-visual.gate-visual--beta.gate-ready .gate-jump-img,
.gate-visual.gate-visual--beta.gate-hangar-ready .gate-jump-img {
    bottom: 9%;
    max-width: 77%;
    max-height: 71%;
}
.gate-visual.gate-visual--gamma.gate-ready .gate-jump-img,
.gate-visual.gate-visual--gamma.gate-hangar-ready .gate-jump-img {
    bottom: 13%;
}
.gate-visual.gate-visual--delta.gate-ready .gate-jump-img,
.gate-visual.gate-visual--delta.gate-hangar-ready .gate-jump-img {
    bottom: 23%;
    max-width: 77%;
    max-height: 50%;
    left: 87px;
}
.gate-visual.gate-visual--hades.gate-ready .gate-jump-img,
.gate-visual.gate-visual--hades.gate-hangar-ready .gate-jump-img,
.gate-visual.gate-visual--etharnel.gate-ready .gate-jump-img,
.gate-visual.gate-visual--etharnel.gate-hangar-ready .gate-jump-img {
    bottom: 23%;
    max-width: 77%;
    max-height: 50%;
    left: 87px;
}

.gate-glow {
    position: absolute;
    inset: -20px;
    background: radial-gradient(ellipse at center,
        transparent 25%,
        rgba(0, 100, 180, 0.12) 45%,
        rgba(0, 60, 120, 0.08) 60%,
        transparent 75%);
    pointer-events: none;
}

.gate-ring {
    position: absolute;
    border-radius: 50%;
    box-shadow:
        inset 0 0 30px rgba(0, 120, 200, 0.2),
        0 0 20px rgba(0, 120, 200, 0.1);
}

.gate-ring-outer {
    width: 100%;
    height: 100%;
    border: 4px solid #1a4a6a;
    box-shadow:
        inset 0 0 50px rgba(0, 150, 255, 0.12),
        0 0 30px rgba(0, 150, 255, 0.15),
        inset 0 2px 0 rgba(255,255,255,0.06);
}

.gate-ring-mid {
    width: 76%;
    height: 76%;
    top: 12%;
    left: 12%;
    border: 3px solid #2a5a8a;
    box-shadow:
        inset 0 0 35px rgba(0, 180, 255, 0.18),
        0 0 18px rgba(0, 180, 255, 0.12),
        inset 0 1px 0 rgba(255,255,255,0.08);
}

.gate-ring-inner {
    width: 46%;
    height: 46%;
    top: 27%;
    left: 27%;
    border: 2px solid #3a7aaa;
    box-shadow:
        inset 0 0 25px rgba(100, 200, 255, 0.22),
        0 0 18px rgba(0, 200, 255, 0.25),
        inset 0 1px 0 rgba(255,255,255,0.1);
}

.gate-core {
    position: absolute;
    width: 24%;
    height: 24%;
    top: 38%;
    left: 38%;
    background: radial-gradient(circle at 35% 35%,
        #6acfff 0%,
        #2a8acc 35%,
        #1a5a8a 70%,
        #0a2840 100%);
    border-radius: 50%;
    box-shadow:
        0 0 35px rgba(0, 200, 255, 0.5),
        0 0 15px rgba(200, 220, 255, 0.3),
        inset 0 0 20px rgba(255, 255, 255, 0.25),
        inset 0 2px 0 rgba(255,255,255,0.4);
}

/* Dişli / yapısal halka efektleri */
.gate-gears {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.gear {
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(40, 90, 140, 0.7);
    opacity: 0.7;
    box-shadow: inset 0 0 15px rgba(0, 120, 200, 0.1);
}

.gear-1 {
    width: 92%;
    height: 92%;
    top: 4%;
    left: 4%;
}

.gear-2 {
    width: 62%;
    height: 62%;
    top: 19%;
    left: 19%;
}

.gear-3 {
    width: 36%;
    height: 36%;
    top: 32%;
    left: 32%;
}

.gate-footer {
    position: relative;
    z-index: 10;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 13px;
    color: #c0c0c0;
}

.gate-footer .lives {
    position: relative;
    margin-left: 24%;
    top: -324%;
}

.gate-footer .progress {
    position: relative;
    z-index: 10;
    margin-right: 35%;
    top: -49px;
}

.gate-actions {
    position: relative;
    z-index: 10;
    width: 280px;
    display: flex;
    gap: 8px;
    margin-top: -48px;
    margin-left: auto;
    margin-right: auto;
    height: 44px;
    align-items: stretch;
    transform: translateY(11%);
}

.gate-actions .btn-buy-lives,
.gate-actions .btn-prepare {
    position: relative;
    z-index: 1;
}

/* Kapı kapalı ve tamamlanmamışsa metinler siyah, net ve hafif kalın */
.gate-actions:not(:has(.buy-lives-open)) .btn-buy-lives,
.gate-actions:not(:has(.buy-lives-open)) .btn-prepare {
    color: #000;
    font-weight: 700;
    -webkit-font-smoothing: antialiased;
    text-shadow: 0 0 1px rgba(255,255,255,0.15);
}

/* Hak satın al: resim orijinal boyutta, metin iki satır */
.btn-buy-lives {
    flex: 1;
    padding: 0 8px;
    height: 100%;
    min-height: 44px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: url('img/gg/hak.png') center center no-repeat;
    background-size: auto;
    border: none;
    border-radius: 0;
    color: #e0e0e0;
    font-size: 11px;
    font-weight: 600;
    cursor: default;
    box-shadow: none;
    transition: color 0.2s;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
    word-break: break-word;
    transform: translateX(-50%);
}

.btn-buy-lives .btn-buy-lives-text {
    display: block;
    transform: translateY(4px);
}

.btn-buy-lives .btn-buy-lives-price {
    display: block;
    font-size: 10px;
    font-weight: 500;
    margin-top: 2px;
}

.gate-actions:not(:has(.buy-lives-open)) .btn-buy-lives .btn-buy-lives-price {
    font-weight: 500;
}

.btn-buy-lives .btn-buy-lives-price:empty {
    display: none;
}

/* Kapı kapalı: tıklanamaz, hover efekt yok */
.btn-buy-lives.buy-lives-disabled,
.btn-buy-lives:disabled {
    pointer-events: none;
    opacity: 0.8;
    cursor: not-allowed;
}

.btn-buy-lives.buy-lives-disabled:hover,
.btn-buy-lives:disabled:hover {
    box-shadow: none;
}

/* Kapıyı hazırla'ya basılınca: hak1.png (Hak satın al butonu) */
.btn-buy-lives.buy-lives-open:not(:disabled) {
    background-image: url('img/gg/hak1.png');
    background-size: auto;
    background-position: center;
    background-repeat: no-repeat;
    border: none;
    color: #fff;
    cursor: pointer;
    box-shadow: none;
}

.btn-buy-lives.buy-lives-open:not(:disabled):hover {
    background-image: url('img/gg/hak1.png');
    border: none;
    color: #fff;
    box-shadow: none;
}

/* Kapıyı hazırla: resim orijinal boyutta */
.btn-prepare {
    flex: 1;
    padding: 0 8px;
    height: 100%;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: url('img/gg/hazırla.png') center center no-repeat;
    background-size: auto;
    border: none;
    border-radius: 0;
    color: #e0e0e0;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: none;
    transition: color 0.2s;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
    word-break: break-word;
}

.btn-prepare:hover {
    background-image: url('img/gg/hazırla.png');
    background-size: auto;
    background-position: center;
    background-repeat: no-repeat;
    border: none;
    color: #fff;
}

/* Kapı tamamlanmadığında: tıklanamaz */
.btn-prepare.prepare-disabled,
.btn-prepare:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-prepare.prepare-disabled:hover,
.btn-prepare:disabled:hover {
    background-image: url('img/gg/hazırla.png');
    background-size: auto;
    background-position: center;
    background-repeat: no-repeat;
    border: none;
}

/* Kapı parçası tamamlandığında: hazırla1.png hemen (Kapıyı hazırla butonu) */
.btn-prepare.prepare-ready {
    background-image: url('img/gg/hazırla1.png');
    background-size: auto;
    background-position: center;
    background-repeat: no-repeat;
    border: none;
    color: #fff;
    box-shadow: none;
}

.btn-prepare.prepare-ready:hover {
    background-image: url('img/gg/hazırla1.png');
    background-size: auto;
    background-position: center;
    background-repeat: no-repeat;
    border: none;
    color: #fff;
    box-shadow: none;
}

/* Parça tamam, beklerken de hazırla1.png */
.btn-prepare.prepare-waiting {
    background-image: url('img/gg/hazırla1.png');
    background-size: auto;
    background-position: center;
    background-repeat: no-repeat;
    border: none;
    color: #a0a0a0;
    cursor: pointer;
}

/* ========== SAĞ PANEL - Kaynaklar ve çarpan ========== */
/* Sağ panel - kırmızı çizilen alana taşındı (orta panel içinde, orta-sağ) */
.right-panel.right-panel-overlay {
    position: absolute;
    right: 25px;
    top: 14%;
    width: 231px;
    min-width: 231px;
    max-height: 85%;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    z-index: 15;
    background: linear-gradient(180deg, rgba(30, 33, 41, 0.95) 0%, rgba(22, 24, 31, 0.98) 100%);
    border: 1px solid #2a2e38;
    border-radius: 4px;
    padding: 4px 10px 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.right-panel.right-panel-overlay::-webkit-scrollbar {
    display: none;
}

.right-panel {
    width: 220px;
    min-width: 220px;
    background: linear-gradient(180deg, #1e2129 0%, #16181f 100%);
    border-left: 1px solid #2a2e38;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.resources {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 0;
}

.resource-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 9px;
    line-height: 1.1;
    min-height: 12px;
    padding: 0;
}

.resource-label {
    color: #909090;
}

.resource-value {
    color: #fff;
    font-weight: 500;
}

/* ÇARPAN - resimdeki gibi kompakt panel: pill başlık, tek satır orta, alt strip x2-x6 */
.multiplier-section {
    background: linear-gradient(180deg, #151820 0%, #0f1218 100%);
    border: 1px solid #4a4e58;
    border-radius: 8px 8px 4px 4px;
    padding: 4px 8px 0;
    max-width: 200px;
}

.multiplier-header {
    display: inline-block;
    padding: 3px 14px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #fff;
    text-align: center;
    border: 1px solid #4a4e58;
    border-radius: 999px;
    margin-bottom: 5px;
    margin-left: 50%;
    transform: translateX(-50%);
}

.multiplier-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 4px;
    padding: 2px 0;
}

.multiplier-big {
    width: 18px;
    height: 18px;
    background: rgba(30, 35, 45, 0.9);
    border: 1px solid #4a4e58;
    border-radius: 2px;
    color: #7dd3ff;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.multiplier-big:hover,
.multiplier-big.active {
    background: rgba(26, 90, 138, 0.8);
    border-color: #3a9fd4;
    box-shadow: 0 0 8px rgba(0, 180, 255, 0.35);
    color: #fff;
}

.multiplier-big.mult-max {
    background: linear-gradient(180deg, #8b6914 0%, #c9a227 50%, #6b5010 100%);
    border-color: #e6c84c;
    color: #fff;
    box-shadow: 0 0 8px rgba(201, 162, 39, 0.5);
}

.multiplier-desc-text {
    font-size: 9px;
    color: #e0e0e0;
    white-space: nowrap;
}

.multiplier-checkbox {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    accent-color: #1a6b9e;
    cursor: pointer;
    box-shadow: 0 0 0 1px rgba(0, 180, 255, 0.4);
    border-radius: 2px;
}

.multiplier-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2px;
    padding: 3px 6px 4px;
    background: rgba(40, 44, 52, 0.8);
    border-radius: 0 0 4px 4px;
    border-top: 1px solid #2a2e38;
}

.mult-opt {
    flex: 1;
    min-width: 0;
    padding: 3px 2px;
    background: transparent;
    border: none;
    border-radius: 0;
    color: #e0e0e0;
    font-size: 10px;
    font-weight: 600;
    cursor: default;
    transition: color 0.2s, background 0.2s;
}

.mult-opt:hover {
    color: #fff;
}

.mult-opt.active {
    background: rgba(26, 90, 138, 0.5);
    color: #fff;
    border-radius: 2px;
}

.mult-opt.mult-max {
    background: rgba(201, 162, 39, 0.25);
    color: #e6c84c;
    border-radius: 2px;
}

.energy-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
    transform: translateY(-2%);
}

.energy-bar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0;
    border: none;
    border-radius: 0;
    cursor: pointer;
    font: inherit;
    color: inherit;
    background: transparent;
    box-shadow: none;
    transform: translateX(1%);
}

.energy-bar-img {
    display: block;
    width: 90%;
    height: auto;
    max-width: 100%;
    vertical-align: middle;
}

/* Yeşil dolgu: resimdeki çerçevenin içindeki alana oturur */
.energy-bar-fill {
    position: absolute;
    left: 24%;
    right: 24%;
    top: 29%;
    bottom: 29%;
    transform: translateX(-3%);
    background: linear-gradient(180deg, #2ecc71 0%, #27ae60 35%, #1e8a3e 100%);
    border-radius: 3px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), inset 0 -1px 0 rgba(0,0,0,0.2);
    pointer-events: none;
    transition: box-shadow 0.2s ease;
}

.energy-bar:active .energy-bar-fill {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), inset 0 -1px 0 rgba(0,0,0,0.2),
        0 0 12px rgba(46, 204, 113, 0.7),
        0 0 24px rgba(46, 204, 113, 0.4);
}

.energy-label {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
    pointer-events: none;
    z-index: 1;
}

/* Energy Boosts dropdown */
.energy-boosts-wrap {
    position: relative;
}

.right-panel .energy-boosts-wrap,
.right-panel .btn-log {
    margin-top: -5px;
}

.energy-boosts-trigger {
    width: 100%;
    height: 16px;
    min-height: 16px;
    background: #252930;
    border: 1px solid #3a3e48;
    border-radius: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 6px;
    font-size: 9px;
    color: #e0e0e0;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: border-color 0.2s, background 0.2s;
}

.energy-boosts-trigger:hover {
    background: #2a2e36;
    border-color: #4a4e58;
}

.energy-boosts-trigger[aria-expanded="true"] {
    border-color: #2a6a9a;
    box-shadow: 0 0 0 1px rgba(0, 150, 255, 0.2);
}

.energy-dropdown-icon {
    color: #808080;
    font-size: 8px;
    flex-shrink: 0;
}

.energy-boosts-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: #1e2129;
    border: 1px solid #3a3e48;
    border-radius: 2px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    z-index: 100;
    overflow: hidden;
}

.energy-boosts-options.hidden {
    display: none !important;
}

.energy-boosts-option {
    display: block;
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-bottom: 1px solid #2a2e38;
    color: #e0e0e0;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
}

.energy-boosts-option:last-child {
    border-bottom: none;
}

.energy-boosts-option:hover {
    background: #2a6a9a;
    color: #fff;
}

.energy-boosts-option.active {
    background: #1a5a8a;
    color: #fff;
}

/* Eski sınıf uyumluluğu (gerekirse) */
.energy-boosts {
    height: 32px;
    background: #252930;
    border: 1px solid #3a3e48;
    border-radius: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    font-size: 11px;
    color: #e0e0e0;
}

.energy-dropdown {
    color: #808080;
    font-size: 10px;
}

.btn-log {
    width: 100%;
    padding: 3px 5px;
    min-height: 11px;
    background: linear-gradient(180deg, #252930 0%, #1a1d24 100%);
    border: 1px solid #3a3e48;
    border-radius: 2px;
    color: #e0e0e0;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-log:hover {
    background: linear-gradient(180deg, #2a2d36 0%, #1f222a 100%);
    border-color: #4a4e58;
}

.log-area {
    height: 120px;
    max-height: 111px;
    min-height: 80px;
    background: #16181f;
    border: 1px solid #2a2e38;
    border-radius: 2px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 6px;
    flex-shrink: 0;
}

.log-area::-webkit-scrollbar {
    display: none;
}

.log-line {
    font-size: 11px;
    color: #b0b0b0;
    padding: 3px 0;
    border-bottom: 1px solid #1e2129;
}

.log-line:last-child {
    border-bottom: none;
}

/* Log satırı ikonlu (cephane / kapı parçası): başta ikon (orijinal boyut), sonra metin */
.log-line-icon {
    display: flex;
    align-items: center;
    gap: 6px;
}
.log-cephane-icon,
.log-piece-icon {
    flex-shrink: 0;
    /* Orijinal boyut - width/height verilmedi */
    vertical-align: middle;
}

/* Kapı parçası log satırı: resimdeki koyu altın-kahverengi bar */
.log-line-gate-piece {
    background: linear-gradient(180deg, #6C551A 0%, #8B6F20 100%);
    color: #e8e4dc;
    padding: 4px 8px;
    margin: 2px -2px;
    border-radius: 2px;
    border: 1px solid rgba(0, 0, 0, 0.2);
}
.log-line-gate-piece .log-piece-icon {
    filter: brightness(1.1);
}

/* Cephane log satırı: kapıdaki gibi beyaz yazı, koyu arka plan */
.log-line-cephane {
    background: linear-gradient(90deg, #1a1f1a 0%, #0f1810 50%, #141a14 100%);
    color: #e8e4dc;
    padding: 4px 8px;
    margin: 2px -2px;
    border-radius: 2px;
    border: 1px solid rgba(0, 0, 0, 0.3);
}
.log-line-cephane .log-cephane-icon {
    filter: none;
}

/* ========== Oyun penceresinde açıldığında: pencere küçükse içeriği scale ile sığdır (JS .galaxy-gate-window--compact + --gg-scale) ========== */
#galaxyGateWindow #galaxyGateWindowContent {
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    overflow: hidden !important;
}
#galaxyGateWindow #galaxyGateWindowContent .galaxy-frame {
    flex-shrink: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

/* Pencere küçükken (JS sınıfı eklenir): çerçeve boyutunu scale'e göre ayarla, içeriği scale ile küçült */
.ui-panel.galaxy-gate-window.galaxy-gate-window--compact #galaxyGateWindowContent .galaxy-frame {
    width: calc(801px * var(--gg-scale, 0.5)) !important;
    min-width: 0 !important;
    height: calc(414px * var(--gg-scale, 0.5)) !important;
    min-height: 0 !important;
    max-width: 100% !important;
}
.ui-panel.galaxy-gate-window.galaxy-gate-window--compact #galaxyGateWindowContent .galaxy-frame > main.center-panel {
    width: 801px !important;
    height: 414px !important;
    min-width: 801px !important;
    min-height: 414px !important;
    flex: none !important;
    transform: scale(var(--gg-scale, 0.5)) !important;
    transform-origin: top left !important;
}
.ui-panel.galaxy-gate-window.galaxy-gate-window--compact .galaxy-gate-window-title {
    font-size: 10px;
}
.ui-panel.galaxy-gate-window.galaxy-gate-window--compact .galaxy-gate-uridium-bar {
    top: 34px;
    right: 10px;
    transform: translateX(-40px);
}
.ui-panel.galaxy-gate-window.galaxy-gate-window--compact .galaxy-gate-uridium-bar .galaxy-gate-uripanel-img {
    max-width: calc(180px * var(--gg-scale, 0.5));
    max-height: calc(50px * var(--gg-scale, 0.5));
    width: auto;
    height: auto;
    object-fit: contain;
    transform: translate(-2%, -5%) scale(var(--gg-scale, 0.5));
    transform-origin: top right;
}
.ui-panel.galaxy-gate-window.galaxy-gate-window--compact .galaxy-gate-uridium-text {
    font-size: 9px;
}

/* Android: uripanel sağa uzat + PC’ye göre daha sağda */
.ui-panel.galaxy-gate-window.galaxy-gate-window--compact.galaxy-gate-window--android-shrink .galaxy-gate-uridium-bar {
    right: 0;
    transform: translateX(-4px);
}
.ui-panel.galaxy-gate-window.galaxy-gate-window--compact.galaxy-gate-window--android-shrink .galaxy-gate-uridium-text {
    transform: translate(calc(-10% + 2%), calc(-50% - 8px));
}
.ui-panel.galaxy-gate-window.galaxy-gate-window--compact.galaxy-gate-window--android-shrink .galaxy-gate-uridium-bar .galaxy-gate-uripanel-img {
    max-width: calc(240px * var(--gg-scale, 0.5));
    transform: translate(18px, -5%) scale(var(--gg-scale, 0.5)) scaleX(1.22);
    transform-origin: top right;
}
.ui-panel.galaxy-gate-window.galaxy-gate-window--android-shrink:not(.galaxy-gate-window--compact) .galaxy-gate-uridium-bar {
    right: 6px;
}
.ui-panel.galaxy-gate-window.galaxy-gate-window--android-shrink:not(.galaxy-gate-window--compact) .galaxy-gate-uridium-text {
    transform: translate(calc(-10% + 2%), calc(-50% - 8px));
}
.ui-panel.galaxy-gate-window.galaxy-gate-window--android-shrink:not(.galaxy-gate-window--compact) .galaxy-gate-uripanel-img {
    transform: translate(14px, -5%) scale(0.9) scaleX(1.22);
    transform-origin: top right;
}
