/* Mobile Animation Studio Launcher Styles */
:root {
  --bg-primary: #070a14;
  --bg-surface: rgba(15, 23, 42, 0.85);
  --bg-card: rgba(17, 24, 39, 0.9);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 240, 255, 0.35);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-cyan: #00f0ff;
  --accent-magenta: #ff007f;
  --accent-amber: #ffaa00;
  --accent-green: #10b981;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(0, 240, 255, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(255, 0, 127, 0.05) 0%, transparent 40%),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
  overflow-x: hidden;
}

/* Header */
header {
  padding: 36px 40px 20px;
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 20px;
}

.studio-title-area h1 {
  font-size: 28px;
  letter-spacing: 3px;
  font-weight: 900;
  text-transform: uppercase;
  background: linear-gradient(135deg, #ffffff 30%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 12px;
}

.studio-title-area p {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 6px;
}

.studio-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.stat-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.stat-chip .val {
  color: var(--accent-cyan);
  font-weight: 800;
}

/* Toolbar */
.toolbar {
  max-width: 1300px;
  margin: 24px auto 0;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.filter-tabs {
  display: flex;
  gap: 8px;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn.active, .tab-btn:hover {
  background: rgba(0, 240, 255, 0.15);
  color: var(--accent-cyan);
}

.doc-links {
  display: flex;
  gap: 12px;
}

.doc-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s;
}

.doc-link:hover {
  color: #fff;
  border-color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.08);
}

/* Main Grid */
main {
  max-width: 1300px;
  margin: 32px auto 60px;
  padding: 0 40px;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 28px;
}

/* Game Card */
.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  position: relative;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-cyan);
  box-shadow: 0 12px 30px rgba(0, 240, 255, 0.12);
}

.card-header {
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.card-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.status-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
}

.status-playable {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-indev {
  background: rgba(255, 170, 0, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(255, 170, 0, 0.3);
}

.orientation-tag {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.game-card h2 {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.game-card .tagline {
  color: var(--accent-cyan);
  font-size: 13px;
  font-weight: 500;
}

.card-body {
  padding: 20px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card-desc {
  font-size: 13px;
  line-height: 1.5;
  color: #cbd5e1;
}

.section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.highlights-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.highlights-list li {
  font-size: 12px;
  color: #94a3b8;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.highlights-list li::before {
  content: "✨";
  font-size: 11px;
}

.touch-controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.touch-row {
  display: flex;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
}

.touch-gesture {
  color: var(--accent-cyan);
  font-weight: 700;
}

.touch-action {
  color: #94a3b8;
}

.card-footer {
  padding: 16px 24px;
  background: rgba(0, 0, 0, 0.25);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: 12px;
}

.btn-play {
  flex: 1;
  background: linear-gradient(135deg, var(--accent-cyan), #00a8ff);
  border: none;
  color: #050a14;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 1px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-play:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 16px rgba(0, 240, 255, 0.35);
}

.btn-tab {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 12px;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-tab:hover {
  border-color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.1);
}

/* Mobile Simulator Modal */
#simulator-modal {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 15, 0.88);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

#simulator-modal.hidden {
  display: none;
}

.sim-topbar {
  padding: 12px 24px;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.sim-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sim-device-title {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}

.sim-controls-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sim-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: #f1f5f9;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.sim-btn:hover {
  background: rgba(0, 240, 255, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.sim-btn.active {
  background: var(--accent-cyan);
  color: #030712;
  border-color: var(--accent-cyan);
  font-weight: 800;
}

.sim-select {
  background: #1e293b;
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  outline: none;
}

.sim-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 20px;
}

/* Realistic Phone Frame */
.device-frame {
  position: relative;
  background: #000;
  border-radius: 48px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 0 12px #222834, 0 0 0 14px rgba(255, 255, 255, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.device-frame.landscape {
  border-radius: 36px;
}

/* Dynamic Island / Notch */
.dynamic-island {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 28px;
  background: #000;
  border-radius: 20px;
  z-index: 100;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 10px;
}

.island-camera {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #0a0e17;
  border: 1px solid #1f293d;
}

/* Home Indicator Bar */
.home-indicator {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 130px;
  height: 4px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 4px;
  z-index: 100;
  pointer-events: none;
}

.device-viewport {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.device-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Diagnostics Bar */
.sim-diagnostics {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 8px 16px;
  font-family: monospace;
  font-size: 12px;
  display: flex;
  gap: 16px;
  backdrop-filter: blur(8px);
  color: var(--accent-cyan);
}
