/* ========================================================================== 
   DenubOS HMI - Orb Bileşeni Stil Dosyası (orb.css)
   Düzeltme: Menü ve Kapat Butonu Çerçeveleri Ana Sayfa Kartlarıyla Eşitlendi (#1E293B)
   ========================================================================== */

   .denub-orb-dock {
    --orb-grad-1: #00E5FF;
    --orb-grad-2: #00A3FF;
    --orb-grad-3: #7a00ff;
    
    position: fixed;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 1100;
}

/* --- DURUM A: Varsayılan Bekleme / Ultra Yavaş Kapanma Modu (0.8s) --- */
.denub-orb {
    position: relative;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background-color: rgba(5, 7, 10, 0.95);
    border: 1px solid #1E293B; /* Ana sayfa kart çerçeve rengi */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-sizing: border-box;
    overflow: hidden;
    
    transition: width 0.8s cubic-bezier(0.25, 1, 0.5, 1),
                height 0.8s cubic-bezier(0.25, 1, 0.5, 1),
                border-radius 0.8s cubic-bezier(0.25, 1, 0.5, 1),
                background-color 0.6s ease;
}

/* --- DURUM B: Menü Açık Modu / Akıcı Seri Açılış (0.4s) --- */
.denub-orb-dock--popup-open .denub-orb {
    width: calc(100vw - 50px);
    max-width: 680px;
    height: 90px;
    border-radius: 16px;
    background-color: rgba(11, 15, 24, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid #1E293B; /* Ana sayfa kutularının çerçeve rengine eşitlendi */
    cursor: default;
    
    transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1),
                height 0.4s cubic-bezier(0.25, 1, 0.5, 1),
                border-radius 0.4s cubic-bezier(0.25, 1, 0.5, 1),
                background-color 0.3s ease;
}

/* --------------------------------------------------------------------------
   DÖNEN HALKALAR VE MERKEZ ÇEKİRDEK
   -------------------------------------------------------------------------- */

.denub-orb__ring, 
.denub-orb__core {
    opacity: 1;
    transition: opacity 0.25s ease-out;
}

.denub-orb__ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    pointer-events: none;
    box-sizing: border-box;
    border: 3px solid transparent;
    background: linear-gradient(#05070A, #05070A) padding-box,
                linear-gradient(45deg, var(--orb-grad-1), var(--orb-grad-2), var(--orb-grad-3), var(--orb-grad-1)) border-box;
    background-size: 200% 200%;
}

.denub-orb-dock .denub-orb__ring--outer {
    width: 50px; height: 50px;
    transform: translate(-50%, -50%);
    animation: denub-orb-spin-clockwise 4s linear infinite, denub-color-flow 8s linear infinite;
}

.denub-orb-dock .denub-orb__ring--inner {
    width: 42px; height: 42px;
    transform: translate(-50%, -50%);
    animation: denub-orb-spin-counter 3s linear infinite, denub-color-flow 8s linear infinite;
}

.denub-orb__core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: var(--orb-grad-2);                
}

.denub-orb-dock--popup-open .denub-orb__ring,
.denub-orb-dock--popup-open .denub-orb__core {
    opacity: 0 !important;
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   İÇERİK ALANI VE UYGULAMA MENÜSÜ
   -------------------------------------------------------------------------- */

.denub-orb-content-area {
    position: absolute;
    inset: 0;
    padding: 0 20px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    
    opacity: 0;
    visibility: hidden;
    transform: scale(0.97);
    transition: opacity 0.25s ease-out, transform 0.25s ease-out, visibility 0.25s;
}

.denub-orb-dock--popup-open .denub-orb-content-area {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    transition-delay: 0.12s;
}

.denub-orb-popup__menu {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
}
.denub-orb-popup__menu::-webkit-scrollbar { display: none; }

/* Uygulama Buton Stilleri */
.denub-orb .denub-orb-popup__menu .denub-orb-popup__item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 62px !important;
    height: 62px !important;
    min-width: 62px !important;
    min-height: 62px !important;
    box-sizing: border-box !important;
    border: 1px solid rgba(63, 63, 70, 0.4) !important;
    border-radius: 12px !important;
    background-color: rgba(20, 24, 33, 0.65) !important;
    color: #E4E4E7 !important;
    cursor: pointer !important;
    padding: 2px !important;
    margin: 0 !important;
    gap: 4px !important;
    transition: background-color 0.15s, border-color 0.15s, transform 0.1s;
}

.denub-orb .denub-orb-popup__menu .denub-orb-popup__item i {
    font-size: 1.35rem !important;
    color: #00E5FF !important;
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
    display: inline-block !important;
    line-height: 1 !important;
}

.denub-orb .denub-orb-popup__menu .denub-orb-popup__item span {
    font-family: 'Inter', sans-serif !important;
    font-size: 0.58rem !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    width: 100% !important;
    text-align: center !important;
    color: #A1A1AA !important;
}

.denub-orb .denub-orb-popup__menu .denub-orb-popup__item:active {
    background-color: #00A3FF !important;
    border-color: #00A3FF !important;
    transform: scale(0.94);
}
.denub-orb .denub-orb-popup__menu .denub-orb-popup__item:active i,
.denub-orb .denub-orb-popup__menu .denub-orb-popup__item:active span {
    color: #05070A !important;
    text-shadow: none !important;
}

/* --------------------------------------------------------------------------
   İZOLE KAPATMA BUTONU (Kendi Alanıyla Sınırlı, Ana Sayfayla Tam Uyumlu)
   -------------------------------------------------------------------------- */

.denub-orb .denub-orb-popup__close {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    padding: 0 !important;
    margin: 0 !important;
    
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    
    /* Ana Sayfadaki Kutuların Çerçeve Rengiyle Tam Eşitleme */
    background-color: rgba(20, 24, 33, 0.8) !important;
    border: 1px solid #1E293B !important; /* Tam uyum rengi */
    border-radius: 4px !important;
    color: #94A3B8 !important;
    
    font-family: Arial, sans-serif !important;
    font-size: 11px !important;
    font-weight: bold !important;
    line-height: 1 !important;
    
    /* Kesin Hitbox ve Katman Önceliği */
    z-index: 2000 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    
    transition: background-color 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

/* Sadece üzerine mouse ile gelindiğinde veya dokunulduğunda siber mavi ile parlar */
.denub-orb .denub-orb-popup__close:hover {
    background-color: rgba(0, 229, 255, 0.1) !important;
    border-color: #00E5FF !important;
    color: #00E5FF !important;
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.3) !important;
}

/* Animasyon Döngüleri */
@keyframes denub-orb-spin-clockwise {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}
@keyframes denub-orb-spin-counter {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(-360deg); }
}
@keyframes denub-color-flow {
    0% { background-position: 0% 50%; filter: hue-rotate(0deg); }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; filter: hue-rotate(360deg); }
}