:root {
  --bg: #0f1221;
  --card: #151a2e;
  --text: #e9edf6;
  --muted: #a7b0c3;
  --accent1: #00eaff;
  --accent2: #6fff8b;
  --border: rgba(255,255,255,0.08);
}
@media (prefers-color-scheme: light) {
  :root { --bg:#f7f9fc; --card:#ffffff; --text:#101320; --muted:#4a5568; --border: rgba(0,0,0,0.06); --accent1: #007bff; --accent2: #28a745; }
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0; padding:28px 20px; font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR", "Apple SD Gothic Neo", "Inter", Arial, sans-serif;
  background:
    radial-gradient(1200px 600px at 10% -20%, rgba(0,234,255,0.14), transparent 60%),
    radial-gradient(900px 500px at 110% 20%, rgba(111,255,139,0.14), transparent 55%),
    var(--bg);
  color:var(--text);
  line-height: 1.6;
}
.wrap{max-width:920px; margin:0 auto}
.hero{
  background: linear-gradient(135deg, rgba(0,234,255,0.15), rgba(111,255,139,0.10));
  border:1px solid var(--border); border-radius:16px; padding:28px 24px; margin-bottom:24px;
  text-align: center;
}
.badge{display:inline-block; padding:6px 12px; font-size:0.8rem; color:#0b1530; background:linear-gradient(90deg, var(--accent1), var(--accent2)); border-radius:999px; font-weight:700; margin-bottom: 12px;}
.title{ margin:0 0 6px; font-size:clamp(1.6rem, 3vw, 2.3rem); font-weight:800; letter-spacing:-0.02em; }
.subtitle{ margin:0; color:var(--muted); font-size:0.95rem }

/* App List */
.app-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 30px;
}
.app-list.hidden { display: none; }
.app-list-item {
  display: flex;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.app-list-item:hover {
  border-color: var(--accent1);
  background: rgba(0, 234, 255, 0.05);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.list-app-icon {
  width: 50px;
  height: 50px;
  min-width: 50px;
  min-height: 50px;
  flex-shrink: 0;
  border-radius: 12px;
  margin-right: 16px;
  object-fit: cover;
  background: #2a2f4c;
}
.list-app-name {
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 700;
}

/* Back Button */
.back-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
}
.back-btn:hover {
  color: var(--accent1);
}

/* Selected App Detail Section */
.app-detail {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  text-align: center;
  transition: opacity 0.3s ease;
}

.app-detail.hidden { display: none; }

.app-icon {
  width: 100px;
  height: 100px;
  border-radius: 22px;
  margin: 0 auto 16px;
  background: #2a2f4c;
  object-fit: contain;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.app-name {
  font-size: 1.8rem;
  margin: 0 0 8px;
  color: var(--accent1);
  font-weight: 800;
}

.app-desc {
  font-size: 1.05rem;
  color: var(--text);
  margin: 0 0 30px;
  font-weight: 500;
}

/* Horizontal Scroll Screenshots Layout */
.screenshots-container {
  display: flex;
  overflow-x: auto;
  gap: 16px;
  padding-bottom: 20px;
  padding-top: 10px;
  margin-bottom: 24px;
  scroll-snap-type: x mandatory;
  /* Hide scrollbar */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
  -webkit-overflow-scrolling: touch; /* iOS smooth scroll */
}
.screenshots-container::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.screenshot-item {
  scroll-snap-align: center;
  flex: 0 0 auto;
  border-radius: 12px;
  width: 200px; /* Base smartphone ratio width */
  aspect-ratio: 9 / 19.5; /* Typical smartphone ratio */
  background: #1e2235;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  object-fit: cover;
  border: 1px solid var(--border);
}

/* Download Buttons */
.download-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 10px;
  margin-bottom: 30px;
}

.download-actions a {
  /* JS에서 inline-flex로 덮어쓰더라도 고정된 크기 부여 */
  display: inline-flex; 
  justify-content: center;
  align-items: center;
  width: 160px;
  height: 54px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.download-actions a:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}
.download-actions a:active {
  transform: translateY(0);
}

.dl-badge {
  width: 160px;
  height: 54px;
  object-fit: contain; /* 가로세로 비율 유지하며 지정 사이즈 내에 맞춤 */
  display: block;
}

footer{margin-top:40px; text-align:center; color:var(--muted); font-size:0.85rem; padding-bottom: 20px;}
