/* ============================================================ */
/* LOCALLY BUNDLED ARCADE DISPLAY FONTS (ZERO NETWORK / OFFLINE) */
/* ============================================================ */
@font-face {
  font-family: 'Titan One';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url('./assets/fonts/titan_one_latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Titan One';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url('./assets/fonts/titan_one_latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Lilita One';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url('./assets/fonts/lilita_one_latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Lilita One';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url('./assets/fonts/lilita_one_latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'FalmigoArcadeBlack';
  font-style: normal;
  font-weight: 900;
  font-display: block;
  src: url('./assets/fonts/rubik_latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'FalmigoArcadeBlack';
  font-style: normal;
  font-weight: 900;
  font-display: block;
  src: url('./assets/fonts/rubik_latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==========================================================================
   FALMIGO CENTRALIZED STYLESHEET (App Saray UI + Web Cosmic UI)
   Generated & shared across index.html, app.html, and web.html
   ========================================================================== */
:root,
html[data-view="app"] {
  --osm-bg: 11 19 43;
  --osm-card: 17 28 56;
  --osm-card-elevated: 25 40 77;
  --osm-input: 13 22 46;
  --osm-gold: 245 184 46;
  --osm-gold-light: 253 236 176;
  --osm-gold-dark: 168 125 23;
  --osm-border: 54 79 132;
  --osm-crimson: 102 18 32;
  --osm-emerald: 18 102 79;
}

html[data-view="web"] {
  --osm-bg: 7 9 22;
  --osm-card: 14 20 40;
  --osm-card-elevated: 22 31 60;
  --osm-input: 9 13 30;
  --osm-gold: 245 184 46;
  --osm-gold-light: 253 236 176;
  --osm-gold-dark: 168 125 23;
  --osm-border: 34 43 82;
  --osm-crimson: 102 18 32;
  --osm-emerald: 16 185 129;
}

* {

-webkit-tap-highlight-color: transparent;

box-sizing: border-box;

}

body {

font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

background-color: #070E22;

background-image:

radial-gradient(circle at 50% 15%, rgba(245, 184, 46, 0.22) 0%, rgba(16, 34, 76, 0.55) 55%, rgba(7, 14, 34, 0.88) 100%),

url('./assets/bg_palace.jpg');

background-size: cover;

background-position: center;

background-attachment: fixed;

color: #F8F5F2;

}

/* Mobil ve dokunmatik ekranlarda background-attachment:fixed GPU kiremit birlestirmeyi (tiled compositing)
   kapattigi icin her kaydirmada tam ekran repaint olusturur; scroll yapilarak 120Hz akici kaydirma saglanir. */
@media (max-width: 1024px), (hover: none) {
  body {
    background-attachment: scroll;
  }
}

.custom-scrollbar::-webkit-scrollbar {

width: 5px;

height: 5px;

}

.custom-scrollbar::-webkit-scrollbar-thumb {

background: #5E264D;

border-radius: 6px;

}

.scrollbar-none::-webkit-scrollbar,

::-webkit-scrollbar {

display: none !important;

width: 0 !important;

height: 0 !important;

}

.scrollbar-none,

div {

-ms-overflow-style: none !important;

scrollbar-width: none !important;

}

.gold-box-shadow {

box-shadow: 0 4px 20px rgba(245, 184, 46, 0.28);

}

/* Screen reader only helper */

.sr-only {

display: none !important;

position: absolute !important;

width: 1px !important;

height: 1px !important;

padding: 0 !important;

margin: -1px !important;

overflow: hidden !important;

clip: rect(0, 0, 0, 0) !important;

white-space: nowrap !important;

border-width: 0 !important;

}

/* Block Blast Tarzı Patlama & Sarsıntı Efektleri */

@keyframes boardExplodeShake {

0% { transform: translate(0, 0); }

20% { transform: translate(-3px, 2px); }

40% { transform: translate(3px, -2px); }

60% { transform: translate(-2px, 1px); }

80% { transform: translate(2px, -1px); }

100% { transform: translate(0, 0); }

}

.shake-board {

animation: boardExplodeShake 0.32s cubic-bezier(.36,.07,.19,.97) both;

}

@keyframes cellExplodeShatter {
  0% { transform: scale3d(1, 1, 1); opacity: 1; }
  30% { transform: scale3d(1.14, 1.14, 1); opacity: 1; }
  100% { transform: scale3d(0.15, 0.15, 1); opacity: 0; }
}

.cell-exploding {
  animation: cellExplodeShatter 0.21s ease-out forwards !important;
  will-change: transform, opacity;
  z-index: 30 !important;
}

@keyframes sparkFly {

0% {

transform: translate(-50%, -50%) scale(1) rotate(0deg);

opacity: 1;

}

65% {

opacity: 0.95;

}

100% {

transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.15) rotate(var(--rot));

opacity: 0;

}

}

.jewel-spark-particle {

animation: sparkFly 0.55s cubic-bezier(0.12, 0.8, 0.32, 1) forwards;

}

@keyframes shockwavePulse {

0% {

width: 12px;

height: 12px;

transform: translate(-50%, -50%) scale(0.2);

opacity: 1;

border: 3px solid white;

}

100% {

width: 130px;

height: 130px;

transform: translate(-50%, -50%) scale(1.9);

opacity: 0;

border: 1px solid currentColor;

}

}

.shockwave-pulse {

animation: shockwavePulse 0.45s ease-out forwards;

}

@keyframes scoreFloatUp {

0% {

opacity: 0;

transform: translate(-50%, 0) scale(0.6);

}

25% {

opacity: 1;

transform: translate(-50%, -18px) scale(1.25);

}

100% {

opacity: 0;

transform: translate(-50%, -55px) scale(0.85);

}

}

.score-float-badge {

animation: scoreFloatUp 0.75s cubic-bezier(0.2, 0.9, 0.3, 1) forwards;

text-shadow: 0 0 12px rgba(255, 215, 0, 0.85), 0 2px 4px black;

}

/* Otantik Osmanlı Mücevher Doku Sınıfları */

.jewel-texture-ruby {

background-image: url('./assets/blocks/block_ruby.jpg?v=20261103_crop') !important;

background-size: cover !important;

background-position: center !important;

background-repeat: no-repeat !important;

}

.jewel-texture-sapphire {

background-image: url('./assets/blocks/block_sapphire.jpg?v=20261103_crop') !important;

background-size: cover !important;

background-position: center !important;

background-repeat: no-repeat !important;

}

.jewel-texture-emerald {

background-image: url('./assets/blocks/block_emerald.jpg?v=20261103_crop') !important;

background-size: cover !important;

background-position: center !important;

background-repeat: no-repeat !important;

}

.jewel-texture-amethyst {

background-image: url('./assets/blocks/block_amethyst.jpg?v=20261103_crop') !important;

background-size: cover !important;

background-position: center !important;

background-repeat: no-repeat !important;

}

.jewel-texture-gold {

background-image: url('./assets/blocks/block_gold.jpg?v=20261104') !important;

background-size: cover !important;

background-position: center !important;

background-repeat: no-repeat !important;

}

/* 3D Canlı Mücevher Blokları (Sanatsal Doku Uyumlu) */

.jewel-block-3d {

border-radius: 4px !important;

position: relative;

filter: none !important;

opacity: 1 !important;

box-sizing: border-box !important;

box-shadow: 

inset 0 1px 0 rgba(255, 255, 255, 0.45),

inset 0 -1.5px 0 rgba(0, 0, 0, 0.5),

0 2px 5px rgba(0, 0, 0, 0.45) !important;

border: 1px solid rgba(245, 184, 46, 0.45) !important;

overflow: hidden !important;

}

.jewel-block-3d::before {
  display: none !important;
  content: none !important;
}

.avatar-gold-ring {

box-shadow: 0 0 14px rgba(245, 184, 46, 0.55);

}

.palace-frame-bg {

background-image:

linear-gradient(180deg, rgba(10, 18, 42, 0.18) 0%, rgba(14, 25, 56, 0.25) 50%, rgba(10, 18, 42, 0.34) 100%),

url('./assets/bg_palace.jpg');

background-size: cover;

background-position: center;

background-repeat: no-repeat;

}

/* ============================================================ */

/* BLOCK BLAST & KADER TAŞLARI ÖZEL OYUN STİLLERİ              */

/* ============================================================ */

#puzzle-board {

display: grid !important;

grid-template-columns: repeat(8, 1fr) !important;

grid-template-rows: repeat(8, 1fr) !important;

gap: 1px !important; /* SADECE 1px İNCE ÇİZGİ ŞEKLİNDE BOŞLUK */

background: rgba(38, 64, 118, 0.65) !important; /* Çizgi Rengi */

width: 100% !important;

max-width: 100% !important;

aspect-ratio: 1 / 1 !important;

margin: 0 auto !important;

box-sizing: border-box !important;

border: 2px solid rgba(245, 184, 46, 0.75) !important;

border-radius: 4px !important;

overflow: hidden !important;

padding: 1px !important;

}

#puzzle-board {
  contain: layout paint;
}

#puzzle-particles-layer {
  contain: layout style;
}

.puzzle-grid-cell {

width: 100% !important;

height: 100% !important;

aspect-ratio: 1 / 1 !important;

box-sizing: border-box !important;

overflow: hidden !important;

border-radius: 0px !important;

}

/* Duplicate jewel style removed */

/* Boş Oyuklu Mistik Velvet Yuva */

.puzzle-empty-socket {

background: #060D1C !important;

border-radius: 0px !important;

border: none !important;

transition: none !important;

}

/* Kalp Atışı Animasyonu (KUTU HAREKET ETMEZ, SADECE ÇERÇEVE ATAR) */

@keyframes borderHeartbeatGentle {

0%, 100% {

box-shadow: 0 0 10px rgba(245, 184, 46, 0.4), inset 0 0 5px rgba(245, 184, 46, 0.2);

border-color: rgba(245, 184, 46, 0.7);

}

14% {

box-shadow: 0 0 25px rgba(245, 184, 46, 0.95), inset 0 0 10px rgba(245, 184, 46, 0.5);

border-color: #FDE047;

}

28% {

box-shadow: 0 0 12px rgba(245, 184, 46, 0.5), inset 0 0 5px rgba(245, 184, 46, 0.25);

border-color: rgba(245, 184, 46, 0.75);

}

42% {

box-shadow: 0 0 32px rgba(251, 191, 36, 1), inset 0 0 14px rgba(251, 191, 36, 0.6);

border-color: #FEF08A;

}

70% {

box-shadow: 0 0 10px rgba(245, 184, 46, 0.4), inset 0 0 5px rgba(245, 184, 46, 0.2);

border-color: rgba(245, 184, 46, 0.7);

}

}

@keyframes borderHeartbeatIntense {

0%, 100% {

box-shadow: 0 0 14px rgba(239, 68, 68, 0.5), inset 0 0 8px rgba(245, 158, 11, 0.3);

border-color: #EF4444;

}

14% {

box-shadow: 0 0 38px rgba(245, 158, 11, 1), 0 0 18px rgba(239, 68, 68, 0.9), inset 0 0 16px rgba(245, 158, 11, 0.6);

border-color: #FBBF24;

}

28% {

box-shadow: 0 0 18px rgba(239, 68, 68, 0.6), inset 0 0 10px rgba(245, 158, 11, 0.35);

border-color: #F87171;

}

42% {

box-shadow: 0 0 48px rgba(239, 68, 68, 1), 0 0 24px rgba(245, 158, 11, 1), inset 0 0 20px rgba(239, 68, 68, 0.7);

border-color: #FEF08A;

}

70% {

box-shadow: 0 0 14px rgba(239, 68, 68, 0.5), inset 0 0 8px rgba(245, 158, 11, 0.3);

border-color: #EF4444;

}

}

/* GPU-friendly static heartbeat border shadows defined below */

/* ============================================================ */

/* HAYALET ÖNİZLEME (GHOST PREVIEW - BLOK ALTINDA PARLAMA)     */

/* ============================================================ */

.puzzle-ghost-cell {
  opacity: 0.56 !important;
  border: 2px solid rgba(255, 224, 102, 0.92) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45) !important;
  animation: none !important;
  transition: none !important;
  pointer-events: none !important;
}

@keyframes ghostPulse {

0% { opacity: 0.42; transform: scale(0.90); }

100% { opacity: 0.62; transform: scale(0.94); }

}

/* ============================================================ */

/* PATLAYAN HÜCRELERDEN ÇIKAN KIVILCIMLAR (SPARKS)              */

/* ============================================================ */

.puzzle-spark-particle {

position: absolute;

width: 5px;

height: 5px;

border-radius: 9999px;

background: radial-gradient(circle, #ffffff 25%, #ffd700 65%, #ff6b00 100%);

will-change: transform, opacity;

pointer-events: none;

z-index: 40;

transform: translate(-50%, -50%);

animation: sparkFlyAnim 0.52s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;

}

@keyframes sparkFlyAnim {

0% {

opacity: 1;

transform: translate(-50%, -50%) scale(1.4);

}

100% {

opacity: 0;

transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.2);

}

}

/* ============================================================ */

/* PATLAYACAK BLOKLAR ÖNİZLEMESİ (ŞİŞİP İNME & PARLAMA & IŞIKLAR) */

/* ============================================================ */

.puzzle-cell-will-explode {
  border: 2px solid #FFF7AE !important;
  box-shadow: inset 0 0 0 2.5px #FFFFFF !important;
  filter: none !important;
  animation: none !important;
  transition: none !important;
}

body.falmigo-game-active #app-main-top-bar {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background-color: #0D1730 !important;
}

body.falmigo-game-active #app-main-top-bar .animate-ping {
  animation: none !important;
  display: none !important;
}

@keyframes willExplodeBreathe {
  0% { transform: scale3d(1, 1, 1); }
  100% { transform: scale3d(1.06, 1.06, 1); }
}

/* ============================================================ */
/* GPU-ONLY ZERO-JANK EXPLOSION, LASER, SHOCKWAVE & 3D TEXT     */
/* ============================================================ */

.laser-beam-horizontal {
  position: absolute;
  left: 0;
  width: 100%;
  pointer-events: none;
  z-index: 86;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(255, 165, 0, 0.55) 20%,
    #FFFFFF 50%,
    rgba(255, 215, 0, 0.75) 80%,
    transparent 100%
  );
  animation: laserSweepH 0.30s cubic-bezier(0.16, 0.9, 0.28, 1) forwards;
  will-change: transform, opacity;
  transform-origin: center center;
  contain: layout style paint;
}

@keyframes laserSweepH {
  0% { transform: scale3d(0.15, 1.6, 1); opacity: 0.95; }
  40% { transform: scale3d(1.02, 1.15, 1); opacity: 1; }
  100% { transform: scale3d(1.0, 0.08, 1); opacity: 0; }
}

.laser-beam-vertical {
  position: absolute;
  top: 0;
  height: 100%;
  pointer-events: none;
  z-index: 86;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(56, 189, 248, 0.55) 20%,
    #FFFFFF 50%,
    rgba(56, 189, 248, 0.75) 80%,
    transparent 100%
  );
  animation: laserSweepV 0.30s cubic-bezier(0.16, 0.9, 0.28, 1) forwards;
  will-change: transform, opacity;
  transform-origin: center center;
  contain: layout style paint;
}

@keyframes laserSweepV {
  0% { transform: scale3d(1.6, 0.15, 1); opacity: 0.95; }
  40% { transform: scale3d(1.15, 1.02, 1); opacity: 1; }
  100% { transform: scale3d(0.08, 1.0, 1); opacity: 0; }
}

.shockwave-pulse-ring {
  position: absolute;
  width: 96px;
  height: 96px;
  border-radius: 9999px;
  border: 3px solid rgba(255, 236, 153, 0.92);
  background: radial-gradient(circle, rgba(255, 215, 0, 0.22) 0%, transparent 70%);
  transform: translate3d(-50%, -50%, 0) scale3d(0.2, 0.2, 1);
  pointer-events: none;
  z-index: 87;
  animation: shockwaveExpand 0.42s cubic-bezier(0.12, 0.82, 0.32, 1) forwards;
  will-change: transform, opacity;
  contain: layout style paint;
}

@keyframes shockwaveExpand {
  0% { transform: translate3d(-50%, -50%, 0) scale3d(0.2, 0.2, 1); opacity: 1; }
  100% { transform: translate3d(-50%, -50%, 0) scale3d(2.3, 2.3, 1); opacity: 0; }
}

.sparkle-star-particle {
  display: none !important;
}

.socket-clear-glow {
  position: relative;
}

.unified-celebration-overlay {
  position: absolute;
  pointer-events: none;
  z-index: 95 !important;
  overflow: visible;
  transform: translate3d(-50%, -50%, 0);
  -webkit-font-smoothing: antialiased;
}

.celebration-burst-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  user-select: none;
  white-space: nowrap;
  pointer-events: none;
}

.celebration-score-pop {
  font-family: 'Lilita One', 'Titan One', 'FalmigoArcadeBlack', 'Impact', sans-serif;
  font-size: 40px;
  font-weight: 400;
  letter-spacing: 1.4px;
  line-height: 1;
  color: #FFD60A !important;
  -webkit-text-fill-color: #FFD60A !important;
  paint-order: stroke fill;
  -webkit-text-stroke: 5.6px #000000 !important;
  text-shadow:
    0 2px 0 #000000,
    0 4px 0 #000000,
    0 6px 0 #000000,
    0 8px 0 #000000,
    0 12px 18px rgba(0, 0, 0, 0.98) !important;
  filter: none !important;
  animation: scoreBurstScatter 1.02s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
  will-change: transform, opacity;
  margin-bottom: 3px;
}

@keyframes scoreBurstScatter {
  0% { opacity: 0; transform: translate3d(-26px, 14px, 0) scale3d(0.22, 0.22, 1) rotate(14deg); }
  20% { opacity: 1; transform: translate3d(-20px, -8px, 0) scale3d(1.32, 1.32, 1) rotate(-10deg); }
  42% { opacity: 1; transform: translate3d(-16px, -6px, 0) scale3d(1.04, 1.04, 1) rotate(-8deg); }
  68% { opacity: 1; transform: translate3d(-20px, -11px, 0) scale3d(1, 1, 1) rotate(-11deg); }
  100% { opacity: 0; transform: translate3d(-76px, -62px, 0) scale3d(1.32, 1.32, 1) rotate(-25deg); }
}

.celebration-combo-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 18px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #E11D48 0%, #EA580C 48%, #D97706 100%);
  border: 3px solid #000000;
  box-shadow:
    0 4px 0 #000000,
    0 10px 18px rgba(0, 0, 0, 0.95),
    inset 0 2px 2px rgba(254, 240, 138, 0.45);
  line-height: 1;
  animation: comboPillBurstScatter 1.02s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
  will-change: transform, opacity;
  margin-bottom: 5px;
}

.celebration-combo-pill .pill-text {
  font-family: 'Titan One', 'Lilita One', 'FalmigoArcadeBlack', 'Impact', sans-serif;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #FDE047 !important;
  -webkit-text-fill-color: #FDE047 !important;
  paint-order: stroke fill;
  -webkit-text-stroke: 3.4px #000000 !important;
  text-shadow: 0 2px 0 #000000, 0 4px 6px rgba(0, 0, 0, 0.96) !important;
}

.celebration-combo-pill .pill-mult {
  font-family: 'Titan One', 'Lilita One', 'FalmigoArcadeBlack', 'Impact', sans-serif;
  font-size: 25px;
  font-weight: 400;
  color: #FFD60A !important;
  -webkit-text-fill-color: #FFD60A !important;
  paint-order: stroke fill;
  -webkit-text-stroke: 3.8px #000000 !important;
  text-shadow: 0 2px 0 #000000, 0 4px 0 #000000, 0 6px 8px rgba(0, 0, 0, 0.96) !important;
  filter: none !important;
  line-height: 1;
}

@keyframes comboPillBurstScatter {
  0% { opacity: 0; transform: translate3d(22px, 18px, 0) scale3d(0.22, 0.22, 1) rotate(-14deg); }
  22% { opacity: 1; transform: translate3d(16px, -2px, 0) scale3d(1.22, 1.22, 1) rotate(8deg); }
  42% { opacity: 1; transform: translate3d(13px, 0px, 0) scale3d(1, 1, 1) rotate(5deg); }
  68% { opacity: 1; transform: translate3d(16px, 2px, 0) scale3d(1.02, 1.02, 1) rotate(7deg); }
  100% { opacity: 0; transform: translate3d(82px, -40px, 0) scale3d(0.65, 0.65, 1) rotate(28deg); }
}

.celebration-word-text {
  font-family: 'Titan One', 'Lilita One', 'FalmigoArcadeBlack', 'Impact', sans-serif;
  font-size: 44px;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  line-height: 1.04;
  text-align: center;
  white-space: nowrap;
  position: relative;
  color: #FBBF24 !important;
  -webkit-text-fill-color: #FBBF24 !important;
  paint-order: stroke fill;
  -webkit-text-stroke: 6.4px #000000 !important;
  text-shadow:
    0 2px 0 #000000, 0 4px 0 #000000, 0 6px 0 #000000, 0 8px 0 #000000, 0 10px 0 #000000,
    0 14px 22px rgba(0, 0, 0, 0.98) !important;
  filter: none !important;
  animation: wordBurstScatter 1.02s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
  will-change: transform, opacity;
}

@keyframes wordBurstScatter {
  0% { opacity: 0; transform: scale3d(0.18, 0.18, 1) rotate(-6deg); }
  24% { opacity: 1; transform: scale3d(1.32, 1.32, 1) rotate(2deg); }
  44% { opacity: 1; transform: scale3d(0.98, 0.98, 1) rotate(-1deg); }
  58% { opacity: 1; transform: scale3d(1.04, 1.04, 1) rotate(0deg); }
  70% { opacity: 1; transform: scale3d(1, 1, 1) rotate(0deg); }
  100% { opacity: 0; transform: translate3d(0, 30px, 0) scale3d(1.48, 1.48, 1) rotate(3deg); }
}

.victory-tier-amazing .celebration-word-text {
  color: #38BDF8 !important;
  -webkit-text-fill-color: #38BDF8 !important;
  text-shadow:
    0 2px 0 #000000, 0 4px 0 #000000, 0 6px 0 #000000, 0 8px 0 #000000, 0 10px 0 #000000,
    0 14px 22px rgba(0, 0, 0, 0.98) !important;
  filter: none !important;
}
.victory-tier-brilliant .celebration-word-text {
  color: #34D399 !important;
  -webkit-text-fill-color: #34D399 !important;
  text-shadow:
    0 2px 0 #000000, 0 4px 0 #000000, 0 6px 0 #000000, 0 8px 0 #000000, 0 10px 0 #000000,
    0 14px 22px rgba(0, 0, 0, 0.98) !important;
  filter: none !important;
}
.victory-tier-awesome .celebration-word-text {
  color: #FBBF24 !important;
  -webkit-text-fill-color: #FBBF24 !important;
  text-shadow:
    0 2px 0 #000000, 0 4px 0 #000000, 0 6px 0 #000000, 0 8px 0 #000000, 0 10px 0 #000000,
    0 14px 22px rgba(0, 0, 0, 0.98) !important;
  filter: none !important;
}
.victory-tier-perfect .celebration-word-text {
  color: #F472B6 !important;
  -webkit-text-fill-color: #F472B6 !important;
  text-shadow:
    0 2px 0 #000000, 0 4px 0 #000000, 0 6px 0 #000000, 0 8px 0 #000000, 0 10px 0 #000000,
    0 14px 22px rgba(0, 0, 0, 0.98) !important;
  filter: none !important;
}
.victory-tier-unstoppable .celebration-word-text {
  color: #FB7185 !important;
  -webkit-text-fill-color: #FB7185 !important;
  text-shadow:
    0 2px 0 #000000, 0 4px 0 #000000, 0 6px 0 #000000, 0 8px 0 #000000, 0 10px 0 #000000,
    0 14px 22px rgba(0, 0, 0, 0.98) !important;
  filter: none !important;
}
.victory-tier-legendary .celebration-word-text {
  color: #FFD60A !important;
  -webkit-text-fill-color: #FFD60A !important;
  text-shadow:
    0 2px 0 #000000, 0 4px 0 #000000, 0 6px 0 #000000, 0 8px 0 #000000, 0 10px 0 #000000,
    0 15px 24px rgba(0, 0, 0, 0.98) !important;
  filter: none !important;
}

.puzzle-floating-score {
  position: absolute;
  transform: translate3d(-50%, -50%, 0);
  font-family: 'Lilita One', 'Titan One', 'FalmigoArcadeBlack', 'Impact', sans-serif;
  font-size: 34px;
  font-weight: 400;
  letter-spacing: 1.2px;
  color: #FFD60A !important;
  -webkit-text-fill-color: #FFD60A !important;
  paint-order: stroke fill;
  -webkit-text-stroke: 5.2px #000000 !important;
  text-shadow:
    0 2px 0 #000000,
    0 4px 0 #000000,
    0 6px 0 #000000,
    0 10px 16px rgba(0, 0, 0, 0.98) !important;
  filter: none !important;
  pointer-events: none;
  z-index: 75 !important;
  animation: scoreSingleBurstScatter 0.85s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
  will-change: transform, opacity;
  white-space: nowrap;
}

@keyframes scoreSingleBurstScatter {
  0% { opacity: 0; transform: translate3d(-50%, -20%, 0) scale3d(0.25, 0.25, 1) rotate(10deg); }
  24% { opacity: 1; transform: translate3d(-50%, -70%, 0) scale3d(1.32, 1.32, 1) rotate(-6deg); }
  48% { opacity: 1; transform: translate3d(-50%, -88%, 0) scale3d(1.02, 1.02, 1) rotate(-4deg); }
  70% { opacity: 1; transform: translate3d(-50%, -96%, 0) scale3d(1, 1, 1) rotate(-5deg); }
  100% { opacity: 0; transform: translate3d(-50%, -138%, 0) scale3d(1.22, 1.22, 1) rotate(-12deg); }
}

@keyframes shardArcFly {
  0% { transform: translate3d(0, 0, 0) scale3d(1, 1, 1) rotate(0deg); opacity: 1; }
  30% { transform: translate3d(calc(var(--tx) * 0.3), calc(var(--ty) * 0.3 - 28px), 0) scale3d(1.1, 1.1, 1) rotate(calc(var(--rot) * 0.35)); opacity: 1; }
  100% { transform: translate3d(var(--tx), var(--ty), 0) scale3d(0.75, 0.75, 1) rotate(var(--rot)); opacity: 0; }
}

.flying-stone-shard {
  position: absolute;
  pointer-events: none;
  z-index: 95 !important;
  border-radius: 6px;
  border: 1.8px solid #FFD700;
  will-change: transform, opacity;
  transform-origin: center center;
  background-size: cover;
  background-position: center;
  contain: layout style paint;
  animation: shardArcFly 0.68s cubic-bezier(0.18, 0.85, 0.35, 1) forwards;
}

/* ============================================================ */

/* TAROT KARTLARI ÇERÇEVE DOLDURMA & EŞİT GÖRÜNÜM (BOŞLUKSUZ)    */

/* ============================================================ */

.tarot-frame-fill {

width: 100% !important;

height: 8.5rem !important;

border-radius: 12px !important;

overflow: hidden !important;

border: 1.5px solid rgba(245, 184, 46, 0.85) !important;

box-shadow: 0 4px 14px rgba(0, 0, 0, 0.7), inset 0 0 8px rgba(0, 0, 0, 0.5) !important;

position: relative !important;

background: #000000 !important;

display: flex !important;

align-items: center !important;

justify-content: center !important;

}

.tarot-frame-fill img {

width: 100% !important;

height: 100% !important;

object-fit: cover !important;

transform: scale(1.18) !important;

transform-origin: center center !important;

transition: transform 0.35s ease !important;

}

.group:hover .tarot-frame-fill img {

transform: scale(1.26) !important;

}

.tarot-slot-frame-fill {

width: 100% !important;

flex: 1 !important;

min-height: 120px !important;

border-radius: 12px !important;

overflow: hidden !important;

border: none !important;

box-shadow: 0 4px 14px rgba(0, 0, 0, 0.7) !important;

position: relative !important;

background: #000000 !important;

display: flex !important;

align-items: center !important;

justify-content: center !important;

}

.tarot-slot-frame-fill img {

width: 100% !important;

height: 100% !important;

object-fit: cover !important;

object-position: center !important;

border-radius: 12px !important;

transform: none !important;

}

/* ============================================================ */

/* PROFESYONEL ÖZEL BULMACA ÇERÇEVESİ (BESPOKE OBSIDIAN & GOLD) */

/* ============================================================ */

.dazzling-palace-frame {
  position: relative;
  border-radius: 24px !important;
  background:
    linear-gradient(180deg, #0e172e 0%, #080d1e 55%, #040711 100%) padding-box,
    linear-gradient(135deg, #FFE89E 0%, #D4AF37 25%, #6B4D12 50%, #FFE285 75%, #A67C24 100%) border-box !important;
  border: 2px solid transparent !important;
}

.board-heartbeat-1 {
  border-color: rgba(251, 191, 36, 0.75) !important;
}

.board-heartbeat-2 {
  border-color: rgba(245, 158, 11, 0.92) !important;
}

.board-heartbeat-3 {
  border-color: #FDE047 !important;
}

.jewel-block-3d {
  border-radius: 5px !important;
  position: relative;
  box-sizing: border-box !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), inset 0 -1.5px 0 rgba(0, 0, 0, 0.45) !important;
  border: 1px solid rgba(245, 184, 46, 0.52) !important;
  display: block !important;
  flex-shrink: 0 !important;
}

#puzzle-hand-tray .jewel-block-3d {
  display: block !important;
  min-width: 8px !important;
  min-height: 8px !important;
}

.stone-flame-1 {
  border-color: rgba(253, 224, 71, 0.8) !important;
}

.stone-flame-2 {
  border-color: #FDE047 !important;
}

.stone-flame-3, .stone-flame-4, .stone-flame-inferno {
  border-color: #FFFFFF !important;
}

/* Mistik Parlayan Jeton & Hazine Sandığı Efektleri */

/* Mistik Jeton & Hazine Sandığı Efektleri (Katman Katman Azalan Yumuşak Parlama & Canlı Hareket) */

@keyframes mysticGoldPulse {

  0%, 100% {

    transform: scale(1);

    filter: 

      drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45))

      drop-shadow(0 0 3px rgba(255, 220, 100, 0.75))

      drop-shadow(0 0 8px rgba(245, 184, 46, 0.42))

      drop-shadow(0 0 16px rgba(245, 184, 46, 0.22))

      drop-shadow(0 0 28px rgba(245, 184, 46, 0.08));

  }

  50% {

    transform: scale(1.055);

    filter: 

      drop-shadow(0 3px 6px rgba(0, 0, 0, 0.45))

      drop-shadow(0 0 5px rgba(255, 235, 120, 0.9))

      drop-shadow(0 0 12px rgba(245, 184, 46, 0.55))

      drop-shadow(0 0 24px rgba(245, 184, 46, 0.28))

      drop-shadow(0 0 40px rgba(245, 184, 46, 0.12));

  }

}

@keyframes mysticChestAura {

  0%, 100% {

    transform: scale(1);

    filter: 

      drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5))

      drop-shadow(0 0 4px rgba(255, 220, 100, 0.75))

      drop-shadow(0 0 10px rgba(217, 70, 239, 0.35))

      drop-shadow(0 0 20px rgba(245, 184, 46, 0.18))

      drop-shadow(0 0 34px rgba(168, 85, 247, 0.07));

  }

  50% {

    transform: scale(1.045);

    filter: 

      drop-shadow(0 5px 10px rgba(0, 0, 0, 0.5))

      drop-shadow(0 0 6px rgba(255, 235, 120, 0.9))

      drop-shadow(0 0 15px rgba(217, 70, 239, 0.48))

      drop-shadow(0 0 28px rgba(245, 184, 46, 0.25))

      drop-shadow(0 0 48px rgba(168, 85, 247, 0.12));

  }

}

.glow-mystic-coin {

  animation: mysticGoldPulse 2.8s ease-in-out infinite;

  will-change: transform;

}

.glow-mystic-chest {

  animation: mysticChestAura 3.2s ease-in-out infinite;

  will-change: transform;

}

@keyframes shopCtaPulse {

0%, 100% {

transform: scale(1);

box-shadow: 0 0 14px rgba(245, 158, 11, 0.7), inset 0 0 8px rgba(255, 235, 59, 0.4);

}

50% {

transform: scale(1.04);

box-shadow: 0 0 25px rgba(255, 215, 0, 0.95), 0 0 40px rgba(245, 158, 11, 0.75), inset 0 0 12px rgba(255, 255, 255, 0.7);

}

}

.animate-shop-cta {

animation: shopCtaPulse 2s ease-in-out infinite;

will-change: transform, box-shadow;

}

@keyframes reviveHeartbeat {
  0%, 70%, 100% {
    transform: scale(1);
    box-shadow: 0 4px 16px rgba(217, 70, 239, 0.45), 0 0 10px rgba(251, 191, 36, 0.25);
  }
  14% {
    transform: scale(1.055);
    box-shadow: 0 6px 26px rgba(217, 70, 239, 0.88), 0 0 20px rgba(251, 191, 36, 0.65);
  }
  28% {
    transform: scale(1);
    box-shadow: 0 4px 16px rgba(217, 70, 239, 0.5);
  }
  42% {
    transform: scale(1.04);
    box-shadow: 0 6px 24px rgba(217, 70, 239, 0.8), 0 0 16px rgba(251, 191, 36, 0.55);
  }
}

.animate-revive-heartbeat {
  animation: reviveHeartbeat 1.45s ease-in-out infinite;
  will-change: transform, box-shadow;
}

/* Liderlik Tablosu 1, 2, 3 Sıra Blok Parlama Auraları */

@keyframes goldRowAura {

0%, 100% {

box-shadow: 0 0 14px rgba(255, 215, 0, 0.4), inset 0 0 10px rgba(245, 158, 11, 0.2);

border-color: rgba(251, 191, 36, 0.85);

}

50% {

box-shadow: 0 0 24px rgba(255, 215, 0, 0.75), inset 0 0 16px rgba(251, 191, 36, 0.4);

border-color: rgba(254, 240, 138, 1);

}

}

@keyframes silverRowAura {

0%, 100% {

box-shadow: 0 0 12px rgba(226, 232, 240, 0.35), inset 0 0 8px rgba(203, 213, 225, 0.15);

border-color: rgba(203, 213, 225, 0.8);

}

50% {

box-shadow: 0 0 20px rgba(226, 232, 240, 0.65), inset 0 0 12px rgba(226, 232, 240, 0.3);

border-color: rgba(255, 255, 255, 1);

}

}

@keyframes bronzeRowAura {

0%, 100% {

box-shadow: 0 0 12px rgba(217, 119, 6, 0.35), inset 0 0 8px rgba(180, 83, 9, 0.15);

border-color: rgba(217, 119, 6, 0.8);

}

50% {

box-shadow: 0 0 20px rgba(245, 158, 11, 0.65), inset 0 0 12px rgba(217, 119, 6, 0.3);

border-color: rgba(252, 211, 77, 0.95);

}

}

/* En Üst Köşe PRO Rozeti Lüks Mücevher Parlaması */

@keyframes topProJewelGlow {

0%, 100% {

box-shadow: 0 0 14px rgba(245, 158, 11, 0.8), 0 0 28px rgba(217, 70, 239, 0.35), inset 0 0 8px rgba(255, 215, 0, 0.45);

border-color: rgba(251, 191, 36, 0.9);

}

50% {

box-shadow: 0 0 28px rgba(250, 204, 21, 1), 0 0 48px rgba(245, 158, 11, 0.85), inset 0 0 14px rgba(255, 255, 255, 0.8);

border-color: rgba(254, 240, 138, 1);

}

}

.pro-pill-shimmer {

animation: topProJewelGlow 2.4s ease-in-out infinite;

}

.pro-gold-shine {

position: relative;

overflow: hidden;

}

.pro-gold-shine::after {

content: '';

position: absolute;

top: -50%;

left: -130%;

width: 70%;

height: 200%;

background: linear-gradient(

115deg,

transparent 0%,

rgba(255, 255, 255, 0.25) 30%,

rgba(255, 255, 255, 0.95) 50%,

rgba(255, 255, 255, 0.25) 70%,

transparent 100%

);

transform: rotate(25deg);

animation: proGoldSweep 2.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;

pointer-events: none;

}

@keyframes proGoldSweep {

0% {

left: -130%;

}

35%, 100% {

left: 230%;

}

}

.glow-lb-gold {

animation: goldRowAura 3s ease-in-out infinite;

}

.glow-lb-silver {

animation: silverRowAura 3s ease-in-out infinite;

}

.glow-lb-bronze {

animation: bronzeRowAura 3s ease-in-out infinite;

}

/* Liderlik Tablosu 1, 2, 3 Sıralaması Bloklardaki Gibi Parlayan Mücevher Efektleri */

.lb-rank-gold {

position: relative;

border-radius: 1rem !important;

background: linear-gradient(90deg, rgba(245, 158, 11, 0.28) 0%, rgba(254, 240, 138, 0.22) 50%, rgba(217, 119, 6, 0.28) 100%) !important;

border: 1.5px solid rgba(251, 191, 36, 0.95) !important;

box-shadow: inset 0 0 14px rgba(245, 158, 11, 0.45), 0 0 12px rgba(245, 158, 11, 0.3) !important;

overflow: hidden !important;

isolation: isolate;

animation: goldRowAura 3s ease-in-out infinite;

}

.lb-rank-gold::after {

content: '';

position: absolute;

top: -50%;

left: -150%;

width: 50%;

height: 200%;

background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.1) 30%, rgba(255, 255, 255, 0.85) 50%, rgba(255, 255, 255, 0.1) 70%, transparent 100%);

transform: rotate(25deg);

pointer-events: none;

animation: gemGleamSweep 2.4s infinite ease-in-out;

}

.lb-rank-silver {

position: relative;

border-radius: 1rem !important;

background: linear-gradient(90deg, rgba(148, 163, 184, 0.25) 0%, rgba(241, 245, 249, 0.22) 50%, rgba(100, 116, 139, 0.25) 100%) !important;

border: 1.5px solid rgba(226, 232, 240, 0.9) !important;

box-shadow: inset 0 0 12px rgba(226, 232, 240, 0.35), 0 0 10px rgba(226, 232, 240, 0.25) !important;

overflow: hidden !important;

isolation: isolate;

animation: silverRowAura 3s ease-in-out infinite;

}

.lb-rank-silver::after {

content: '';

position: absolute;

top: -50%;

left: -150%;

width: 50%;

height: 200%;

background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.1) 30%, rgba(255, 255, 255, 0.85) 50%, rgba(255, 255, 255, 0.1) 70%, transparent 100%);

transform: rotate(25deg);

pointer-events: none;

animation: gemGleamSweep 2.8s infinite ease-in-out 0.4s;

}

.lb-rank-bronze {

position: relative;

border-radius: 1rem !important;

background: linear-gradient(90deg, rgba(180, 83, 9, 0.25) 0%, rgba(253, 186, 116, 0.20) 50%, rgba(146, 64, 14, 0.25) 100%) !important;

border: 1.5px solid rgba(245, 158, 11, 0.85) !important;

box-shadow: inset 0 0 12px rgba(217, 119, 6, 0.35), 0 0 10px rgba(217, 119, 6, 0.25) !important;

overflow: hidden !important;

isolation: isolate;

animation: bronzeRowAura 3s ease-in-out infinite;

}

.lb-rank-bronze::after {

content: '';

position: absolute;

top: -50%;

left: -150%;

width: 50%;

height: 200%;

background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.1) 30%, rgba(255, 255, 255, 0.85) 50%, rgba(255, 255, 255, 0.1) 70%, transparent 100%);

transform: rotate(25deg);

pointer-events: none;

animation: gemGleamSweep 3.2s infinite ease-in-out 0.8s;

}

/* En Üst Köşe PRO Rozet Bloklardaki Gibi Işıltı Sweep */

.glow-top-pro {

position: relative !important;

overflow: hidden !important;

box-shadow: 0 0 16px rgba(245, 158, 11, 0.6), inset 0 0 8px rgba(254, 240, 138, 0.3) !important;

}

.glow-top-pro::after {

content: '';

position: absolute;

top: -50%;

left: -150%;

width: 50%;

height: 200%;

background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.15) 30%, rgba(255, 255, 255, 0.95) 50%, rgba(255, 255, 255, 0.15) 70%, transparent 100%);

transform: rotate(25deg);

pointer-events: none;

animation: gemGleamSweep 2.5s infinite ease-in-out;

}

.glow-top-pro-old {

animation: topProJewelGlow 2.5s ease-in-out infinite;

will-change: box-shadow;

}

/* Mobil Mağaza ve Dokunmatik Akıcılık Standardı */

html, body {

overscroll-behavior-y: none;

-webkit-tap-highlight-color: transparent;

}

button, [role="button"], a {

touch-action: manipulation;

}

.safe-area-top {

padding-top: max(8px, env(safe-area-inset-top));

}

.safe-area-bottom {

padding-bottom: max(12px, env(safe-area-inset-bottom));

}

/* ================= DESKTOP / WEB COSMIC THEME OVERRIDES ================= */
html[data-view="web"] body {
  background-color: #04050C;
  background-image:
    radial-gradient(circle at 50% 5%, rgba(139, 92, 246, 0.22) 0%, rgba(30, 15, 65, 0.35) 30%, rgba(4, 5, 12, 0.98) 75%),
    radial-gradient(circle at 85% 85%, rgba(245, 184, 46, 0.10) 0%, transparent 55%),
    radial-gradient(circle at 15% 65%, rgba(16, 185, 129, 0.08) 0%, transparent 50%);
  background-size: auto;
  background-position: initial;
  background-attachment: fixed;
  color: #F8F5F2;
  margin: 0;
  padding: 0;
}

html[data-view="web"] .avatar-gold-ring {
  box-shadow: 0 0 16px rgba(245, 184, 46, 0.65), 0 0 32px rgba(168, 85, 247, 0.35);
}

html[data-view="web"] .palace-frame-bg,
.cosmic-app-bg {
  background:
    radial-gradient(circle at 50% 0%, rgba(147, 51, 234, 0.22) 0%, rgba(35, 15, 65, 0.35) 30%, transparent 70%),
    radial-gradient(circle at 90% 25%, rgba(245, 184, 46, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 10% 70%, rgba(16, 185, 129, 0.08) 0%, transparent 45%),
    linear-gradient(180deg, #090C1D 0%, #060814 50%, #03040A 100%) !important;
  background-attachment: fixed;
}

.cosmic-glass-card {
  background: linear-gradient(145deg, rgba(24, 18, 48, 0.72) 0%, rgba(11, 9, 24, 0.88) 100%) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  box-shadow: 0 12px 36px -10px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

.cosmic-glass-card:hover {
  border-color: rgba(245, 184, 46, 0.45) !important;
  box-shadow: 0 14px 44px -8px rgba(245, 184, 46, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
}

.gold-shimmer-btn {
  background: linear-gradient(135deg, #FFE89E 0%, #F5B82E 50%, #C4820B 100%) !important;
  color: #070914 !important;
  box-shadow: 0 4px 18px rgba(245, 184, 46, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
  font-weight: 800 !important;
}

/* Ekran ustu gereksiz popup zorlamalarini kapat; #floating-reading-pill ise yalnizca gizliyken kapali tutulsun */
#floating-reading-pill.hidden,
#in-app-notification-banner,
#modal-astro-welcome {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

/* Video ogesi baslamadan once cikan varsayilan WebView/tarayici media oynatici ikonunu tamamen gizle */
video {
  background-color: transparent;
}
#puzzle-gameover-video-frame {
  background-image: url('./assets/gameover_poster_tr.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
#puzzle-gameover-video {
  background-color: transparent !important;
  transform: translateZ(0);
}
video::-webkit-media-controls,
video::-webkit-media-controls-enclosure,
video::-webkit-media-controls-panel,
video::-webkit-media-controls-overlay-play-button,
video::-webkit-media-controls-start-playback-button,
video::-internal-media-controls-loading-panel {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  -webkit-appearance: none !important;
}

/* Kahve fali ve diger ekranlardaki sari arka planli "Gunun Fali" rozetlerinin ust uste binmesini engelle */
#screen-coffee > div:first-child,
#screen-tarot > div:first-child,
#screen-dream > div:first-child,
#screen-palm > div:first-child,
#screen-horoscope > div:first-child {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
}
#screen-coffee > div:first-child > div:first-child,
#screen-tarot > div:first-child > div:first-child,
#screen-dream > div:first-child > div:first-child,
#screen-palm > div:first-child > div:first-child,
#screen-horoscope > div:first-child > div:first-child {
  min-width: 0 !important;
  flex: 1 1 0% !important;
  overflow: hidden !important;
}
#txt-coffee-header-title,
#txt-coffee-header-sub,
#txt-tarot-header-title,
#txt-tarot-header-sub,
#txt-dream-header-title,
#txt-dream-header-sub,
#txt-palm-header-title,
#txt-palm-header-sub,
#txt-zod-header-title,
#txt-zod-header-sub {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  display: block !important;
}
#coffee-quota-badge,
#badge-coffee-label,
#tarot-quota-badge,
#dream-quota-badge,
#badge-palm-top,
#badge-zod-top,
.service-quota-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  line-height: 1.2 !important;
  margin-left: 6px !important;
}

/* Kader Taslari: ust uygulama barini koru, mobil ve masaustu web gorunumunu tam ortala */
#screen-game.hidden {
  display: none !important;
}
#screen-game:not(.hidden) {
  min-height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 6px 8px 10px 8px !important;
  background: linear-gradient(180deg, #070B18 0%, #0B1228 100%) !important;
  box-sizing: border-box !important;
}
#screen-game > div:not(.fixed):not(.absolute) {
  width: 100% !important;
  max-width: 390px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
#screen-game #puzzle-board-container {
  max-width: min(336px, 42.5dvh, 90vw) !important;
  margin-top: 2px !important;
}
#screen-game #puzzle-hand-tray {
  max-width: min(350px, 94vw) !important;
  height: 80px !important;
  min-height: 80px !important;
  max-height: 80px !important;
  margin-bottom: 2px !important;
}
html[data-view="web"] #screen-game:not(.hidden) {
  width: 100% !important;
  max-width: 500px !important;
  min-height: auto !important;
  margin: 14px auto 28px auto !important;
  padding: 14px 18px 16px 18px !important;
  border-radius: 26px !important;
  border: 1px solid rgba(245, 184, 46, 0.28) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65) !important;
  gap: 8px !important;
}
html[data-view="web"] #screen-game > div:not(.fixed):not(.absolute) {
  max-width: 456px !important;
}
html[data-view="web"] #screen-game #puzzle-board-container {
  max-width: min(390px, 50dvh, 88vw) !important;
}
html[data-view="web"] #screen-game #puzzle-hand-tray {
  max-width: 404px !important;
  height: 86px !important;
  min-height: 86px !important;
  max-height: 86px !important;
}
#screen-game #puzzle-combo-alert {
  position: absolute !important;
  top: -10px !important;
  left: 0 !important;
  right: 0 !important;
}
#puzzle-gameover-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 120 !important;
}
#puzzle-gameover-modal > div {
  width: 100% !important;
  max-width: 356px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
#puzzle-gameover-video-frame {
  width: 100% !important;
  max-width: 264px !important;
  aspect-ratio: 16 / 9 !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
#modal-analysis {
  position: fixed !important;
  inset: 0 !important;
  z-index: 115 !important;
}
#modal-daily-luck:not(.hidden) {
  z-index: 125 !important;
}
#modal-photo-source-choice:not(.hidden),
#modal-camera-capture:not(.hidden) {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10060 !important;
  display: flex !important;
}
@media (max-height: 700px) {
  html[data-view="app"] #screen-game #puzzle-board-container,
  #screen-game #puzzle-board-container {
    max-width: min(294px, 38.5dvh, 86vw) !important;
  }
  html[data-view="app"] #screen-game #puzzle-hand-tray,
  #screen-game #puzzle-hand-tray {
    height: 72px !important;
    min-height: 72px !important;
    max-height: 72px !important;
  }
  #puzzle-gameover-modal > div {
    padding: 10px !important;
  }
  #puzzle-gameover-modal .aspect-video {
    max-width: 224px !important;
  }
}

/* 3 Gunde Bir Falimi Paylas Jeton Kazan Karti */
#reading-share-promo-box {
  background: linear-gradient(90deg, #2A1448 0%, #3E1B63 50%, #261242 100%);
  border: 2px solid rgba(251, 191, 36, 0.9);
  box-shadow: 0 0 28px rgba(245, 184, 46, 0.28);
}

#story-card-preview-img {
  max-height: 48dvh !important;
}

/* Uygulama Puanlama Modali her zaman en ust katmanda ve gorunur acilsin */
#modal-store-rating {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10050 !important;
}

/* Ust uygulama bari Kader Taslari dahil her ekranda her zaman gorunur kalsin */
#app-main-top-bar {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  flex-shrink: 0 !important;
}

html[data-view="web"] header#app-main-top-bar {
  display: block !important;
}

/* VIP OZEL rozeti dar mobil ekranlarda asla iki satira bolunup ust uste binmesin */
.vip-ozel-pill {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  line-height: 1.1 !important;
  font-size: 9.5px !important;
  padding: 3px 9px !important;
  border-radius: 9999px !important;
  letter-spacing: 0.04em !important;
}

/* Uygulama ici canli fal geri sayim bildirim cubugu (Kader Taslari vb. gezinirken aktif) */
#floating-reading-pill:not(.hidden) {
  display: flex !important;
  visibility: visible !important;
  pointer-events: auto !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  padding: 8px 12px !important;
  background: linear-gradient(90deg, #1D0C26 0%, #2A1136 50%, #170920 100%) !important;
  border-bottom: 1px solid rgba(251, 191, 36, 0.55) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6) !important;
  flex-shrink: 0 !important;
  z-index: 35 !important;
}

/* Masaustu web gorunumunde canli fal geri sayim Cubugu ust bar altinda ortali gorunsun */
html[data-view="web"] #floating-reading-pill:not(.hidden) {
  max-width: 560px !important;
  margin: 8px auto 0 auto !important;
  border-radius: 16px !important;
  border: 1px solid rgba(245, 184, 46, 0.55) !important;
}

/* Ana sayfa (screen-home) tum ozellik baslik ve alt aciklama yazilari tam sigsin, '...' ile kesilmesin */
#screen-home #txt-srv-coffee-title,
#screen-home #txt-srv-coffee-desc,
#screen-home #txt-game-banner-title,
#screen-home #txt-game-banner-subtitle,
#screen-home #txt-srv-tarot-title,
#screen-home #txt-srv-tarot-desc,
#screen-home #txt-srv-dream-title,
#screen-home #txt-srv-dream-desc,
#screen-home #txt-srv-palm-title,
#screen-home #txt-srv-palm-desc,
#screen-home #txt-srv-horoscope-title,
#screen-home #home-zodiac-sub,
#screen-home #txt-daily-luck-title,
#screen-home #txt-daily-luck-sub {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  -webkit-line-clamp: unset !important;
  display: block !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
}

#screen-home #txt-srv-coffee-desc,
#screen-home #txt-game-banner-subtitle,
#screen-home #txt-srv-tarot-desc,
#screen-home #txt-srv-dream-desc,
#screen-home #txt-srv-palm-desc,
#screen-home #home-zodiac-sub,
#screen-home #txt-daily-luck-sub {
  line-height: 1.25 !important;
}

#screen-home .falmigo-hero-banner {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 1024 / 304 !important;
}

#screen-home .falmigo-hero-banner > img {
  object-fit: cover !important;
  object-position: center center !important;
}

#screen-home .falmigo-banner-scrim {
  background: linear-gradient(
    to top,
    rgba(6, 4, 14, 0.86) 0%,
    rgba(6, 4, 14, 0.34) 36%,
    rgba(6, 4, 14, 0.04) 68%,
    rgba(6, 4, 14, 0) 100%
  ) !important;
}

html[data-view="app"] #screen-home #txt-srv-tarot-title,
html[data-view="app"] #screen-home #txt-srv-dream-title,
html[data-view="app"] #screen-home #txt-srv-palm-title,
html[data-view="app"] #screen-home #txt-srv-horoscope-title {
  font-size: 13.5px !important;
  line-height: 1.25 !important;
}

@media (max-width: 639px) {
  #screen-home .falmigo-hero-banner .falmigo-hero-top {
    top: 5px !important;
    left: 6px !important;
    gap: 4px !important;
  }
  #screen-home .falmigo-hero-banner .falmigo-hero-pill {
    font-size: 8px !important;
    line-height: 1.15 !important;
    padding: 1.5px 6px !important;
  }
  #screen-home .falmigo-hero-banner .falmigo-hero-bottom {
    bottom: 5px !important;
    left: 7px !important;
    right: 7px !important;
    gap: 6px !important;
  }
  #screen-home .falmigo-hero-banner .falmigo-hero-title {
    font-size: 13px !important;
    line-height: 1.1 !important;
  }
  #screen-home .falmigo-hero-banner .falmigo-hero-desc {
    font-size: 9px !important;
    line-height: 1.15 !important;
    margin-top: 1px !important;
  }
  #screen-home .falmigo-hero-banner .falmigo-hero-cta {
    font-size: 9.5px !important;
    line-height: 1.1 !important;
    padding: 5px 8px !important;
    border-radius: 9px !important;
  }
  html[data-view="web"] #screen-home [class*="aspect-"]:not(.falmigo-hero-banner) {
    min-height: 108px;
  }
}


/* ============================================================ */
/* UNIVERSAL MOBILE RESPONSIVENESS & DEVICE ADAPTATION ENGINE   */
/* Ensures flawless UI on all phones (320px - 480px, notches)   */
/* ============================================================ */

/* 1. Safe Area Inset Support for Notches & Gesture Bars */
html[data-view="app"] body {
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

html[data-view="app"] .palace-frame-bg {
  height: 100vh;
  max-height: 100vh;
}

@supports (height: 100dvh) {
  html[data-view="app"] body {
    min-height: 100dvh;
  }
  html[data-view="app"] .palace-frame-bg {
    height: 100dvh;
    max-height: 100dvh;
  }
}

html[data-view="app"] #main-content-scroll {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior-y: contain;
  touch-action: pan-y !important;
}

body.falmigo-game-active #main-content-scroll {
  overflow: hidden !important;
  touch-action: none !important;
}

@media (min-width: 768px) {
  html[data-view="app"] body {
    padding: 1.5rem;
    overflow: auto;
  }
  html[data-view="app"] .palace-frame-bg {
    height: 900px;
    min-height: 0;
    max-height: 900px;
  }
}

#app-main-top-bar {
  padding-top: max(10px, env(safe-area-inset-top, 10px)) !important;
}

#main-bottom-nav,
.safe-area-bottom {
  padding-bottom: max(8px, env(safe-area-inset-bottom, 8px)) !important;
}

/* 2. Universal Touch Target and Button Resilience */
button, [role="button"], .nav-tab, .falmigo-hero-cta {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

/* 3. Small and Compact Mobile Screens (<= 375px, e.g. iPhone SE, Galaxy A0x) */
@media (max-width: 375px) {
  #app-main-top-bar {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
  #app-title-text {
    font-size: 13px !important;
  }
  #top-app-avatar {
    width: 30px !important;
    height: 30px !important;
  }
  #top-status-text {
    height: 26px !important;
    padding-left: 6px !important;
    padding-right: 8px !important;
    font-size: 9.5px !important;
    gap: 3px !important;
  }
  #top-btn-notif-bell,
  #top-btn-menu {
    width: 26px !important;
    height: 26px !important;
  }
  #main-content-scroll > div {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  /* Bottom navigation bar tabs */
  #main-bottom-nav .nav-tab span {
    font-size: 9px !important;
    letter-spacing: -0.2px !important;
  }
  #main-bottom-nav .nav-tab svg {
    width: 18px !important;
    height: 18px !important;
  }
  /* Service 2-column cards */
  #screen-home .grid-cols-2 {
    gap: 8px !important;
  }
  #screen-home .grid-cols-2 > div {
    padding: 10px !important;
    min-height: 145px !important;
    border-radius: 20px !important;
  }
  #screen-home .grid-cols-2 > div .w-12.h-12 {
    width: 38px !important;
    height: 38px !important;
  }
  #screen-home .grid-cols-2 > div [id^="txt-srv-"] {
    font-size: 12px !important;
  }
  #screen-home .grid-cols-2 > div [id^="badge-"] {
    font-size: 8.5px !important;
    padding: 2px 6px !important;
  }
  /* Coffee tellers 3-column grid */
  #screen-coffee .grid-cols-3 {
    gap: 6px !important;
  }
  #screen-coffee .grid-cols-3 > div {
    padding: 6px !important;
    border-radius: 18px !important;
  }
  #screen-coffee .grid-cols-3 > div .h-36 {
    height: 110px !important;
  }
  #screen-coffee .grid-cols-3 > div .text-sm {
    font-size: 11px !important;
  }
  #screen-coffee .grid-cols-3 > div .text-\[11px\] {
    font-size: 9px !important;
  }
  #screen-coffee .grid-cols-3 > div .text-\[10px\] {
    font-size: 8px !important;
  }
  #screen-coffee .grid-cols-3 > div button,
  #screen-coffee .grid-cols-3 > div div[id^="btn-select-"] {
    font-size: 10px !important;
    padding: 4px 2px !important;
  }
  /* Tarot selection slots */
  #screen-tarot .grid-cols-3 {
    gap: 6px !important;
  }
  #screen-tarot .grid-cols-3 > div {
    height: 140px !important;
  }
}

/* Extra small phones (<= 330px) */
@media (max-width: 330px) {
  #top-status-text span:last-child {
    display: none !important; /* Hide 'Jeton' text, keep icon and number */
  }
  #app-live-status {
    display: none !important;
  }
}

/* 4. Short Height Phones (<= 640px height, e.g. iPhone SE, landscape or compact Android) */
@media (max-height: 640px) {
  #modal-analysis .aspect-video {
    max-width: 260px !important;
  }
  #modal-analysis #ritual-title-label {
    font-size: 13px !important;
  }
  #modal-analysis #analysis-step-text {
    font-size: 10.5px !important;
    height: 24px !important;
  }
}

/* 5. Smooth High-DPI Image Rendering */
img {
  image-rendering: -webkit-optimize-contrast;
}

/* Fal bekleme ekrani (#modal-analysis) tum telefon ekranlarina tek bakista tam sigsin */
#modal-analysis #modal-analysis-video-wrap {
  max-height: 20dvh;
  width: auto;
  max-width: min(276px, 86vw);
  aspect-ratio: 16 / 9;
}

@media (max-height: 700px) {
  #modal-analysis {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
  }
  #modal-analysis #modal-analysis-video-wrap {
    max-height: 17dvh !important;
    margin-bottom: 4px !important;
  }
  #modal-analysis #mini-kader-grid button {
    height: 20px !important;
  }
}

/* Mobil Web ve Uygulama Bildirim Kutusu (#modal-notif-inbox) ve Ust Bildirim Karti En Ust Katman Garantisi */
#modal-notif-inbox.hidden {
  display: none !important;
}

#modal-notif-inbox:not(.hidden) {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10080 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

#modal-notif-inbox #modal-notif-inbox-card {
  position: relative !important;
  z-index: 10081 !important;
}

#in-app-notification-banner {
  z-index: 10070 !important;
}
