/* Hediye — TikTok tarzı sol üst ticker + picker */
.gift-ticker-feed {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 11;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: min(320px, 78vw);
  pointer-events: none;
}
.gift-ticker-feed--room {
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  justify-content: flex-end;
}

/* Oda — büyük hediye şöleni (sesli konuk alanı ile yazı alanı arası) */
.room-big-gift-layer {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 14;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.room-big-gift-fx {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.72);
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.room-big-gift-fx.is-active {
  opacity: 1;
  transform: scale(1);
}
.room-big-gift-fx.is-out {
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.room-big-gift-glow {
  position: absolute;
  inset: 5% 10%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(124, 58, 237, 0.45) 0%, rgba(245, 158, 11, 0.15) 40%, transparent 72%);
  animation: roomBigGiftPulse 2s ease-in-out infinite;
}
@keyframes roomBigGiftPulse {
  0%, 100% { transform: scale(0.95); opacity: 0.75; }
  50% { transform: scale(1.05); opacity: 1; }
}
.room-big-gift-media {
  position: relative;
  z-index: 2;
  max-width: min(72vw, 420px);
  max-height: min(52vh, 380px);
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 12px 40px rgba(0, 0, 0, 0.45));
  animation: roomBigGiftFloat 2.4s ease-in-out infinite;
}
@keyframes roomBigGiftFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.room-big-gift-media img,
.room-big-gift-media video {
  max-width: 100%;
  max-height: min(52vh, 380px);
  object-fit: contain;
}
.room-big-gift-combo {
  position: relative;
  z-index: 3;
  margin-top: 10px;
  padding: 6px 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.5);
}
.room-big-gift-combo-pop {
  animation: giftComboPop 0.35s ease;
}
.room-big-gift-caption {
  position: relative;
  z-index: 3;
  margin-top: 12px;
  padding: 8px 16px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  max-width: 92%;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.room-big-gift-caption strong { color: #fde68a; }
.room-big-gift-arrow { margin: 0 6px; opacity: 0.8; }
.room-big-gift-name { color: #c4b5fd; font-weight: 500; }

.gift-picker-item.is-big-gift {
  border-color: rgba(245, 158, 11, 0.55);
}
.gift-picker-big-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 6px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
}
.gift-picker-item { position: relative; }
.gift-ticker-feed--pm {
  top: 8px;
  left: 8px;
  z-index: 5;
  max-width: min(280px, 92%);
}
.gift-ticker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 6px;
  border-radius: 28px;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.82) 0%, rgba(15, 23, 42, 0.55) 72%, transparent 100%);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  min-height: 48px;
}
.gift-ticker-item.tier-rare {
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.25);
}
.gift-ticker-item.tier-legendary {
  border-color: rgba(245, 158, 11, 0.55);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.35);
}
.gift-ticker-enter {
  animation: giftTickerSlideIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.gift-ticker-exit {
  animation: giftTickerSlideOut 0.38s ease forwards;
}
.gift-ticker-pulse {
  animation: giftTickerPulse 0.5s ease;
}
@keyframes giftTickerSlideIn {
  from { opacity: 0; transform: translateX(-28px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes giftTickerSlideOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(-20px); }
}
@keyframes giftTickerPulse {
  0%, 100% { transform: scale(1); }
  40% { transform: scale(1.03); }
}
.gift-ticker-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
}
.gift-ticker-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gift-ticker-body {
  flex: 1;
  min-width: 0;
  line-height: 1.25;
}
.gift-ticker-line1 {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gift-ticker-sender { color: #fde68a; }
.gift-ticker-arrow {
  margin: 0 4px;
  opacity: 0.75;
  font-weight: 400;
}
.gift-ticker-recipient { color: #e0e7ff; }
.gift-ticker-line2 {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.72);
  margin-top: 2px;
}
.gift-ticker-giftname { font-weight: 600; }
.gift-ticker-qty {
  margin-left: 4px;
  color: #fbbf24;
  font-weight: 700;
}
.gift-ticker-gift {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gift-ticker-gift img,
.gift-ticker-gift video {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}
.gift-ticker-fallback { font-size: 28px; }
.gift-ticker-combo {
  position: absolute;
  right: -6px;
  bottom: -4px;
  min-width: 26px;
  padding: 2px 7px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.45);
}
.gift-ticker-combo-pop {
  animation: giftComboPop 0.35s ease;
}
@keyframes giftComboPop {
  0% { transform: scale(0.6); }
  55% { transform: scale(1.2); }
  100% { transform: scale(1); }
}
.gift-ticker-item.tier-legendary .gift-ticker-gift img,
.gift-ticker-item.tier-legendary .gift-ticker-gift video {
  animation: giftLegendWiggle 0.6s ease;
}
@keyframes giftLegendWiggle {
  0%, 100% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(-8deg) scale(1.08); }
  75% { transform: rotate(8deg) scale(1.08); }
}

.gift-picker-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 26000;
  padding: 0 12px 12px;
  animation: chipFadeIn 0.2s ease;
}
@media (min-width: 640px) {
  .gift-picker-overlay {
    align-items: center;
    padding: 16px;
  }
}
.gift-picker-panel {
  width: min(520px, 100%);
  max-height: min(85vh, 640px);
  background: var(--bg-white, #fff);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
@media (min-width: 640px) {
  .gift-picker-panel {
    border-radius: 16px;
    animation: chipSlideUp 0.25s ease;
  }
}
.gift-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(135deg, #4f6ef7 0%, #7c3aed 55%, #a855f7 100%);
  color: #fff;
}
.gift-picker-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}
.gift-picker-balance {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}
.gift-picker-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gift-picker-target {
  padding: 8px 16px;
  font-size: 13px;
  color: var(--text-muted, #64748b);
  border-bottom: 1px solid var(--border, #e2e8f0);
}
.gift-picker-vault-hint {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent, #6366f1);
}
.gift-picker-pm-hint {
  font-size: 12px;
  font-weight: 500;
  color: var(--success, #16a34a);
}
.gift-picker-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border, #e2e8f0);
}
.gift-picker-tab {
  flex: 1;
  padding: 8px;
  border: none;
  background: var(--bg-light, #f1f5f9);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-dark, #334155);
}
.gift-picker-tab.active {
  background: var(--accent-light, #e8eaf6);
  color: var(--accent, #4f6ef7);
}
.gift-picker-preview {
  padding: 12px 16px;
  text-align: center;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.gift-picker-preview img,
.gift-picker-preview video {
  max-height: 88px;
  max-width: 120px;
  object-fit: contain;
}
.gift-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 8px 12px 12px;
  overflow-y: auto;
  flex: 1;
  min-height: 120px;
}
.gift-picker-item {
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 8px 4px;
  cursor: pointer;
  text-align: center;
  background: var(--bg-light, #f8fafc);
  transition: border-color 0.15s, transform 0.15s;
}
.gift-picker-item:hover { transform: scale(1.03); }
.gift-picker-item.selected {
  border-color: var(--accent, #4f6ef7);
  background: var(--accent-light, #eef2ff);
}
.gift-picker-item img,
.gift-picker-item video {
  width: 48px;
  height: 48px;
  object-fit: contain;
  margin: 0 auto 4px;
  display: block;
}
.gift-picker-item-name {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.2;
}
.gift-picker-item-price {
  font-size: 10px;
  color: var(--accent, #4f6ef7);
  font-weight: 700;
}
.gift-picker-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border, #e2e8f0);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.gift-picker-qty {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.gift-picker-qty label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  white-space: nowrap;
}
.gift-qty-input {
  width: 72px;
  padding: 8px 10px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  background: var(--bg-white, #fff);
  font-weight: 700;
  font-size: 15px;
  text-align: center;
  color: var(--text-dark, #1e293b);
}
.gift-qty-input:focus {
  outline: none;
  border-color: var(--accent, #4f6ef7);
  box-shadow: 0 0 0 2px rgba(79, 110, 247, 0.2);
}
.gift-send-btn {
  flex: 1;
  min-width: 120px;
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #4f6ef7, #7c3aed);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.gift-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
.gift-picker-close {
  cursor: pointer;
}
.composer-btn-gift.active { color: var(--accent, #4f6ef7); }
.pm-gift-header-btn {
  border: none;
  background: rgba(79, 110, 247, 0.12);
  color: var(--accent, #4f6ef7);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  margin-right: 6px;
}
.pm-gift-header-btn.visible { display: flex; }

.gift-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.gift-admin-card {
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-white, #fff);
}
.gift-admin-preview {
  position: relative;
  height: 140px;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gift-admin-preview img,
.gift-admin-preview-vid {
  max-height: 120px;
  max-width: 100%;
  object-fit: contain;
}
.gift-admin-preview-empty { font-size: 48px; opacity: 0.4; }
.gift-admin-upload-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
}
.gift-admin-body { padding: 12px; }
.gift-admin-actions { display: flex; gap: 8px; margin-top: 8px; }

.chip-gift-history {
  padding: 8px 0;
}
.chip-gift-history-item {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border, #e2e8f0);
  font-size: 13px;
}
.chip-gift-history-item:last-child { border-bottom: none; }
