*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', 'Noto Sans KR', sans-serif;
  background: var(--dark);
  color: var(--white);
  overflow-x: hidden;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--dark); }
::-webkit-scrollbar-thumb { background: var(--blue); border-radius: 3px; }

/* ─── SECTION COMMON ─── */
.section { padding: 120px 0; }
.section-alt { background: rgba(255,255,255,0.015); }

.section-header { text-align: center; margin-bottom: 72px; }
.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #60a5fa;
  margin-bottom: 16px;
}
.section-title {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.15;
  background: linear-gradient(135deg, #fff 40%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section-sub {
  color: rgba(255,255,255,0.45);
  font-size: 1rem;
  margin-top: 14px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.8;
}

@keyframes fadeUp {
  from { opacity:0; transform:translateY(24px); }
  to { opacity:1; transform:translateY(0); }
}

/* ─── APP CARDS ─── */
.app-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  height: 100%;
  cursor: pointer;
  position: relative;
}

.app-card::before {
  content: '';
  position: absolute;
  pointer-events: none;
  inset: 0;
  border-radius: 24px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, rgba(37,99,235,0.5), rgba(6,182,212,0.3)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.app-card:hover { transform: translateY(-10px); box-shadow: 0 32px 80px rgba(0,0,0,0.5); }
.app-card:hover::before { opacity: 1; }

.app-card-thumb {
  width: 100%;
  height: 220px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0d1526, #1a2640);
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-card-thumb .thumb-gradient {
  position: absolute;
  inset: 0;
  opacity: 0.6;
}

.app-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.app-card:hover .app-card-thumb img { transform: scale(1.05); }

/* Fallback icon for missing images */
.app-thumb-icon {
  position: relative;
  z-index: 1;
  width: 80px;
  height: 80px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.15);
}

.app-card-body { padding: 28px 30px 30px; }

.app-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

/* ─── 앱 뱃지 컬러 ───────────────────────────── */
.app-color-1 {
    color: var(--app-color-1);
    background: var(--app-color-1-bg);
    border: 1px solid var(--app-color-1-border);
}

.app-color-2 {
    color: var(--app-color-2);
    background: var(--app-color-2-bg);
    border: 1px solid var(--app-color-2-border);
}

.app-color-3 {
    color: var(--app-color-3);
    background: var(--app-color-3-bg);
    border: 1px solid var(--app-color-3-border);
}

.app-color-4 {
    color: var(--app-color-4);
    background: var(--app-color-4-bg);
    border: 1px solid var(--app-color-4-border);
}

.app-color-5 {
    color: var(--app-color-5);
    background: var(--app-color-5-bg);
    border: 1px solid var(--app-color-5-border);
}

.app-color-6 {
    color: var(--app-color-6);
    background: var(--app-color-6-bg);
    border: 1px solid var(--app-color-6-border);
}

.app-card-title { font-size: 1.5rem; font-weight: 800; color: #fff; margin-bottom: 10px; letter-spacing: -0.3px; }
.app-card-desc { color: rgba(255,255,255,0.5); font-size: 0.95rem; line-height: 1.7; margin-bottom: 24px; }

.app-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 24px; }
.app-tag {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.08);
}

.btn-app-detail {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(37,99,235,0.12);
  border: 1px solid rgba(37,99,235,0.3);
  color: #60a5fa;
  padding: 11px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.3s ease;
}
.btn-app-detail:hover { background: var(--blue); border-color: var(--blue); color: #fff; transform: translateX(3px); box-shadow: 0 8px 24px rgba(37,99,235,0.4); }
.btn-app-detail .arrow { transition: transform 0.3s ease; }
.btn-app-detail:hover .arrow { transform: translateX(3px); }


/* ─── FOOTER ─── */
footer {
  background: #05080f;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 56px 0 40px;
}
.footer-logo { font-size: 1.4rem; font-weight: 800; background: linear-gradient(120deg,#fff,#60a5fa); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; margin-bottom: 10px; }
.footer-desc { color: rgba(255,255,255,0.35); font-size: 0.85rem; margin-bottom: 28px; }
.footer-links { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; margin-bottom: 32px; }
.footer-link { color: rgba(255,255,255,0.4); font-size: 0.85rem; text-decoration: none; transition: color 0.2s; }
.footer-link:hover { color: #60a5fa; }
.footer-divider { border-color: rgba(255,255,255,0.06); margin: 0 0 24px; }
.footer-copy { color: rgba(255,255,255,0.25); font-size: 0.8rem; }

/* ─── MOBILE MENU ─── */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  z-index: 1030;
}
.mobile-overlay.show { display: block; }

@media (max-width: 991px) {
  .navbar-collapse {
    position: fixed;
    top: 0; right: -100%;
    width: min(80%, 380px);
    height: 100dvh;
    background: rgba(13, 21, 38, 0.99);
    backdrop-filter: blur(24px);
    padding: 80px 28px 40px;
    overflow-y: auto;
    z-index: 1060;
    border-left: 1px solid rgba(255,255,255,0.08);
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .navbar-collapse.show { right: 0; }
  .navbar-collapse.collapsing { right:0; transition:none; }
  .mobile-close-btn {
    position: absolute; top: 20px; right: 20px;
    width: 38px; height: 38px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 50%; color: #fff; font-size: 1rem;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.2s; z-index: 1;
  }
  .mobile-close-btn:hover { background: rgba(37,99,235,0.3); transform: rotate(90deg); }
  .navbar-nav { flex-direction: column; gap: 4px; }
  .nav-item { width: 100%; }
  .nav-link { padding: 13px 16px !important; }
  .dropdown-menu { position: static !important; transform: none !important; background: rgba(0,0,0,0.25); border: none; box-shadow: none; margin-top: 6px; padding: 6px; }
  .btn-nav-login { width: 100%; margin-top: 16px; text-align: center; display: block; }
  #languageSelect { width: 100%; margin-top: 12px; padding: 10px; }
}

@media (max-width: 768px) {
  .hero-stats { gap: 28px; }
  .hero-stat-num { font-size: 1.6rem; }
  .section { padding: 80px 0; }
  .community-card { padding: 24px; }
}