:root{
  --top:#BE3FB6;
  --top2:#D34BD3;
  --bg:#51245F;
  --bg2:#3A1D4B;
  --card:rgba(255,255,255,.10);
  --line:rgba(255,255,255,.12);
  --text:#fff;
  --muted:rgba(255,255,255,.75);
  --shadow:0 16px 40px rgba(0,0,0,.28);
  --r:18px;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family:system-ui,Segoe UI,Roboto,Arial;
  color:var(--text);
  background: radial-gradient(1200px 900px at 50% -200px, #7A2AAE 0%, var(--bg) 40%, var(--bg2) 100%);
}
a{color:inherit}

.app{max-width:520px;margin:0 auto;min-height:100vh;padding-bottom:90px}

.topbar{
  padding:18px 18px 14px;
  background:linear-gradient(180deg,var(--top2),var(--top));
  border-bottom-left-radius:26px;
  border-bottom-right-radius:26px;
  box-shadow:0 12px 30px rgba(0,0,0,.22);
  display:flex;align-items:center;justify-content:space-between;gap:12px
}
.brand{display:flex;gap:10px;align-items:center}
.brand .icon{width:40px;height:40px;border-radius:14px;background:rgba(255,255,255,.18);display:grid;place-items:center}
.brand .title{font-weight:900;font-size:22px;line-height:1.05}
.brand .sub{font-size:12.5px;color:rgba(255,255,255,.82)}
.wallet{
  padding:8px 12px;border-radius:999px;
  background:rgba(255,255,255,.16);
  border:1px solid rgba(255,255,255,.18);
  font-weight:900;
}

.content{padding:14px 16px 18px}

.tabs{display:flex;gap:12px;margin:8px 0 14px}
.tab{
  flex:1;border:0;cursor:pointer;color:rgba(255,255,255,.88);
  padding:12px 14px;border-radius:16px;
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.12);
  font-weight:800;
  transition:transform .12s ease, background .12s ease;
}
.tab:active{transform:scale(.98)}
.tab.active{background:rgba(255,255,255,.18)}
.tab.vip{box-shadow:0 0 12px rgba(255,215,0,.35)}

.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:22px;
  box-shadow:0 14px 34px rgba(0,0,0,.18);
  padding:14px;
}

.reward{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  background:linear-gradient(90deg,#F4B300 0%, #FF7A2A 55%, #FF5B6A 110%);
  border:0; box-shadow:var(--shadow);
}
.reward b{font-size:16px}
.reward small{display:block;margin-top:4px;color:rgba(255,255,255,.92)}
.reward button{
  border:0;cursor:pointer;min-width:62px;height:44px;border-radius:999px;
  background:rgba(255,255,255,.92);color:#8A2A6E;font-weight:900;
  box-shadow:0 12px 25px rgba(0,0,0,.18);
}
.reward button:active{transform:scale(.98)}

.h2{display:flex;align-items:center;gap:10px;font-weight:950;font-size:20px;margin:16px 2px 10px}
.h2 .star{opacity:.95}

.grid2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.pill{
  display:flex;align-items:center;justify-content:space-between;
  padding:10px 12px;border-radius:999px;
  background:linear-gradient(180deg, rgba(255,255,255,.18), rgba(0,0,0,.06));
  border:1px solid rgba(255,255,255,.14);
  box-shadow:0 10px 25px rgba(0,0,0,.18);
  cursor:pointer;user-select:none;
  transition:transform .12s ease;
}
.pill:active{transform:scale(.99)}
.pill .left{display:flex;align-items:center;gap:10px}
.pill .ico{width:26px;height:26px;border-radius:10px;background:rgba(0,0,0,.18);display:grid;place-items:center}
.pill .name{font-weight:950}
.pill .tag{font-size:12px;color:rgba(255,255,255,.75)}
.pill .cta{font-weight:950;padding:6px 10px;border-radius:999px;background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.14)}

.friendRow{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:12px;border-radius:18px;background:rgba(0,0,0,.10);
  border:1px solid rgba(255,255,255,.10);
}
.friendLeft{display:flex;align-items:center;gap:12px}
.avatar{width:40px;height:40px;border-radius:999px;background:rgba(255,255,255,.16);display:grid;place-items:center;position:relative}
.dot{width:10px;height:10px;border-radius:999px;background:#2DFF7A;position:absolute;right:2px;bottom:2px;border:2px solid rgba(0,0,0,.25)}
.joinBtn{
  border:0;cursor:pointer;padding:10px 14px;border-radius:999px;
  background:linear-gradient(90deg,#FF59C7,#9B5CFF);
  color:#fff;font-weight:950;box-shadow:0 10px 22px rgba(0,0,0,.22);
}
.joinBtn:active{transform:scale(.98)}

.bottomNav{
  position:fixed;left:50%;transform:translateX(-50%);
  bottom:0;width:min(520px,100%);
  padding:12px 12px 18px;
  background:rgba(10,8,20,.92);
  border-top:1px solid rgba(255,255,255,.10);
  backdrop-filter:blur(12px);
  display:flex;align-items:flex-end;justify-content:space-between;gap:6px;
}
.navItem{
  flex:1;border:0;background:transparent;color:rgba(255,255,255,.75);
  display:flex;flex-direction:column;align-items:center;gap:6px;
  cursor:pointer;padding:8px 6px;font-size:11.5px;text-decoration:none;
}
.navItem.active{color:#fff}
.navFab{
  width:58px;height:58px;border-radius:999px;border:0;cursor:pointer;
  background:linear-gradient(180deg,#FF5BBE,#B14CFF);
  box-shadow:0 18px 36px rgba(0,0,0,.30);
  transform:translateY(-18px);
  display:grid;place-items:center;
}
.navFab span{font-size:22px;font-weight:950}

.pageHeader{display:flex;align-items:center;gap:10px;padding:12px 16px}
.back{color:#fff;text-decoration:none;font-weight:900}

.chatBox{
  height:58vh;overflow:auto;
  padding:10px;margin:0 16px;
  background:rgba(0,0,0,.12);
  border-radius:16px;border:1px solid rgba(255,255,255,.10);
}
.chatInputRow{display:flex;gap:10px;padding:12px 16px}
.chatInputRow input{
  flex:1;border-radius:14px;border:1px solid rgba(255,255,255,.15);
  background:rgba(255,255,255,.08);color:#fff;padding:12px;
}
.typing{padding:0 16px 8px;color:rgba(255,255,255,.7);font-size:12px;min-height:18px}

.vipCard{
  margin:16px;
  padding:16px;
  border-radius:22px;
  background:linear-gradient(180deg, rgba(255,215,0,.22), rgba(255,255,255,.08));
  border:1px solid rgba(255,215,0,.35);
  box-shadow:var(--shadow);
}
.vipCard h2{margin:0 0 8px}
.vipCard ul{margin:10px 0 14px;padding-left:18px;color:rgba(255,255,255,.88)}
.vipCard button{width:100%}

.badge{
  display:inline-block;
  padding:2px 8px;border-radius:999px;
  font-size:11px;font-weight:900;
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.12);
}
.badge.vip{background:linear-gradient(45deg,#FFD700,#FF8C00);border:0;color:#2a123a}

.fadeIn{animation:fadeSlide .25s ease}
@keyframes fadeSlide{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
.page-header{
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px;
}

.back-btn{
  font-size:22px;
  text-decoration:none;
  color:#fff;
}
/* ================= CHAT GENEL YAPI ================= */
.chat-wrapper{
  max-width: 420px;
  margin: 0 auto;
  padding: 12px;
}

/* ================= MESAJ ALANI ================= */
.chat-box{
  height: calc(100vh - 200px);
  overflow-y: auto;
  padding: 12px;
  background: rgba(255,255,255,0.05);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ================= MESAJ BALONU ================= */
.msg{
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 14px;
  word-wrap: break-word;
}

/* kendi mesajın (ileride ayırmak için hazır) */
.msg.me{
  align-self: flex-end;
  background: linear-gradient(135deg,#ff6ad5,#9b5cff);
}

/* diğerleri */
.msg:not(.me){
  align-self: flex-start;
}

/* ================= INPUT ALANI ================= */
.chat-input{
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.chat-input input{
  flex: 1;
  padding: 10px;
  border-radius: 14px;
  border: none;
  outline: none;
}

.chat-input button{
  padding: 0 14px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg,#ff6ad5,#9b5cff);
  color: #fff;
  cursor: pointer;
}

/* ================= EMOJI PANEL ================= */
.emoji-panel{
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: #2a123a;
  padding: 10px;
  border-radius: 16px;
  display: grid;
  grid-template-columns: repeat(6,1fr);
  gap: 6px;
  z-index: 9999;
}

.emoji-panel button{
  background: transparent;
  border: none;
  font-size: 22px;
  cursor: pointer;
}
/* ===== PM AYRIM ===== */

.msg.other{
  align-self: flex-start;
  background: rgba(255,255,255,0.12);
}

.msg.me{
  align-self: flex-end;
  background: linear-gradient(135deg,#ff6ad5,#9b5cff);
}

.pm-author{
  font-size: 11px;
  opacity: .75;
  margin-bottom: 4px;
}

.pm-text{
  font-size: 14px;
}

.pm-del{
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  margin-top: 4px;
}
.clear-btn{
  background:#ff3b3b;
  color:#fff;
  border:none;
  padding:6px 10px;
  border-radius:10px;
  cursor:pointer;
  margin-bottom:8px;
}
.top-badges{display:flex;gap:8px;align-items:center}
.badge{background:rgba(255,255,255,.12);padding:6px 10px;border-radius:10px;font-size:13px}
.online-list{display:flex;flex-direction:column;gap:6px;margin-top:8px}
.online-user{background:rgba(255,255,255,.08);padding:8px 10px;border-radius:10px}
.muted{opacity:.7;font-size:13px;padding:8px}

.pm-meta{display:flex;gap:8px;align-items:center;justify-content:flex-end;margin-top:6px}
.ticks{font-size:12px;opacity:.75}

.pm-typing{opacity:.75;font-size:13px;margin:6px 0 8px 0}

.msg.me{position:relative}
.msg.me.vip{box-shadow:0 0 12px rgba(255,215,0,.35)}

.chat-input{
  position: sticky;
  bottom: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(10px);
  padding-bottom: env(safe-area-inset-bottom);
}

.chat-box{
  scroll-behavior: smooth;
  padding-bottom: 90px;
}

.chat-input button{min-width:44px;min-height:44px}
.chat-input input{min-height:44px}

/* ===== SELECT (PM + HEDİYE) DARK FIX ===== */
select{
  background: rgba(255,255,255,.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,.15);
}

select option{
  background: #2a123a;
  color: #fff;
}

/* online/offline nokta için görsel */
.option-online::before{
  content:"🟢 ";
}
.option-offline::before{
  content:"🔴 ";
}

/* 🎮 OYUNLAR */
.games {
  margin-top: 20px;
}

.section-title {
  font-size: 18px;
  margin-bottom: 12px;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.game-card {
  background: rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 14px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.game-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.game-name {
  font-weight: 600;
  margin-bottom: 4px;
}

.game-desc {
  font-size: 12px;
  opacity: 0.7;
  margin-bottom: 10px;
}

.game-btn {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  background: linear-gradient(135deg,#ff5ec4,#6a5cff);
  color: #fff;
  font-size: 13px;
  text-decoration: none;
}

.card-wrap{
  position: relative;
  display: inline-block;
}

.card-wrap img{
  width:120px;
}

.card-label{
  position:absolute;
  top:10px;
  left:10px;
  font-size:32px;
  font-weight:900;
  text-shadow:0 0 6px #000;
}

.card-label.red{ color:#ff4d4d; }
.card-label.black{ color:#fff; }

/* ================= MOBİL TAŞMA DÜZELTMELERİ ================= */

/* Emoji panelinin ekrana sığması için */
.emoji-panel {
    position: fixed !important;
    bottom: 90px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 90% !important;
    max-width: 320px !important;
    grid-template-columns: repeat(6, 1fr) !important; /* Yan yana 6 emoji */
    max-height: 200px !important;
    overflow-y: auto !important;
    z-index: 99999 !important;
    background: #2a123a !important;
    border: 2px solid #ff6ad5 !important;
}

/* Hediye Vitrininin (Profildeki) yana kayması için */
.gift-showcase {
    display: flex !important;
    gap: 10px !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    padding: 10px !important;
    -webkit-overflow-scrolling: touch !important; /* Mobilde kaydırma hissi */
}

.gift-item {
    flex: 0 0 70px !important; /* Kutuların küçülmesini engeller */
    min-width: 70px !important;
    text-align: center !important;
}

/* Mobilde inputlara tıklayınca ekranın yakınlaşmasını engeller */
input, select, textarea {
    font-size: 16px !important;
}

/* PROFİL HEDİYE KAYDIRMA SİSTEMİ */
.gift-showcase {
    display: flex !important;           /* Yan yana diz */
    flex-wrap: nowrap !important;       /* Alt satıra geçme (Kritik!) */
    overflow-x: auto !important;        /* Sağa kaydırmayı aç */
    overflow-y: hidden !important;      /* Yukarı kaymayı kapat */
    padding: 10px 5px !important;
    gap: 12px !important;               /* Kutuların arası */
    -webkit-overflow-scrolling: touch !important; /* iPhone'da akıcı kaydırma */
    scrollbar-width: none;              /* Modern tarayıcılarda çubuğu gizle */
}

.gift-showcase::-webkit-scrollbar {
    display: none;                      /* Chrome/Safari'de çubuğu gizle */
}

.gift-item {
    flex: 0 0 75px !important;          /* Kutular küçülmesin, 75px'de sabit kalsın */
    max-width: 75px !important;
    min-width: 75px !important;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 10px 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* EMOJI PANELİ MOBİL TASARIM */
.emoji-panel {
    position: fixed !important;
    bottom: 80px !important; /* Sohbet inputunun hemen üstü */
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 92% !important;
    max-width: 350px !important;
    height: 220px !important; /* Yükseklik sabitlendi */
    background: #2a123a !important;
    border: 2px solid #be3fb6 !important;
    border-radius: 20px !important;
    padding: 12px !important;
    display: grid !important;
    grid-template-columns: repeat(6, 1fr) !important; /* Yan yana 6 emoji */
    gap: 8px !important;
    overflow-y: auto !important; /* Aşağı doğru kaydırma */
    z-index: 99999 !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6) !important;
}

/* Emoji butonları */
.emoji-btn, .emoji-panel button {
    background: rgba(255,255,255,0.05) !important;
    border: none !important;
    font-size: 24px !important;
    padding: 8px 0 !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
}

.emoji-panel button:active {
    background: #be3fb6 !important;
    transform: scale(1.1);
}

/* Kaydırma çubuğunu güzelleştir */
.emoji-panel::-webkit-scrollbar {
    width: 5px;
}
.emoji-panel::-webkit-scrollbar-thumb {
    background: #be3fb6;
    border-radius: 10px;
}

.emoji-panel {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    max-height: 150px !important; /* Panel çok uzamasın */
    overflow-y: auto !important;  /* Eğer emojiler artarsa kendi içinde kaysın */
    background: #2a123a;
    border: 1px solid #be3fb6;
    border-radius: 12px;
}