@import url('dynamic-island.css');

/* ==============================================================================
   ALİ ÇAVDAR // VIRTUAL SMARTPHONE (AliOS) — MASTER STYLESHEET
   Zero-dependency Vanilla CSS. GPU-accelerated 60fps transitions.
   ============================================================================== */

:root {
  --font-sans: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --bg-deep: #050608;
  --bg-device-bezel: #16171b;
  --border-device: #2b2d35;
  --accent-cyan: #38bdf8;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-violet: #8b5cf6;

  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-blur: blur(24px);

  --island-bg: #000000;
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.15);
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Box-Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body.phone-standalone-page {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-sans);
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

body.phone-mode-active {
  overflow: hidden !important;
  touch-action: none;
}


/* ========================================================
   DESKTOP STAGE (Centered Phone Container)
   ======================================================== */
.phone-desktop-stage {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #0f172a 0%, #050608 100%);
  position: relative;
  overflow: hidden;
}

/* Ambient Stage Glow Behind Device */
.phone-desktop-stage::before {
  content: '';
  position: absolute;
  width: 550px;
  height: 950px;
  background: radial-gradient(ellipse at center, rgba(56, 189, 248, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ========================================================
   PHYSICAL PHONE DEVICE (CHASSIS)
   ======================================================== */
.phone-device {
  position: relative;
  width: 414px;
  height: 852px;
  max-height: 95vh;
  background: var(--bg-device-bezel);
  border-radius: 54px;
  padding: 12px;
  box-shadow: 
    0 0 0 2px rgba(255, 255, 255, 0.08),
    0 0 0 6px #1e2025,
    0 25px 80px rgba(0, 0, 0, 0.9),
    0 10px 30px rgba(0, 0, 0, 0.7);
  z-index: 10;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

/* Side Hardware Buttons (Desktop Decoration) */
.phone-hardware-btn {
  position: absolute;
  background: #23252b;
  border-radius: 3px;
  z-index: -1;
}

.hw-volume-up {
  left: -5px;
  top: 175px;
  width: 5px;
  height: 48px;
}

.hw-volume-down {
  left: -5px;
  top: 235px;
  width: 5px;
  height: 48px;
}

.hw-power {
  right: -5px;
  top: 195px;
  width: 5px;
  height: 72px;
}

/* ========================================================
   PHONE SCREEN (OLED Display Surface)
   ======================================================== */
.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000000;
  border-radius: 44px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Subtle Screen Reflection Glare */
.phone-screen::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 55%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, transparent 60%);
  pointer-events: none;
  z-index: 99;
}

/* ========================================================
   TOP STATUS BAR & DYNAMIC ISLAND
   ======================================================== */
.status-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 44px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 80;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ffffff;
  pointer-events: none;
}

.status-left, .status-right {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 70px;
}

.status-right {
  justify-content: flex-end;
}

.status-time {
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.status-network {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  opacity: 0.85;
}

.status-icon.wifi {
  display: flex;
  align-items: center;
}

.status-battery {
  width: 22px;
  height: 11px;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  border-radius: 3px;
  padding: 1px;
  position: relative;
  display: flex;
  align-items: center;
}

.status-battery::after {
  content: '';
  position: absolute;
  right: -3px;
  top: 2px;
  bottom: 2px;
  width: 1.5px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 0 1px 1px 0;
}

.battery-bar {
  height: 100%;
  background: #ffffff;
  border-radius: 1px;
}

/* Dynamic Island 2.0 styles delegated to dynamic-island.css */

/* ========================================================
   PHONE LAYERS (Boot, Lock, Home, App)
   ======================================================== */
.phone-layer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s var(--ease-smooth);
}

.phone-layer.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ========================================================
   1. BOOT LAYER
   ======================================================== */
.boot-layer {
  background: #000000;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
}

.boot-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.boot-logo-wrap {
  margin-bottom: 28px;
}

.boot-monogram {
  width: 76px;
  height: 76px;
  margin: 0 auto 16px;
  border: 2px solid var(--accent-cyan);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.05);
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.35);
  animation: logoGlow 2s ease-in-out infinite alternate;
}

@keyframes logoGlow {
  0% { box-shadow: 0 0 15px rgba(56, 189, 248, 0.2); transform: scale(0.98); }
  100% { box-shadow: 0 0 35px rgba(56, 189, 248, 0.5); transform: scale(1.02); }
}

.boot-brand {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: #ffffff;
}

.boot-sub {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-top: 4px;
}

.boot-progress-bar {
  width: 140px;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 12px;
}

.boot-progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-emerald));
  border-radius: 3px;
  transition: width 1.6s ease;
}

.boot-hint {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ========================================================
   2. LOCK SCREEN LAYER
   ======================================================== */
.lock-layer {
  background: linear-gradient(180deg, #0b0f19 0%, #040507 100%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  padding: 68px 24px 36px;
  cursor: pointer;
}

.lock-screen-content {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.lock-header {
  text-align: center;
  margin-top: 20px;
}

.lock-padlock-icon {
  font-size: 1.2rem;
  margin-bottom: 10px;
  opacity: 0.8;
}

.lock-date {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}

.lock-time {
  font-family: var(--font-sans);
  font-size: 4.8rem;
  font-weight: 800;
  line-height: 1;
  color: #ffffff;
  letter-spacing: -0.04em;
}

/* Lock Notification Card */
.lock-notif-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  animation: notifFloat 3s ease-in-out infinite alternate;
}

@keyframes notifFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(-4px); }
}

.notif-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--accent-cyan);
  margin-bottom: 6px;
}

.notif-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: #ffffff;
  margin-bottom: 4px;
}

.notif-body {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Lock Swipe Hint Footer */
.lock-footer {
  text-align: center;
}

.swipe-handle-hint {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.swipe-arrow {
  font-size: 0.8rem;
  animation: swipeArrow 1.2s ease-in-out infinite;
}

@keyframes swipeArrow {
  0% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(-6px); opacity: 1; }
  100% { transform: translateY(0); opacity: 0.4; }
}

/* ========================================================
   3. HOME SCREEN LAYER
   ======================================================== */
.home-layer {
  z-index: 50;
  padding: 56px 20px 24px;
  background-size: cover;
  background-position: center;
  transition: background-image 0.4s ease;
}

/* Wallpaper Variants */
.home-layer.wp-cyber { background-image: radial-gradient(circle at 50% 30%, #172554 0%, #030712 80%); }
.home-layer.wp-neon { background-image: radial-gradient(circle at 80% 20%, #4c0519 0%, #020617 80%); }
.home-layer.wp-deep { background-image: radial-gradient(circle at 20% 80%, #064e3b 0%, #020617 80%); }
.home-layer.wp-pink { background-image: radial-gradient(circle at 50% 50%, #831843 0%, #09090b 80%); }

.home-screen-content {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Home Widget */
.home-widget-clock {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 16px 20px;
  margin-top: 8px;
}

.widget-time {
  font-family: var(--font-sans);
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.widget-date {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-top: 2px;
}

.widget-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent-emerald);
  margin-top: 8px;
  padding: 3px 8px;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 8px;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-emerald);
}

/* App Grid */
.app-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px 12px;
  padding: 16px 4px;
}

.app-item {
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  outline: none;
  transition: transform 0.15s ease;
}

.app-item:active {
  transform: scale(0.9);
}

.app-icon-box {
  width: 62px;
  height: 62px;
  border-radius: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
  position: relative;
  overflow: hidden;
  color: #ffffff;
}

.app-icon-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.25) 0%, transparent 100%);
  border-radius: 17px 17px 0 0;
}

.app-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
}

/* App Badge */
.app-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--phone-accent, #ef4444);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(0, 0, 0, 0.6);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  z-index: 10;
}

/* App Icon Color Themes */
.icon-instagram { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.icon-mail { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.icon-gallery { background: linear-gradient(135deg, #ec4899, #8b5cf6); }
.icon-music { background: linear-gradient(135deg, #f43f5e, #be123c); }
.icon-website { background: linear-gradient(135deg, #06b6d4, #0284c7); }
.icon-games { background: linear-gradient(135deg, #10b981, #047857); }
.icon-settings { background: linear-gradient(135deg, #64748b, #334155); }

/* Home Dock */
.home-dock {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin-bottom: 8px;
}

.dock-item {
  background: transparent;
  border: none;
  cursor: pointer;
  outline: none;
  transition: transform 0.15s ease;
}

.dock-item:active {
  transform: scale(0.88);
}

.app-icon-box.sm {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  font-size: 1.4rem;
}

/* ========================================================
   4. APP VIEWPORT LAYER
   ======================================================== */
.app-layer {
  z-index: 55;
  background: #090b10;
  display: flex;
  flex-direction: column;
  transform: scale(0.92);
  transform-origin: center center;
  will-change: transform, opacity, border-radius;
  border-radius: 0;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s ease, border-radius 0.28s ease;
}

.app-layer.active {
  transform: scale(1) translate3d(0, 0, 0);
  opacity: 1;
}

.app-layer.dragging {
  transition: none !important;
  pointer-events: none;
}

.app-layer.spring-back {
  transition: transform 0.28s cubic-bezier(0.175, 0.885, 0.32, 1.15), opacity 0.22s ease, border-radius 0.22s ease !important;
}

.app-layer.closing-to-icon {
  transition: transform 0.36s cubic-bezier(0.175, 0.885, 0.32, 1.15), opacity 0.28s ease, border-radius 0.28s ease !important;
  pointer-events: none;
}

.app-layer.opening-from-icon {
  transition: transform 0.38s cubic-bezier(0.175, 0.885, 0.32, 1.15), opacity 0.25s ease, border-radius 0.25s ease !important;
  pointer-events: none;
}

/* App Navigation Header */
.app-nav-bar {
  height: 48px;
  margin-top: 40px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: var(--glass-blur);
  z-index: 10;
}

.app-nav-btn {
  background: transparent;
  border: none;
  color: var(--accent-cyan);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 2px;
  cursor: pointer;
}

.app-nav-btn.btn-close {
  font-size: 1.1rem;
  color: var(--text-muted);
}

.app-nav-btn:hover {
  opacity: 0.8;
}

.nav-arrow {
  font-size: 1.2rem;
  line-height: 1;
}

.app-nav-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #ffffff;
  letter-spacing: 0.02em;
}

/* App Body Scroll Container */
.app-content-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  position: relative;
  -webkit-overflow-scrolling: touch;
}

/* App Views */
.app-view {
  display: none;
  animation: viewFadeIn 0.25s ease;
}

.app-view.active {
  display: block;
}

@keyframes viewFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Buttons inside Apps */
.btn-phone-primary {
  display: block;
  width: 100%;
  padding: 12px 16px;
  background: var(--accent-cyan);
  color: #050608;
  border: none;
  border-radius: 14px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.92rem;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn-phone-primary:active {
  transform: scale(0.98);
  opacity: 0.9;
}

.btn-phone-subtle {
  display: block;
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.85rem;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  margin-top: 10px;
}

/* --- APP 1: INSTAGRAM --- */
.instagram-app-card {
  padding: 36px 16px;
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  margin-top: 20px;
}

.ig-avatar {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  background: linear-gradient(45deg, #f09433, #dc2743, #bc1888);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.4rem;
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(220, 39, 67, 0.4);
}

.instagram-app-card h2 {
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.instagram-app-card p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 24px;
}

/* --- APP 2: MAIL --- */
.mail-app-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.mail-compose-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
}

.mail-field-row {
  display: flex;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mail-field-label {
  width: 60px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.mail-field-val {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-cyan);
}

.mail-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  outline: none;
}

.mail-body-wrap {
  margin: 14px 0;
}

.mail-textarea {
  width: 100%;
  min-height: 160px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  line-height: 1.5;
  resize: none;
  outline: none;
}

/* --- APP 3: GALERİ --- */
.gallery-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.gallery-header-bar h3 {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.gallery-count {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.gallery-thumb-card {
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  background: #11141b;
  position: relative;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease;
}

.gallery-thumb-card:active {
  transform: scale(0.96);
}

.gallery-thumb-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-thumb-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 6px 8px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  font-size: 0.68rem;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Lightbox */
.gallery-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 100;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px 16px 20px;
}

.lightbox-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  cursor: pointer;
}

.lb-close {
  align-self: flex-end;
  font-size: 1.1rem;
}

.lightbox-img-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 12px 0;
}

.lightbox-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox-meta {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.lightbox-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

/* --- APP 4: MÜZİK --- */
.music-disc-stage {
  display: flex;
  justify-content: center;
  margin: 20px 0 16px;
}

.vinyl-record {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, #27272a 0%, #09090b 60%, #000000 100%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 0 4px #18181b;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: vinylSpin 6s linear infinite paused;
}

.vinyl-record.playing {
  animation-play-state: running;
}

@keyframes vinylSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.vinyl-grooves {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 10px rgba(255, 255, 255, 0.02), inset 0 0 0 25px rgba(255, 255, 255, 0.02);
}

.vinyl-center-label {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-rose), #9f1239);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 800;
  font-size: 1rem;
  border: 3px solid #000000;
}

.music-meta-box {
  text-align: center;
  margin-bottom: 20px;
}

.music-track-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: #ffffff;
  margin-bottom: 4px;
}

.music-track-artist {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.music-controls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
}

.music-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 6px;
}

.btn-play-main {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-rose);
  color: #ffffff;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(244, 63, 94, 0.4);
}

.music-volume-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 24px;
  margin-bottom: 20px;
}

.music-volume-row input[type="range"] {
  flex: 1;
  accent-color: var(--accent-rose);
}

.music-playlist-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 12px;
}

.playlist-header {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.playlist-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.playlist-item-row:hover, .playlist-item-row.active {
  background: rgba(255, 255, 255, 0.08);
}

.playlist-item-row.active {
  color: var(--accent-rose);
  font-weight: 700;
}

/* --- APP 5: WEBSITE (Tarayıcı Simülatörü) --- */
.browser-app-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.browser-address-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 0.82rem;
  margin-bottom: 20px;
}

.browser-ssl-icon {
  font-size: 0.8rem;
  color: var(--accent-emerald);
}

.browser-url-text {
  flex: 1;
  font-family: var(--font-mono);
  color: #ffffff;
}

.browser-external-link {
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: bold;
}

.browser-preview-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 24px 16px;
  text-align: center;
}

.browser-preview-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.browser-preview-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}

.browser-quick-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.quick-link-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 10px;
  color: #ffffff;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: background 0.15s ease;
}

.quick-link-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* --- APP 6: GAMES (Arcade) --- */
.games-hud {
  display: flex;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 8px 16px;
  margin-bottom: 12px;
}

.ghud-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ghud-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}

.ghud-val {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 800;
  color: #ffffff;
}

.text-cyan { color: var(--accent-cyan); }

.pgame-arena {
  position: relative;
  width: 100%;
  height: 240px;
  background: #0d1117;
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 16px;
}

.pgame-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(13, 17, 23, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
}

.pgame-overlay h4 {
  font-size: 1.2rem;
  margin-bottom: 6px;
  color: #ffffff;
}

.pgame-overlay p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.pgame-input {
  width: 180px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 8px 12px;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  text-align: center;
  margin-bottom: 14px;
  outline: none;
}

.pgame-countdown-num {
  font-size: 4rem;
  font-weight: 800;
  color: var(--accent-cyan);
  animation: numPop 0.8s ease;
}

@keyframes numPop {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1.2); opacity: 1; }
}

.pgame-final-score {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent-cyan);
  margin-bottom: 8px;
}

.pgame-feedback {
  font-size: 0.78rem;
  color: var(--accent-emerald);
  margin-bottom: 12px;
}

/* Arena Target Node */
.game-target-node {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle, #38bdf8 0%, #0284c7 100%);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.8);
  border: 2px solid #ffffff;
  cursor: pointer;
  animation: targetScale 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes targetScale {
  0% { transform: scale(0.3); opacity: 0; }
  20% { opacity: 1; transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.pgame-leaderboard-section h5 {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-bottom: 8px;
}

.pgame-leaderboard-table {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 8px 12px;
}

.plb-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.82rem;
}

.plb-row:last-child { border-bottom: none; }
.plb-rank { font-family: var(--font-mono); color: var(--accent-amber); font-weight: 700; width: 24px; }
.plb-name { flex: 1; font-weight: 600; color: #ffffff; }
.plb-score { font-family: var(--font-mono); color: var(--accent-cyan); font-weight: 700; }

/* --- APP 7: AYARLAR --- */
.settings-profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 20px;
}

.sp-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-cyan), #0284c7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  color: #050608;
}

.sp-info h4 { font-size: 1rem; margin-bottom: 2px; }
.sp-info span { font-size: 0.78rem; color: var(--text-muted); font-family: var(--font-mono); }

.settings-section {
  margin-bottom: 20px;
}

.settings-sec-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  padding-left: 4px;
}

.wallpaper-options {
  display: flex;
  gap: 10px;
}

.wp-btn {
  flex: 1;
  height: 44px;
  border-radius: 12px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.wp-btn.active {
  border-color: #ffffff;
  transform: scale(1.05);
}

.wp-cyber { background: linear-gradient(135deg, #172554, #030712); }
.wp-neon { background: linear-gradient(135deg, #4c0519, #020617); }
.wp-deep { background: linear-gradient(135deg, #064e3b, #020617); }
.wp-pink { background: linear-gradient(135deg, #831843, #09090b); }

.settings-links-list {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
}

.settings-link-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #ffffff;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
}

.settings-link-row:last-child { border-bottom: none; }
.settings-link-row:hover { background: rgba(255, 255, 255, 0.05); }
.link-handle { font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent-cyan); font-weight: normal; }

.settings-info-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 12px 14px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.8rem;
}

.info-row span:first-child { color: var(--text-muted); }
.info-row span:last-child { font-family: var(--font-mono); color: var(--text-secondary); }

/* ========================================================
   HOME INDICATOR BAR (Persistent Bottom Pill)
   ======================================================== */
.home-indicator-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  cursor: pointer;
  background: transparent;
}

.home-indicator-pill {
  width: 130px;
  height: 5px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 10px;
  transition: width 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.home-indicator-bar:hover .home-indicator-pill,
.home-indicator-bar:active .home-indicator-pill {
  background: #ffffff;
  transform: scaleY(1.3);
}

/* ========================================================
   PHONE MODE OVERLAY (HOMEPAGE FULLSCREEN MODAL)
   ======================================================== */
.phone-modal-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.phone-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 10, 0.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  z-index: 1;
}

.phone-modal-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.phone-modal-container {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 16px;
  overflow: hidden;
}

/* Floating Top Control Bar */
.phone-modal-header {
  position: fixed;
  top: 24px;
  right: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 100000;
  transition: opacity 0.3s ease;
}

.phone-modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  padding: 6px 14px;
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #94a3b8;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.phone-modal-badge .pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.phone-modal-close-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(244, 63, 94, 0.16);
  border: 1px solid rgba(244, 63, 94, 0.45);
  color: #fda4af;
  border-radius: 20px;
  padding: 6px 14px;
  font-family: var(--font-mono, monospace);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.phone-modal-close-btn:hover {
  background: rgba(244, 63, 94, 0.32);
  border-color: #f43f5e;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(244, 63, 94, 0.45);
}

.phone-modal-close-btn .close-icon {
  font-size: 1.1rem;
  line-height: 1;
}

/* Modal scale and opacity animations */
.phone-modal-overlay .phone-device {
  transform: scale(0.85);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9), 0 0 45px rgba(56, 189, 248, 0.18);
}

.phone-modal-overlay.active .phone-device {
  transform: scale(1);
  opacity: 1;
}

.phone-modal-overlay.closing .phone-device {
  transform: scale(0.85);
  opacity: 0;
}

.phone-modal-overlay.closing {
  opacity: 0;
}

/* ========================================================
   RESPONSIVE MOBILE VIEWPORT (Edge-to-Edge Adaptive)
   ======================================================== */
@media (max-width: 500px) {
  body.phone-standalone-page {
    background: #000000;
  }

  .phone-desktop-stage {
    padding: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: #000000;
  }

  .phone-desktop-stage::before {
    display: none;
  }

  .phone-device {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    background: #000000;
  }

  .phone-hardware-btn {
    display: none;
  }

  .phone-screen {
    border-radius: 0;
    box-shadow: none;
  }

  .status-bar {
    padding: 0 16px;
    height: 48px;
    padding-top: env(safe-area-inset-top, 6px);
  }

  .dynamic-island {
    top: calc(env(safe-area-inset-top, 6px) + 6px);
  }

  .app-layer {
    transform: none !important;
  }

  .home-indicator-bar {
    bottom: env(safe-area-inset-bottom, 0);
  }

  /* Modal Specific Mobile Adjustments */
  .phone-modal-container {
    padding: 0;
  }

  .phone-modal-header {
    position: fixed;
    top: calc(env(safe-area-inset-top, 6px) + 54px);
    right: 16px;
    left: auto;
    width: auto;
    padding: 0;
    gap: 0;
  }

  .phone-modal-badge {
    display: none !important;
  }

  .phone-modal-close-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(244, 63, 94, 0.22);
    border: 1px solid rgba(244, 63, 94, 0.5);
    color: #fda4af;
    font-size: 0.7rem;
    font-weight: 700;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  .phone-modal-close-btn .close-label {
    display: inline;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
  }
}

/* ==============================================================================
   ARCADE SELECTOR BAR & TABS
   ============================================================================== */
.arcade-selector-bar {
  display: flex;
  gap: 8px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 5px;
  margin-bottom: 8px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.arcade-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 8px 10px;
  font-family: var(--font-mono, monospace);
  font-size: 0.78rem;
  font-weight: 700;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.15);
}

.arcade-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.arcade-tab-btn.active[data-arcade-game="snake"] {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.4);
  color: #10b981;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}

.arcade-tab-btn.active[data-arcade-game="flappy"] {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.4);
  color: #f59e0b;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}

.arcade-panel {
  display: none;
}

.arcade-panel.active {
  display: flex;
  animation: arcadePanelFade 0.22s ease;
}

@keyframes arcadePanelFade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==============================================================================
   FLAPPY BIRD ARCADE GAME STYLES
   ============================================================================== */
.flappy-app-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  padding: 4px 14px 70px;
  gap: 12px;
  color: #f8fafc;
}

.flappy-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.fhud-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.flappy-logo-icon {
  font-size: 1.4rem;
}

.flappy-title {
  font-family: var(--font-mono, monospace);
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  color: #f59e0b;
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.fhud-stats {
  display: flex;
  align-items: center;
  gap: 14px;
}

.fhud-stat-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.fhud-label {
  font-size: 0.62rem;
  font-family: var(--font-mono, monospace);
  color: #94a3b8;
  letter-spacing: 0.05em;
}

.fhud-val {
  font-family: var(--font-mono, monospace);
  font-weight: 800;
  font-size: 1.05rem;
  color: #f8fafc;
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.15), color 0.15s ease;
}

.fhud-val.score-pop {
  transform: scale(1.35);
  color: #f59e0b;
  text-shadow: 0 0 12px rgba(245, 158, 11, 0.8);
}

/* Flappy Arena Frame & Canvas */
.flappy-arena-frame {
  position: relative;
  width: 100%;
  max-width: 340px;
  height: 380px;
  margin: 0 auto;
  border-radius: 16px;
  background: radial-gradient(circle at center, #0f172a 0%, #030712 100%);
  border: 2px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.2), inset 0 0 15px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.flappy-arena-frame.screen-shake {
  animation: arenaShake 0.28s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes arenaShake {
  10%, 90% { transform: translate3d(-2px, 1px, 0); }
  20%, 80% { transform: translate3d(3px, -2px, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 3px, 0); }
  40%, 60% { transform: translate3d(4px, -2px, 0); }
}

#flappy-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Flappy Overlays */
.flappy-overlay {
  position: absolute;
  inset: 0;
  background: rgba(3, 7, 18, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  z-index: 10;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.15);
}

.flappy-start-icon {
  font-size: 2.8rem;
  margin-bottom: 4px;
  animation: flappyIconBounce 1.8s infinite ease-in-out;
}

@keyframes flappyIconBounce {
  0%, 100% { transform: translateY(0) scale(1); filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.5)); }
  50% { transform: translateY(-8px) scale(1.08); filter: drop-shadow(0 0 16px rgba(245, 158, 11, 0.8)); }
}

.flappy-start-title {
  font-family: var(--font-mono, monospace);
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #f59e0b;
  margin-bottom: 6px;
  text-shadow: 0 0 14px rgba(245, 158, 11, 0.6);
}

.flappy-start-sub {
  font-size: 0.78rem;
  color: #94a3b8;
  max-width: 260px;
  margin-bottom: 14px;
  line-height: 1.4;
}

.flappy-start-meta {
  font-family: var(--font-mono, monospace);
  font-size: 0.82rem;
  color: #cbd5e1;
  margin-bottom: 16px;
}

.btn-flappy-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  border: none;
  border-radius: 24px;
  padding: 10px 22px;
  font-size: 0.86rem;
  font-weight: 800;
  font-family: var(--font-mono, monospace);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
  transition: all 0.2s ease;
}

.btn-flappy-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6);
}

.btn-flappy-primary:active {
  transform: translateY(1px);
}

.btn-flappy-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-flappy-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
}

.flappy-control-tips {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 14px;
  font-size: 0.68rem;
  color: #64748b;
  font-family: var(--font-mono, monospace);
}

/* Flappy Game Over Card */
.flappy-gameover-tag {
  font-family: var(--font-mono, monospace);
  font-size: 1.6rem;
  font-weight: 900;
  color: #f43f5e;
  letter-spacing: 0.15em;
  margin-bottom: 12px;
  text-shadow: 0 0 14px rgba(244, 63, 94, 0.6);
  animation: tagPulse 1.5s infinite alternate ease-in-out;
}

.flappy-final-scores {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
}

.ffinal-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 8px 16px;
  min-width: 80px;
}

.ffinal-label {
  font-size: 0.62rem;
  font-family: var(--font-mono, monospace);
  color: #94a3b8;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.ffinal-val {
  font-family: var(--font-mono, monospace);
  font-size: 1.3rem;
  font-weight: 900;
  color: #f8fafc;
}

.flappy-new-record-badge {
  font-family: var(--font-mono, monospace);
  font-size: 0.8rem;
  font-weight: 900;
  color: #fef08a;
  background: rgba(234, 179, 8, 0.25);
  border: 1px solid rgba(234, 179, 8, 0.5);
  border-radius: 16px;
  padding: 4px 14px;
  margin-bottom: 16px;
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.35);
  animation: flappyRecordGlow 1.2s infinite alternate;
}

.flappy-action-row {
  display: flex;
  gap: 10px;
}

.flappy-footer-hint {
  text-align: center;
  font-size: 0.65rem;
  color: #64748b;
  margin-top: 4px;
  line-height: 1.3;
}

/* ==============================================================================
   SNAKE RETRO ARCADE GAME STYLES
   ============================================================================== */
.snake-app-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  padding: 4px 14px 70px;
  gap: 12px;
  color: #f8fafc;
}

.snake-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.shud-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.snake-logo-icon {
  font-size: 1.4rem;
}

.snake-title {
  font-family: var(--font-mono, monospace);
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  color: #10b981;
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.shud-stats {
  display: flex;
  align-items: center;
  gap: 12px;
}

.shud-stat-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.shud-label {
  font-size: 0.62rem;
  font-family: var(--font-mono, monospace);
  color: #94a3b8;
  letter-spacing: 0.05em;
}

.shud-val {
  font-family: var(--font-mono, monospace);
  font-weight: 800;
  font-size: 1.05rem;
  color: #f8fafc;
}

/* Arena Frame & Canvas */
.snake-arena-frame {
  position: relative;
  width: 100%;
  max-width: 340px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  border-radius: 14px;
  background: radial-gradient(circle at center, #0f172a 0%, #030712 100%);
  border: 2px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.2), inset 0 0 15px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#snake-canvas {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
}

/* Overlays (Start & Game Over) */
.snake-overlay {
  position: absolute;
  inset: 0;
  background: rgba(3, 7, 18, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  z-index: 10;
  transition: opacity 0.25s ease;
}

.snake-start-icon {
  font-size: 2.8rem;
  margin-bottom: 4px;
  animation: snakeIconPulse 2s infinite ease-in-out;
}

@keyframes snakeIconPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px rgba(16, 185, 129, 0.4)); }
  50% { transform: scale(1.1); filter: drop-shadow(0 0 14px rgba(16, 185, 129, 0.8)); }
}

.snake-start-title {
  font-family: var(--font-mono, monospace);
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #10b981;
  margin-bottom: 6px;
  text-shadow: 0 0 12px rgba(16, 185, 129, 0.6);
}

.snake-start-sub {
  font-size: 0.78rem;
  color: #94a3b8;
  max-width: 260px;
  margin-bottom: 14px;
  line-height: 1.4;
}

.snake-start-meta {
  font-family: var(--font-mono, monospace);
  font-size: 0.82rem;
  color: #cbd5e1;
  margin-bottom: 16px;
}

.btn-snake-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border: none;
  border-radius: 24px;
  padding: 10px 22px;
  font-size: 0.86rem;
  font-weight: 800;
  font-family: var(--font-mono, monospace);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
  transition: all 0.2s ease;
}

.btn-snake-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

.btn-snake-primary:active {
  transform: translateY(1px);
}

.btn-snake-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-snake-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
}

.snake-control-tips {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 14px;
  font-size: 0.68rem;
  color: #64748b;
  font-family: var(--font-mono, monospace);
}

/* Game Over Overlay */
.snake-gameover-tag {
  font-family: var(--font-mono, monospace);
  font-size: 1.6rem;
  font-weight: 900;
  color: #f43f5e;
  letter-spacing: 0.12em;
  text-shadow: 0 0 16px rgba(244, 63, 94, 0.6);
  margin-bottom: 12px;
}

.snake-final-scores {
  display: flex;
  gap: 24px;
  margin-bottom: 14px;
}

.sfinal-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sfinal-label {
  font-size: 0.68rem;
  font-family: var(--font-mono, monospace);
  color: #94a3b8;
}

.sfinal-val {
  font-family: var(--font-mono, monospace);
  font-size: 1.3rem;
  font-weight: 900;
  color: #f8fafc;
}

.snake-submit-box {
  width: 100%;
  max-width: 260px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.snake-submit-box label {
  font-size: 0.68rem;
  font-family: var(--font-mono, monospace);
  color: #94a3b8;
}

.snake-input-row {
  display: flex;
  gap: 6px;
}

.snake-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 6px 10px;
  color: #f8fafc;
  font-family: var(--font-mono, monospace);
  font-size: 0.82rem;
}

.btn-snake-save {
  background: #38bdf8;
  color: #030712;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-weight: 800;
  font-size: 0.75rem;
  font-family: var(--font-mono, monospace);
  cursor: pointer;
}

.snake-feedback-msg {
  font-size: 0.72rem;
  margin-top: 4px;
}

.snake-feedback-msg.success { color: #10b981; }
.snake-feedback-msg.error { color: #f43f5e; }

.snake-action-row {
  display: flex;
  gap: 10px;
}

/* D-Pad Controls for Mobile */
.snake-dpad-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 4px auto;
  user-select: none;
  -webkit-user-select: none;
}

.dpad-row {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.dpad-btn {
  width: 52px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #f8fafc;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  transition: all 0.1s ease;
}

.dpad-btn:active {
  background: rgba(16, 185, 129, 0.35);
  border-color: #10b981;
  color: #10b981;
  transform: scale(0.94);
}

.dpad-center {
  background: rgba(15, 23, 42, 0.9);
  color: #64748b;
  font-size: 0.75rem;
}

/* Snake Leaderboard */
.snake-leaderboard-section {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.slb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 800;
  font-family: var(--font-mono, monospace);
  color: #10b981;
}

.slb-refresh-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.95rem;
  cursor: pointer;
}

.snake-leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.slb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(30, 41, 59, 0.35);
  font-family: var(--font-mono, monospace);
  font-size: 0.8rem;
}

.slb-rank {
  color: #38bdf8;
  font-weight: 800;
  width: 28px;
}

.slb-name {
  flex: 1;
  color: #e2e8f0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slb-score {
  font-weight: 800;
  color: #10b981;
}

/* ==============================================================================
   MANIFEST PHONE MODE (TAM EKRAN TELEFON ÖZEL DENEYİMİ)
   ============================================================================== */

.manifest-layer {
  position: absolute;
  inset: 0;
  z-index: 75; /* Sits above home-layer (50) and app-layer (55), below status-bar (80) */
  background: radial-gradient(circle at 50% 32%, rgba(244, 114, 182, 0.42) 0%, rgba(236, 72, 153, 0.28) 42%, rgba(20, 5, 22, 0.94) 100%), #120414;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  cursor: pointer;
  transition: opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.32s ease;
}

.manifest-layer.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.manifest-layer.closing {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.4, 0, 1, 1), visibility 0.28s ease;
}

/* Phone Screen Pink Theme Accent when Manifest is active */
.phone-screen[data-manifest="true"] {
  background: radial-gradient(circle at 50% 25%, #3b0764 0%, #1a021e 55%, #0d010f 100%) !important;
  box-shadow: inset 0 0 50px rgba(236, 72, 153, 0.4), 0 0 35px rgba(244, 114, 182, 0.3) !important;
}

.phone-device[data-manifest="true"] {
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.8), 0 0 45px rgba(244, 114, 182, 0.35) !important;
  border-color: rgba(244, 114, 182, 0.45) !important;
}

/* Disko / Parti Işıkları Katmanı */
.manifest-disco-lights {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
  opacity: 0.82;
  mix-blend-mode: screen;
  background:
    radial-gradient(circle at 20% 25%, rgba(244, 114, 182, 0.22) 0%, transparent 48%),
    radial-gradient(circle at 80% 35%, rgba(236, 72, 153, 0.2) 0%, transparent 48%),
    radial-gradient(circle at 45% 75%, rgba(251, 113, 133, 0.18) 0%, transparent 50%),
    radial-gradient(circle at 85% 70%, rgba(244, 63, 94, 0.15) 0%, transparent 42%);
  animation: manifestDiscoDance 8s ease-in-out infinite alternate;
}

@keyframes manifestDiscoDance {
  0% { transform: scale(1) rotate(0deg); opacity: 0.65; }
  50% { transform: scale(1.08) rotate(3deg); opacity: 0.95; }
  100% { transform: scale(1.03) rotate(-2.5deg); opacity: 0.7; }
}

/* 1:1 Kare Dolanıcı Video Konteyneri */
.manifest-wandering-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 120px;
  height: 120px;
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  border: 2.5px solid rgba(244, 114, 182, 0.85);
  box-shadow: 0 10px 30px rgba(236, 72, 153, 0.55), 0 0 20px rgba(244, 114, 182, 0.5);
  overflow: hidden;
  z-index: 10;
  background: #000;
  pointer-events: none;
  will-change: transform;
  transform: translate3d(20px, 60px, 0);
  transition: opacity 0.25s ease;
}

.manifest-wandering-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Alt Çıkış Alanı & Zarif Bilgilendirme Yazısı */
.manifest-exit-bar {
  position: absolute;
  bottom: 34px; /* Strictly above the 24px home indicator pill */
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  z-index: 20;
  pointer-events: auto;
  cursor: pointer;
}

.manifest-exit-text {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 600;
  color: #fff1f2;
  background: rgba(32, 6, 28, 0.78);
  border: 1px solid rgba(244, 114, 182, 0.45);
  border-radius: 24px;
  padding: 8px 16px;
  letter-spacing: 0.02em;
  text-align: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 18px rgba(236, 72, 153, 0.3), inset 0 0 10px rgba(244, 114, 182, 0.15);
  animation: manifestExitPulse 2.8s ease-in-out infinite alternate;
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
  max-width: 88%;
}

.manifest-exit-text:hover,
.manifest-exit-text:active {
  background: rgba(236, 72, 153, 0.35);
  border-color: #f472b6;
  transform: scale(1.03);
}

@keyframes manifestExitPulse {
  0% {
    opacity: 0.82;
    box-shadow: 0 0 12px rgba(244, 114, 182, 0.25), inset 0 0 6px rgba(244, 114, 182, 0.1);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 24px rgba(244, 114, 182, 0.55), inset 0 0 12px rgba(244, 114, 182, 0.25);
  }
  100% {
    opacity: 0.82;
    box-shadow: 0 0 12px rgba(244, 114, 182, 0.25), inset 0 0 6px rgba(244, 114, 182, 0.1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .phone-layer,
  .app-layer,
  .app-layer.active,
  .app-layer.closing-to-icon,
  .app-layer.opening-from-icon,
  .app-layer.spring-back,
  .home-layer,
  .arcade-tab-btn,
  .arcade-panel,
  .flappy-overlay,
  .flappy-start-icon,
  .flappy-arena-frame.screen-shake {
    transition: opacity 0.15s ease !important;
    animation: none !important;
    transform: none !important;
  }
}

