:root{ 
    /* Genişliği 1100px yaptık ki 4 kasa yan yana tam sığsın */
    --w:1000px; 
    --primary: #c0392b; 
    --primary-hover: #e74c3c; 
    --dark-grey: #2c3e50;
    --btn-grey: #34495e;
    --bg: #0b0b10; 
    --card-bg: rgba(20, 20, 25, 0.85); 
    --header-h: 120px; 
}

*{box-sizing:border-box}

body{
    font-family: 'Rajdhani', sans-serif;
    margin:0; min-height:100vh; color:#eee; display:flex; flex-direction: column;
    background: url('https://4kwallpapers.com/images/wallpapers/waves-colorful-background-power-energy-neon-3840x2160-8224.png') no-repeat center center fixed;
    background-size: cover;
    background-color: var(--bg); 
}

/* --- HEADER DÜZENLEMELERİ --- */

header {
    width: 100%; 
    height: var(--header-h); 
    background: rgba(0, 0, 0, 0.4); 
    border-bottom: 2px solid #35101069;
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    padding: 0 40px; 
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.8); 
    position: relative; 
    z-index: 100;
    flex-shrink: 0; 
}

.brand-container { 
    display: flex; align-items: center; gap: 20px; 
    cursor: pointer; text-decoration: none; flex-shrink: 0; 
}

.brand-logo { 
    width: 80px; height: 80px; 
    border-radius: 12px; border: 2px solid var(--primary);
    object-fit: cover; background: #000;
    transition: all 0.3s ease;
}

.brand-text { display: flex; flex-direction: column; justify-content: center; line-height: 1; }

.brand-title { 
    font-size: 38px; font-weight: 800; color: #fff; letter-spacing: 1px; 
    text-shadow: 0 0 10px rgba(192, 57, 43, 0.5); white-space: nowrap;
}

.brand-subtitle { 
    font-size: 16px; font-weight: 600; color: var(--primary); 
    letter-spacing: 4px; margin-top: 4px; white-space: nowrap;
}

.user-panel { 
    display: flex; align-items: center; gap: 15px; flex-shrink: 0; 
}

.balance-box { 
    font-size: 18px; font-weight: 700; color: #fff; background: var(--dark-grey); 
    padding: 10px 20px; border-radius: 6px; border-left: 4px solid #27ae60; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.5); white-space: nowrap;
}
.balance-box span { color: #2ecc71; margin-left: 5px;}

.inv-btn-header {
    background: var(--btn-grey); border: 1px solid #444; padding: 10px 24px; color: #fff; font-weight: 700;
    border-radius: 6px; cursor: pointer; transition: 0.2s; font-size: 16px; font-family: 'Rajdhani', sans-serif; text-transform: uppercase; text-decoration: none; display: flex; align-items: center; white-space: nowrap;
}
.inv-btn-header:hover { background: var(--primary); border-color: var(--primary-hover); }

/* Header Metin Gizleme Ayarları (Mobil/Masaüstü) */
.desktop-text { display: inline; }
.mobile-text { display: none; }

/* --- RESPONSIVE / MOBİL AYARLARI --- */

/* Tablet (950px altı) */
@media (max-width: 950px) {
    :root { --w: 95vw; } 
    header { height: 90px; padding: 0 20px; }
    .brand-logo { width: 50px; height: 50px; border-radius: 8px; }
    .brand-title { font-size: 24px; }
    .brand-subtitle { font-size: 12px; letter-spacing: 2px; }
    .shell { padding: 15px; margin: 20px auto; width: 100%; max-width: 100%; }
    .viewport { width: 100%; max-width: 100%; margin: 0 auto; border-left: none; border-right: none; border-radius: 0; }
}

/* Mobil (Telefon - 600px altı) */
@media (max-width: 600px) {
    header { padding: 0 10px; height: 80px; }
    .brand-subtitle { display: none; } 
    .balance-box { font-size: 14px; padding: 6px 10px; }
    .inv-btn-header { font-size: 14px; padding: 6px 10px; }
    .user-panel { gap: 8px; }

    /* Header Metin Değişimi */
    .desktop-text { display: none; } /* Balance ve Inventory yazılarını gizle */
    .mobile-text { display: inline; } /* INV yazısını göster */

    /* Mobilde 3 skin sığması için slot küçültme */
    .slot { width: 110px; flex: 0 0 110px; } 
    .slot img { max-height: 70px; }
    
    .active-case-title { font-size: 24px; }
    .viewport { height: 180px; }
}

/* --- STANDART STİLLER --- */

.shell{
    width:var(--w); margin: 40px auto; display:flex; flex-direction:column; align-items:center; gap:20px; flex: 1;
    background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(15px); border-radius: 12px; padding: 30px; border: 1px solid rgba(80, 0, 0, 0.507); box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}

.catalog-container { width: 100%; display: flex; flex-direction: column; gap: 25px; margin-top: 10px;}
.category-row { width: 100%; position: relative; }
.category-title { font-size: 20px; font-weight: 700; margin-bottom: 12px; color: #fff; padding-left: 10px; border-left: 4px solid var(--primary); text-transform: uppercase;}
.slider-wrapper { position: relative; display: flex; align-items: center; }
.slider-track { display: flex; gap: 15px; overflow-x: auto; scroll-behavior: smooth; padding: 10px 5px; width: 100%; scrollbar-width: none; }
.slider-track::-webkit-scrollbar { display: none; }
.nav-btn { background: rgba(0,0,0,0.8); border: 1px solid #444; color: #fff; width: 35px; height: 100%; position: absolute; z-index: 10; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 24px; transition: 0.2s; }
.nav-btn:hover { background: var(--primary); border-color: var(--primary); }
.nav-left { left: -40px; top: 0; border-radius: 4px 0 0 4px;} .nav-right { right: -40px; top: 0; border-radius: 0 4px 4px 0;}

/* Case Card */
.case-card { 
    flex: 0 0 220px; height: 280px;   
    background: #1a1a20; border: 1px solid #333; border-radius: 6px; cursor: pointer; overflow: hidden; position: relative; transition: 0.2s; display: flex; flex-direction: column; align-items: center; text-decoration: none; 
}
.case-card:hover{transform: translateY(-5px); border-color: var(--primary); box-shadow: 0 0 15px rgba(192, 57, 43, 0.4);}
.case-card img{ width:100%; height: 180px; object-fit:cover; background: #111; border-bottom: 1px solid #222; }

/* Kasa bilgi alanı dikey olarak daraltıldı */
.case-info { padding: 5px 10px; text-align: center; width: 100%; display: flex; flex-direction: column; justify-content: center; flex: 1; }

.case-name {font-size: 18px; font-weight: 700; color: #eee; margin-bottom: 0px;}
.case-price {color: #f1c40f; font-weight:bold; font-size: 18px;}

.active-case-title { font-size: 32px; font-weight: 800; color: #fff; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 10px; text-shadow: 0 0 15px var(--primary); display: block; }

/* Viewport */
.viewport{
    width: 800px; height: 260px; 
    overflow:hidden; border-radius:8px; background:linear-gradient(180deg, #15151a, #0a0a0e); box-shadow: inset 0 0 30px rgba(0,0,0,0.8); position:relative; margin: 0 auto; border: 2px solid #333; display:block;
}
.strip{display:flex; align-items:center; height:100%; will-change:transform; position: relative; z-index: 1;} 

/* Slot */
.slot{
    width:180px; flex:0 0 180px; 
    height:100%; display:flex; align-items:center; justify-content:center; position:relative; padding-bottom:10px; transition: 0.3s;
}
.slot img{
    width: auto; height: auto; max-width: 90%; max-height: 110px; 
    object-fit:contain; filter: drop-shadow(0 5px 5px rgba(0,0,0,0.5)); 
    transition: transform 0.3s; position: relative; z-index: 2;
}
.rarity-bar{position:absolute; bottom:20px; left:10px; right:10px; height:4px; border-radius:4px; box-shadow:0 0 5px; z-index: 2;}

/* Effects */
@keyframes shineSweep { 0% { left: -100%; opacity: 0; } 30% { opacity: 0.5; } 100% { left: 200%; opacity: 0; } }
@keyframes backlightFadeIn { 0% { opacity: 0; transform: scale(0.8); } 100% { opacity: 0.4; transform: scale(1); } }

.winner-slot { z-index: 50 !important; border-radius: 8px; transform: scale(1); background: transparent; border: none; box-shadow: none; position: relative; overflow: hidden; }
.winner-slot::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: radial-gradient(circle at center, var(--win-color) 0%, transparent 45%); opacity: 0; z-index: 0; animation: backlightFadeIn 0.8s ease-out forwards; }
.winner-slot::after { content: ""; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.4), transparent ); transform: skewX(-20deg); z-index: 3; animation: shineSweep 0.7s ease-out forwards; }

.radial-blur-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 10; pointer-events: none; backdrop-filter: blur(1px); mask-image: radial-gradient(circle at center, transparent 0%, transparent 80px, black 300px); -webkit-mask-image: radial-gradient(circle at center, transparent 0%, transparent 70px, black 200px); }
.center-halo { pointer-events: none; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); height: 75%; width: 3px; z-index: 100; background: linear-gradient(to bottom, transparent, #f1c40f 20%, #f1c40f 80%, transparent); box-shadow: 0 0 15px #f1c40f; border-radius: 2px; }
.selector-arrow { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 12px solid transparent; border-right: 12px solid transparent; border-top: 18px solid #f1c40f; z-index: 101; filter: drop-shadow(0 4px 5px rgba(0,0,0,0.8)); }

.inventory-view{display:grid; width: 100%; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; max-height: 450px; overflow-y: auto; padding: 15px; background: rgba(0,0,0,0.4); border-radius: 8px; border: 1px solid #333;}
.inv-item{background: #222; border-radius:6px; padding:10px; display:flex; flex-direction:column; align-items:center; position:relative; border:1px solid #333; transition: 0.2s;}
.inv-item:hover { border-color: #666; }
.inv-item img{width:80px; height:70px; object-fit:contain; margin-bottom: 5px;}
.inv-item .name{font-size: 13px; color: #fff; text-align: center; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; font-weight: 600;}
.inv-item .val{font-size: 13px; color: #aaa; margin-bottom: 8px;}

/* Preview */
.preview-strip{display:flex; gap:15px; justify-content:center; margin-top:15px; flex-wrap:wrap;}
.preview-strip .pimg{ width:110px; height:110px; display:flex; align-items:center; justify-content:center; background:rgba(0,0,0,0.5); border-radius:6px; border:1px solid rgba(255,255,255,0.1); position:relative; }
.preview-strip img{ width: auto; height: auto; max-width: 90%; max-height: 80px; object-fit:contain; }
.preview-rarity{position:absolute; bottom:0; left:0; right:0; height:4px; border-radius: 0 0 6px 6px;}
.chance-badge{ position: absolute; top: 0; left: 0; background: rgba(41, 128, 185, 0.9); color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 6px 0 6px 0; font-weight: bold; }
.price-badge{ position: absolute; top: 0; right: 0; background: rgba(39, 174, 96, 0.9); color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 0 6px 0 6px; font-weight: bold; }

.controls{display:flex; gap:12px; align-items:center; justify-content:center; margin-top:20px; flex-wrap: wrap;}
.action-btn{ background: var(--btn-grey); border: 1px solid #444; padding: 12px 30px; border-radius: 4px; color:#fff; font-weight: 800; cursor:pointer; font-size: 18px; font-family: 'Rajdhani', sans-serif; text-transform: uppercase; letter-spacing: 1px; transition: 0.2s; box-shadow: 0 4px 0 #222; }
.action-btn:active { transform: translateY(4px); box-shadow: none; }
.action-btn:hover{background: #465f75; border-color: #555;}
.action-btn:disabled{opacity:0.5; cursor: not-allowed; transform: none; box-shadow: none; background: #222;}
#openBtn { background: var(--primary); border-color: #a93226; box-shadow: 0 4px 0 #7b241c;}
#openBtn:hover { background: var(--primary-hover); }
.sell-btn{background: var(--dark-grey); font-size: 12px; padding: 5px 10px; border: 1px solid #444; color: #fff; cursor: pointer; width: 100%; border-radius: 4px; font-weight: bold; font-family: 'Rajdhani', sans-serif;}
.sell-btn:hover{background: var(--primary); border-color: var(--primary);}
.sell-all-btn { background: var(--primary); border-color: #a93226; box-shadow: 0 4px 0 #7b241c;}
.sell-all-btn:hover { background: var(--primary-hover); }
.bonus-btn { background: #27ae60; border-color: #1e8449; box-shadow: 0 4px 0 #196f3d; width: 150px;}
.bonus-btn:hover { background: #2ecc71; }
.reset-btn { background: #7f8c8d; border-color: #626567; box-shadow: 0 4px 0 #424949; }
.reset-btn:hover { background: #e67e22; border-color: #d35400; }

.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(5px); display: none; align-items: center; justify-content: center; z-index: 2000; }
.modal-box { background: #1a1a20; border: 2px solid var(--primary); border-radius: 12px; padding: 30px; width: 400px; text-align: center; box-shadow: 0 0 30px rgba(192, 57, 43, 0.3); animation: popIn 0.3s ease-out; }
@keyframes popIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-title { font-size: 24px; color: #fff; font-weight: 800; margin-bottom: 10px; text-transform: uppercase; }
.modal-desc { font-size: 16px; color: #ccc; margin-bottom: 25px; }
.modal-actions { display: flex; gap: 15px; justify-content: center; }
.modal-btn { padding: 10px 20px; border: none; border-radius: 4px; font-weight: bold; font-family: 'Rajdhani', sans-serif; cursor: pointer; text-transform: uppercase; font-size: 16px; }
.btn-cancel { background: #444; color: #fff; border: 1px solid #555; }
.btn-cancel:hover { background: #555; }
.btn-confirm { background: var(--primary); color: #fff; border: 1px solid var(--primary-hover); box-shadow: 0 0 10px rgba(192, 57, 43, 0.5); }
.btn-confirm:hover { background: var(--primary-hover); }

.toast{position:fixed; top:90px; left:50%; transform:translateX(-50%); padding:12px 24px; border-radius:30px; color:#fff; font-weight:bold; display:none; z-index: 2100; box-shadow: 0 5px 15px rgba(0,0,0,0.5); font-family: 'Rajdhani', sans-serif; letter-spacing: 1px;}

footer{font-size:14px; color:#666; margin-top:30px; text-align:center; padding-bottom: 20px;}

/* Privacy & Cookie CSS */
#privacyModal .modal-desc { text-align: left; font-size: 14px; max-height: 300px; overflow-y: auto; padding-right: 10px;}
#privacyModal ::-webkit-scrollbar { width: 5px; }
#privacyModal ::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 10px; }

.footer-link { color: var(--primary); text-decoration: none; font-weight: bold; cursor: pointer; transition: 0.2s; }
.footer-link:hover { color: #fff; text-decoration: underline; }

.cookie-banner {
    position: fixed; bottom: -100px; left: 0; width: 100%;
    background: rgba(15, 15, 20, 0.95); border-top: 2px solid var(--primary);
    padding: 20px; z-index: 5000; display: flex; align-items: center; justify-content: center; gap: 20px;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.8); transition: bottom 0.5s ease-out;
}
.cookie-text { font-size: 14px; color: #ccc; max-width: 600px; line-height: 1.4; }
.cookie-btn {
    background: var(--primary); color: #fff; border: none; padding: 8px 20px;
    font-family: 'Rajdhani', sans-serif; font-weight: bold; cursor: pointer; border-radius: 4px; font-size: 14px;
    white-space: nowrap;
}
.cookie-btn:hover { background: var(--primary-hover); }
.cookie-visible { bottom: 0; }
/* --- Background Changer Butonu --- */
.bg-btn {
    background: linear-gradient(45deg, #8e44ad, #c0392b);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 8px 15px;
    border-radius: 20px;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
    margin-right: 15px; /* Kullanıcı panelinden biraz uzak dursun */
    box-shadow: 0 0 10px rgba(192, 57, 43, 0.5);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.bg-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(142, 68, 173, 0.8);
    background: linear-gradient(45deg, #c0392b, #8e44ad);
}

/* Mobilde butonu biraz küçültelim */
@media (max-width: 600px) {
    .bg-btn { padding: 5px 10px; font-size: 11px; margin-right: 5px; }
}