/* ===========================
   Base / Theme
=========================== */
:root {
  --bg-color: #f4f7fc;
  --card-bg-color: #ffffff;
  --text-color: #333333;
  --heading-color: #1a237e;
  --primary-color: #4a60d4;
  --shadow-color: rgba(0, 0, 0, .1);
}

body.dark-mode {
  --bg-color: #121212;
  --card-bg-color: #1e1e1e;
  --text-color: #e0e0e0;
  --heading-color: #bb86fc;
  --primary-color: #90a4ff;
  --shadow-color: rgba(0, 0, 0, .4);
}

* { box-sizing: border-box; }

body {
  font-family: 'Poppins','Noto Sans SC','Noto Sans TC','Noto Sans JP',sans-serif;
  margin: 0;
  padding: 2rem 1rem;
  background: var(--bg-color);
  color: var(--text-color);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  transition: background-color .3s, color .3s;
}

/* ===========================
   Container
=========================== */
.container {
  max-width: 680px;
  width: 100%;
  background: var(--card-bg-color);
  border-radius: 20px;
  box-shadow: 0 8px 20px var(--shadow-color);
  padding: 1.8rem 1.2rem;
  text-align: center;
  position: relative;
}

/* ===========================
   Home (apps list)
=========================== */
.studio-logo {
  font-size: 2.3rem;
  font-weight: 700;
  color: var(--heading-color);
  margin-bottom: 0.6rem;
}
.subtitle {
  font-size: 1rem;
  opacity: .8;
  margin-bottom: 1.6rem;
}

.app-showcase-link {
  text-decoration: none;
  color: inherit;
  display: block;
  margin-top: 0.9rem;
}
.app-showcase {
  background: var(--bg-color);
  border-radius: 15px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-align: left;
  transition: all .3s ease;
}
.app-showcase-link:hover .app-showcase {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px var(--shadow-color);
}

.app-icon {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  object-fit: cover;
  background: #ddd;
  flex-shrink: 0;
}
.app-content { flex: 1; display: flex; align-items: center; gap: 0.8rem; min-width: 0; }
.app-info { min-width: 0; }
.app-info h3 {
  margin: 0 0 .3rem 0;
  font-size: 1.25rem;
  color: var(--heading-color);
}
.app-info p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
  opacity: .9;
}

.tech-badges {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.badge {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  font-size: 0.78rem;
  line-height: 1;
  padding: 3px 7px;
  border-radius: 9999px;
  white-space: nowrap;
}
.badge-kotlin {
  color: #fff;
  background: linear-gradient(135deg,#7F52FF 0%,#C860FF 50%,#FF3D81 100%);
}
.badge-python {
  color: #fff;
  background: #3776AB;
  border: 2px solid #FFD43B;
  padding: 2px 8px;
}

/* New badges for AI QuickLaunch */
.badge-html { background: #e34f26; color: #fff; }   /* HTML5 */
.badge-css  { background: #1572b6; color: #fff; }   /* CSS3  */
.badge-js   { background: #f7df1e; color: #333; }   /* JS    */

/* ===========================
   Common Controls
=========================== */
.controls {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 10px;
  z-index: 100;
}
#lang-btn, #theme-toggle-btn {
  background: var(--card-bg-color);
  border: none;
  box-shadow: 0 2px 10px var(--shadow-color);
  border-radius: 20px;
  cursor: pointer;
  color: var(--text-color);
}
#lang-btn { padding: 8px 16px; font-weight: 600; }
#theme-toggle-btn { width: 40px; height: 40px; border-radius: 50%; }

.lang-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 45px;
  background: var(--card-bg-color);
  border-radius: 10px;
  box-shadow: 0 4px 20px var(--shadow-color);
  overflow: hidden;
  padding: 5px 0;
  z-index: 101;
}
.lang-menu.show { display: block; }
.lang-item {
  display: block;
  padding: 10px 20px;
  text-decoration: none;
  color: var(--text-color);
  font-size: .9rem;
  white-space: nowrap;
}
.lang-item:hover { background: var(--bg-color); }

/* ===========================
   Social & Footer
=========================== */
.social-links {
  margin-top: 1.2rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}
.social-links a {
  color: var(--text-color);
  font-size: 1.7rem;
  transition: .2s;
}
.social-links a:hover {
  color: var(--primary-color);
  transform: translateY(-3px);
}
footer {
  margin-top: 1.2rem;
  font-size: .85rem;
  opacity: .6;
}

/* ===========================
   Detail Pages
=========================== */
.home-link {
  position: fixed;
  top: 20px; left: 20px;
  font-size: 1.6rem;
  color: var(--text-color);
  text-decoration: none;
  opacity: .8;
  z-index: 1000;
  transition: transform .15s ease, opacity .15s ease;
}
.home-link:hover {
  opacity: 1;
  transform: translateY(-1px) scale(1.03);
}

.detail-promo-img {
  width: 100%;
  max-width: 320px;
  height: auto;
  border-radius: 14px;
  margin: 2rem auto 1rem;
  background: #ddd;
}

.detail-title {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--heading-color);
  margin: .3rem 0 .6rem;
}
.detail-desc {
  font-size: 1.05rem;
  opacity: .9;
  max-width: 540px;
  margin: .6rem auto;
  line-height: 1.7;
}
.detail-features {
  margin-top: 1rem;
  text-align: left;
  max-width: 540px;
  margin-inline: auto;
}
.detail-features h4 { margin-bottom: .4rem; color: var(--heading-color); }
.detail-features ul { padding-left: 1.2rem; margin: .3rem 0 1rem; }
.detail-features li { margin-bottom: .5rem; line-height: 1.5; }

/* Store buttons */
.detail-actions {
  margin-top: 1rem;
  text-align: center;            /* 중앙 정렬 */
}
.google-play-btn {
  display: inline-block;         /* 중앙 정렬 적용 */
}
.store-btn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  justify-items: center;
}
.store-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  font-weight: 600;
  font-size: .9rem;
  border-radius: 10px;
  text-decoration: none;
  color: #fff;
  transition: transform .2s ease, opacity .2s ease;
}
.store-btn i { font-size: 1.1rem; }
.store-btn.chrome  { background: #4c8bf5; }
.store-btn.edge    { background: #0078d7; }
.store-btn.firefox { background: #ff7139; }
.store-btn.whale   { background: #00aacc; }
.store-btn.disabled { opacity: .5; pointer-events: none; }
.store-btn:hover { transform: translateY(-2px); }

/* Google Play 공식 배지 크기/정렬 (경계 제거) */
.google-play-btn img {
  height: 56px;                  /* 데스크톱 기본 */
  width: auto;
  display: block;                /* 베이스라인 틈 제거 */
  border-radius: 0;              /* 라운드 제거 */
  box-shadow: none;              /* 그림자 제거(경계처럼 보일 수 있음) */
}

/* ===========================
   Responsive
=========================== */
@media (max-width: 960px) {
  .google-play-btn img { height: 52px; }
}
@media (max-width: 720px) {
  .google-play-btn img { height: 48px; }
}
@media (max-width: 560px) {
  .container { padding: 1.5rem 1rem; }
  .app-showcase { flex-direction: column; align-items: stretch; }
  .app-content { flex-direction: column; align-items: flex-start; }
  .app-icon { width: 68px; height: 68px; }
  .app-info h3 { font-size: 1.15rem; }
  .app-info p { font-size: .9rem; }
  .detail-title { font-size: 1.6rem; }
  .detail-desc { font-size: .95rem; max-width: 95%; }
  .google-play-btn img { height: 44px; }  /* 작은 화면 */
  .home-link { top: 14px; left: 14px; font-size: 1.5rem; }
}
