/* components.css - TAM SÜRÜM */

/* BUTONLAR */
button {
    margin-left: 8px;
	background-color: #5d4a30;
    color: #f0e68c;
    border: 1px solid #7c6843;
    padding: 10px 10px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s, transform 0.1s;
    text-transform: uppercase;
    font-weight: bold;
    box-shadow: 0 4px 0 #3e3221;
    font-family: 'Georgia', serif;
	font-family: 'Cinzel', serif;
}
button:active { transform: translateY(4px); box-shadow: none; }
button:hover:not(:disabled) { background-color: #6d5a3f; filter: brightness(1.1); }
button:disabled { background-color: #383838; color: #777; cursor: not-allowed; box-shadow: none; transform: translateY(2px); }

/* SLOTLAR */
.skill-slot, .menu-slot {
    position: relative; width: 60px; height: 60px;
    background-color: #222; border: 2px solid #555; border-radius: 6px;
    cursor: pointer; transition: all 0.2s; box-shadow: inset 0 0 10px #000;
    display: flex; justify-content: center; align-items: center; overflow: hidden;
}
.item-slot {
 width: 60px; height: 60px;
    background-color: #222; border: 2px solid #555; border-radius: 6px;
    cursor: pointer; transition: all 0.2s; box-shadow: inset 0 0 10px #000;
    display: flex; justify-content: center; align-items: center; overflow: hidden;
}
.skill-slot img, .menu-slot img, .item-slot img { width: 100%; height: 100%; border-radius: 4px; object-fit: cover; }
.skill-slot:hover, .menu-slot:hover, .item-slot:hover { border-color: #f0e68c; box-shadow: 0 0 10px #f0e68c; transform: translateY(-2px); }

/* TIER BADGE */
.tier-badge {
    position: absolute; bottom: 0; right: 0;
    background: linear-gradient(135deg, #333, #111);
    color: #ffd700; font-size: 0.7em; padding: 1px 4px;
    border-radius: 2px; border: 1px solid #ffd700;
    font-weight: bold; z-index: 10; box-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

/* BARLAR */
.hp-bar-container { width: 100%; height: 10px; background-color: #600000; border: 1px solid #f0e68c; overflow: hidden; }
.hp-bar { height: 100%; background-color: #3cb371; transition: width 0.3s ease-out; width: 100%; }
.rage-bar-container { margin-top: 5px; background-color: #000060; height: 10px; border: 1px solid #f0e68c; overflow: hidden;}
.rage-bar { height: 100%; background-color: #3498db; width: 0%; transition: width 0.3s ease-in-out; }
#hero-hp-text, #monster-hp-text, .rage-text { font-size: 0.7em; display: block; color: #f0e68c; text-shadow: 1px 1px 1px #000; text-align: center; }

/* EFEKTLER */
.floating-text {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    font-size: 2.5em; font-weight: 900; pointer-events: none; z-index: 100;
    text-shadow: 2px 2px 0px #000; animation: float-up-fade 1.5s ease-out forwards;
}
.damage-text { color: #ff3333; } .heal-text { color: #43FF64; }
@keyframes float-up-fade {
    0% { opacity: 0; transform: translate(-50%, -20%) scale(0.5); }
    15% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
    100% { opacity: 0; transform: translate(-50%, -150%) scale(1); }
}

.healing-particle {
    position: absolute; width: 20px; height: 20px;
    background-image: url('../images/utils/healing_particles.png'); background-size: contain; background-repeat: no-repeat;
    opacity: 0; pointer-events: none; animation: particle-float 2s forwards;
}
@keyframes particle-float {
    0% { transform: translate(0, 0) scale(0.2); opacity: 0; }
    10% { opacity: 1; }
    100% { transform: translate(var(--move-x), -180px) scale(0.2); opacity: 0; }
}

.cooldown-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 0%;
    background-color: rgba(0, 0, 0, 0.75); z-index: 15;
    display: flex; justify-content: center; align-items: center; transition: height 0.3s ease;
}
.cooldown-text { color: #fff; font-weight: bold; font-size: 1.4em; text-shadow: 0 0 5px #000; }

/* İkonlar büyüdüğü için birbirine girmemeleri için arayı açalım */
.status-icons {
    position: absolute;
    top: -50px; /* İkonlar büyüdüğü için biraz daha yukarı aldık */
    left: 50%; /* Merkeze al */
    transform: translateX(-50%); /* Tam ortala */
    width: auto !important; /* Genişliği kısıtlama, ikonlar ne kadar yer isterse o kadar genişlesin */
    min-width: 250px; /* İkonlara ferah bir alan tanı */
    
    display: flex !important;
    flex-direction: row !important;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px; /* İkonlar arası nefes payı */
    pointer-events: none;
    z-index: 100;
}

.status-icon {
    flex: 0 0 45px !important; 
    height: 45px !important;
    
    /* --- BOŞLUĞU AZALTAN KISIM --- */
    padding: 1px !important; /* Resim ile çerçeve arasında sadece 1px boşluk kalır */
    border: 2px solid #fff;   /* Beyaz ince hat */
    /* ----------------------------- */

    background-color: rgba(0, 0, 0, 0.8); /* Arka planı biraz daha kararttık ki ikon parlasın */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.8);
    overflow: hidden; /* Resmin çerçeveden taşmasını engeller */
	pointer-events: auto !important; 
}

.status-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border-radius: 50%;
    pointer-events: none !important; 
    /* Resmin daha canlı durması için hafif bir kontrast */
    filter: contrast(1.1) brightness(1.1);
}

/* --- PARLAMALARI (GLOW) İKONA YAPIŞTIRMA --- */
.status-buff { 
    /* Yayılmayı (spread) azaltıp parlaklığı artırdık */
    box-shadow: 0 0 10px 2px rgba(67, 255, 100, 0.7) !important; 
    border-color: #43FF64 !important; /* Beyaz çerçeveyi de yeşile boyar (Opsiyonel) */
}

.status-debuff { 
    box-shadow: 0 0 10px 2px rgba(255, 77, 77, 0.7) !important;
    border-color: #ff4d4d !important; /* Beyaz çerçeveyi de kırmızıya boyar */
}

/* Savaş Bekliyor Durumu (Gri ve Yarı Saydam) */
.status-waiting {
    filter: grayscale(100%) brightness(0.7) !important;
    opacity: 0.6 !important;
    border-color: #aaa !important;
}
#points-notification-area {
    display: flex;
    gap: 5px;
    align-items: center;
}

.point-notif {
    font-size: 0.55rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    color: white;
    text-shadow: 1px 1px 2px #000;
    border: 1px solid #fff;
    cursor: pointer;
    animation: pulse-notif 1.5s infinite ease-in-out;
    white-space: nowrap;
	font-family: 'Cinzel', serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Stat Puanı: Turuncu/Altın Parlama */
.stat-notif {
    background: linear-gradient(to bottom, #e67e22, #d35400);
    box-shadow: 0 0 10px rgba(230, 126, 34, 0.6);
}

/* Skill Puanı: Mor/Mistik Parlama */
.skill-notif {
    background: linear-gradient(to bottom, #9b59b6, #8e44ad);
    box-shadow: 0 0 10px rgba(155, 89, 182, 0.6);
}

@keyframes pulse-notif {
    0% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.1); filter: brightness(1.3); box-shadow: 0 0 15px rgba(255, 255, 255, 0.4); }
    100% { transform: scale(1); filter: brightness(1); }
}

.point-notif:hover {
    animation: none;
    transform: translateY(-2px);
    filter: brightness(1.5);
}
.exhaust-text { 
    color: #ffae00 !important; /* RPG Turuncusu */
    text-shadow: 2px 2px 0px #000, 0 0 10px rgba(255, 174, 0, 0.5) !important;
}

/* --- ÖZEL KAPATMA BUTONU (GENEL BUTONLARDAN AYRI) --- */
.close-btn-codex {
    position: absolute;
    top: -15px; /* Çerçevenin biraz dışına taşsın (Şık durur) */
    right: -15px;
    width: 40px;
    height: 40px;
    background: #3e2723; /* Çerçeve ile aynı ahşap rengi */
    color: #f4e4bc; /* Parşömen rengi ikon */
    border: 3px solid #8d6e63;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.close-btn-codex:hover {
    background: #8b0000; /* Üzerine gelince kırmızı mühür rengi */
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 20px rgba(139, 0, 0, 0.6);
}

.close-btn-codex i {
    font-size: 1.2rem;
}

.codex-window {
    width: 800px;
    height: 550px;
    background: #f4e4bc; /* Parşömen rengi */
    border: 15px solid #3e2723;
    border-radius: 10px;
    display: flex;
    box-shadow: 0 0 50px #000;
    position: relative;
    font-family: 'Cinzel', serif;
}

.codex-sidebar {
    width: 200px;
    background: rgba(0,0,0,0.1);
    border-right: 2px solid #8d6e63;
    padding-top: 40px;
}

.codex-tab {
    padding: 15px;
    cursor: pointer;
    color: #3e2723;
    font-weight: bold;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.codex-tab.active { background: #d7ccc8; color: #8b0000; border-left: 5px solid #8b0000; }

.codex-page {
    flex: 1;
    padding: 40px 40px 20px 40px;
    padding-bottom: 80px; /* Alttaki gölge yazıyı kapatmasın diye boşluk bıraktık */
    color: #2b1d1a;
    overflow-y: auto;
    font-family: 'Cinzel', serif;
    position: relative; /* İçindeki efektlerin hizalanması için */

    /* Scrollbar gizleme kuralları (Zaten eklemiştik, koruyoruz) */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.codex-page::-webkit-scrollbar {
    display: none;
}

#codex-modal .codex-page::after {
    content: "";
    position: sticky; /* Yazıyla birlikte kaymaz, altta bekler */
    bottom: -80px;    /* Pencerenin tam altına yapıştır */
    left: 0;
    display: block;
    width: 100%;
    height: 80px;     /* Gölge boyutu */
    
    /* Parşömen renginden (#f4e4bc) şeffafa geçiş */
    background: linear-gradient(to top, #f4e4bc 30%, transparent 100%);
    
    pointer-events: none; /* Tıklamayı engellemez */
    margin-top: -80px;    /* Yazının üzerine binmemesi için negatif margin */
    z-index: 100;
}

#codex-content-area {
    padding-bottom: 60px; 
}

.codex-page p {
    text-align: left; /* Yazıları iki yana yaslar, kitap gibi durur */
    margin-bottom: 20px;
    opacity: 0.9;
}

.codex-page h3 {
    color: #8b0000 !important; /* Kan kırmızısı/Bordo ana başlıklar */
    border-bottom: 2px solid rgba(139, 0, 0, 0.2);
    padding-bottom: 5px;
    margin-top: 20px;
    font-size: 1.4rem;
    text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.5); /* Parşömen üzerinde derinlik */
}

.codex-page b {
    color: #5d4037; /* Koyu kahve/mürekkep tonu */
    font-weight: 900;
}

.codex-divider { border: 0; height: 2px; background: #8d6e63; margin: 15px 0; }

#codex-content h3 { color: #8b0000; margin-bottom: 10px; font-size: 1.2rem; }
#codex-content p { line-height: 1.6; font-size: 0.95rem; margin-bottom: 20px; }

.codex-intent-row img {
    width: 55px;
    height: 55px;
    object-fit: contain;
    filter: drop-shadow(0 0 3px rgba(0,0,0,0.5));
}

.codex-intent-row {
    display: flex;
    align-items: center; /* İkon, Başlık ve Açıklamayı dikeyde ortalar */
    gap: 15px;
    margin-bottom: 12px;
    padding: 5px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 4px;
    width: 100%;
}

.codex-intent-row b {
    /* KRİTİK: Başlıklar için sabit bir genişlik ayırıyoruz */
    /* 120px "Yıkıntılar:" kelimesi için tam idealdir */
    min-width: 120px; 
    display: inline-block;
    flex-shrink: 0; /* Başlığın sıkışmasını engeller */
}

.codex-intent-row span {
    /* Açıklama metni kalan boşluğu doldurur ve düzgünce hizalanır */
    flex-grow: 1;
    line-height: 1.4;
    font-size: 0.85rem;
}

.codex-node-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #777; /* Standart Gri/Yeşil */
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.codex-node-icon img {
    width: 70%;
    height: 70%;
}

/* Zorluk Renkleri */
.node-orange { border-color: #ff9800 !important; box-shadow: 0 0 8px rgba(255, 152, 0, 0.4); }
.node-red { border-color: #ff4d4d !important; box-shadow: 0 0 8px rgba(255, 77, 77, 0.4); }

.codex-set-preview {
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid #6b5c3b;
    border-radius: 4px;
    padding: 12px;
    margin: 10px 0;
    max-width: 280px;
    text-align: left;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    font-family: 'Cinzel', serif;
}

.codex-stat-line {
    color: #3498db; /* Defans Mavisi */
    font-weight: 900;
    margin-bottom: 3px;
    font-size: 0.9rem;
}

.codex-multi-icons {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
    align-items: center;
}

.codex-multi-icons img {
    width: 30px !important;
    height: 30px !important;
    border: 1px solid #6b5c3b;
    border-radius: 4px;
    background: rgba(0,0,0,0.3);
}

.codex-dot-row { display: flex; gap: 8px; margin: 6px 0; }
.codex-dot { width: 8px; height: 8px; background: #333; border-radius: 50%; border: 1px solid #555; }
.codex-dot.active { background: #43FF64; box-shadow: 0 0 8px #43FF64; border-color: #fff; }

/* Gazi Üstad (Veteran) Yetenek Kartları */
.reforge-prop-card span {
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Kart içindeki isim grubunun yerleşimini sabitleyelim */
.reforge-prop-card div:first-child {
    flex: 1;           /* İsmin bulunduğu alan esneyebilir */
    min-width: 0;      /* Ellipsis (üç nokta) çalışması için şarttır */
    display: flex;
    align-items: center;
}


@media (max-width: 768px) {
    .codex-window { width: 95vw; height: 90vh; flex-direction: column; }
    .codex-sidebar { width: 100%; height: auto; display: flex; padding: 0; }
    .codex-tab { flex: 1; font-size: 0.6rem; padding: 10px 2px; text-align: center; }
	.close-btn-codex {top: 40px; right: 10px; width: 35px; height: 35px; }
	/* Gazi Üstad Mobil Başlıkları */
    .reforge-prop-card span {
        max-width: 110px !important;
        font-size: 0.75rem !important;
    }

    /* Butonların olduğu grubun isme baskı yapmasını engellemek için */
    .reforge-prop-card div:last-child {
        flex-shrink: 0; /* Butonlar asla küçülmesin */
    }
}