/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Colors */
  --bg-dark: #070a13;
  --bg-card: rgba(15, 23, 42, 0.45);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(129, 140, 248, 0.4);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --primary: #818cf8; /* Lavender Blue */
  --secondary: #f43f5e; /* Rose Coral */
  --accent: #fb923c; /* Sunset Orange */
  
  --grad-primary: linear-gradient(135deg, #818cf8 0%, #f43f5e 50%, #fb923c 100%);
  --grad-care: linear-gradient(135deg, #34d399 0%, #059669 100%);
  --grad-reader: linear-gradient(135deg, #60a5fa 0%, #2563eb 100%);
  --grad-threed: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%);

  /* Transitions & Shadows */
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-glow: 0 0 40px rgba(129, 140, 248, 0.15);
  --shadow-card: 0 20px 40px rgba(0, 0, 0, 0.3);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Outfit', 'Noto Sans KR', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Background Blur Orbs */
.blur-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  opacity: 0.45;
  pointer-events: none;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: var(--primary);
  top: -100px;
  right: -50px;
  animation: floatOrb1 15s infinite alternate ease-in-out;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: var(--secondary);
  bottom: -150px;
  left: -100px;
  animation: floatOrb2 20s infinite alternate ease-in-out;
}

.orb-3 {
  width: 350px;
  height: 350px;
  background: var(--accent);
  top: 40%;
  left: 30%;
  opacity: 0.2;
  animation: floatOrb3 18s infinite alternate ease-in-out;
}

@keyframes floatOrb1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-80px, 50px) scale(1.1); }
}

@keyframes floatOrb2 {
  0% { transform: translate(0, 0) scale(1.1); }
  100% { transform: translate(100px, -60px) scale(0.9); }
}

@keyframes floatOrb3 {
  0% { transform: translate(0, 0) scale(0.9); }
  100% { transform: translate(-50px, -50px) scale(1.2); }
}

/* Typography & Layout Utilities */
h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-smooth);
}

.gradient-text {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(129, 140, 248, 0.1);
  color: var(--primary);
  border: 1px solid rgba(129, 140, 248, 0.25);
  margin-bottom: 20px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Header & Nav */
#main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(7, 10, 19, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition-smooth);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.logo-accent {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-menu {
  display: flex;
  gap: 32px;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 8px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--grad-primary);
  transition: var(--transition-smooth);
  border-radius: 2px;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

.nav-link.active::after {
  width: 100%;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: none;
}

.btn-primary {
  background: var(--grad-primary);
  color: white;
  box-shadow: 0 4px 20px rgba(244, 63, 94, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(244, 63, 94, 0.45);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
  border-color: var(--primary);
  background: rgba(129, 140, 248, 0.05);
}

.btn-gradient {
  background: var(--grad-primary);
  color: white;
  width: 100%;
  margin-top: 15px;
}

/* Mobile Toggle Menu */
.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

.mobile-nav-overlay {
  position: fixed;
  top: 77px;
  left: 0;
  width: 100%;
  height: 0;
  background: rgba(7, 10, 19, 0.95);
  backdrop-filter: blur(20px);
  z-index: 99;
  overflow: hidden;
  transition: var(--transition-smooth);
  border-bottom: 0 solid var(--border-color);
}

.mobile-nav-overlay.open {
  height: calc(100vh - 77px);
  border-bottom: 1px solid var(--border-color);
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  padding: 40px 24px;
  gap: 24px;
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.mobile-nav-overlay.open .mobile-nav-links {
  opacity: 1;
  transform: translateY(0);
}

.mobile-link {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-link.active {
  color: var(--primary);
}

/* Main Content Container & Sections */
#content-container {
  margin-top: 77px;
  min-height: calc(100vh - 77px - 280px);
  position: relative;
}

.content-section {
  display: none;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px;
}

.content-section.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Hero Section */
.hero-container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 48px;
  padding: 40px 0 100px;
}

.hero-title {
  font-size: 4rem;
  line-height: 1.1;
  font-weight: 800;
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 600px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.visual-card-wrapper {
  position: relative;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1;
  border-radius: 30px;
  background: var(--grad-primary);
  padding: 2px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.visual-card {
  width: 100%;
  height: 100%;
  background: var(--bg-dark);
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.visual-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 0%, rgba(129, 140, 248, 0.15), transparent 70%);
  pointer-events: none;
}

.magic-icon {
  font-size: 4rem;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 24px;
  animation: spark 3s infinite alternate ease-in-out;
}

@keyframes spark {
  0% { transform: scale(1) rotate(0deg); filter: drop-shadow(0 0 0px rgba(129,140,248,0)); }
  100% { transform: scale(1.1) rotate(10deg); filter: drop-shadow(0 0 20px rgba(244,63,94,0.5)); }
}

.visual-card h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.visual-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Glass Cards & Grid ShowCase */
.showcase-container {
  padding-top: 60px;
  border-top: 1px solid var(--border-color);
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: 2.25rem;
  margin-bottom: 16px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.app-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 40px 32px;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.app-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
  pointer-events: none;
}

.app-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(15, 23, 42, 0.6);
  box-shadow: var(--shadow-glow);
}

.card-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: white;
  margin-bottom: 28px;
}

.care-bg { background: var(--grad-care); }
.reader-bg { background: var(--grad-reader); }
.threed-bg { background: var(--grad-threed); }

.app-card h3 {
  font-size: 1.4rem;
  margin-bottom: 16px;
}

.app-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 30px;
  flex-grow: 1;
}

.card-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  transition: var(--transition-smooth);
}

.app-card:hover .card-more {
  color: var(--secondary);
  transform: translateX(4px);
}

/* App Detail Pages */
.app-detail-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
  padding: 40px 0;
}

.app-detail-container.reverse {
  direction: rtl;
}

.app-detail-container.reverse .app-detail-text {
  direction: ltr; /* Reset text direction for readability */
}

.care-badge {
  background: rgba(52, 211, 153, 0.1);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.25);
}

.reader-badge {
  background: rgba(96, 165, 250, 0.1);
  color: #60a5fa;
  border-color: rgba(96, 165, 250, 0.25);
}

.threed-badge {
  background: rgba(167, 139, 250, 0.1);
  color: #a78bfa;
  border-color: rgba(167, 139, 250, 0.25);
}

.app-detail-text h2 {
  font-size: 3rem;
  margin-bottom: 8px;
}

.detail-slogan {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.5;
}

.app-detail-text p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.7;
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 1rem;
  color: var(--text-secondary);
}

.feature-list li i {
  color: var(--primary);
  font-size: 1.1rem;
  margin-top: 4px;
}

#care .feature-list li i { color: #34d399; }
#reader .feature-list li i { color: #60a5fa; }
#three-d .feature-list li i { color: #a78bfa; }

.app-detail-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.image-placeholder {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 4/3;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-card);
}

.shadow-glow {
  position: relative;
}

.shadow-glow::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 80%;
  background: var(--grad-primary);
  filter: blur(60px);
  opacity: 0.15;
  z-index: -1;
}

.image-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.image-placeholder img:hover {
  transform: scale(1.03);
}

/* Footer Style */
footer {
  background: rgba(7, 10, 19, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-color);
  padding: 60px 24px 30px;
  position: relative;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .footer-logo {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.03em;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 400px;
}

.footer-container h4 {
  font-size: 1.1rem;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.footer-links, .footer-legal {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a, .footer-legal a {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.footer-links a:hover, .footer-legal a:hover {
  color: var(--primary);
  transform: translateX(3px);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid var(--border-color);
  padding-top: 30px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Modals (Glassmorphism overlay) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(3, 5, 10, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 20px;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  width: 100%;
  max-width: 650px;
  max-height: 85vh;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
  position: relative;
  display: flex;
  flex-direction: column;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.modal-overlay.open .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.modal-close:hover {
  color: var(--text-primary);
  transform: rotate(90deg);
}

.modal-body {
  padding: 40px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.modal-body h2 {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.modal-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.modal-scroll-area {
  overflow-y: auto;
  padding-right: 12px;
  max-height: 50vh;
}

.modal-scroll-area::-webkit-scrollbar {
  width: 6px;
}

.modal-scroll-area::-webkit-scrollbar-track {
  background: transparent;
}

.modal-scroll-area::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.modal-scroll-area h3 {
  font-size: 1.1rem;
  margin: 24px 0 12px;
  color: var(--text-primary);
}

.modal-scroll-area p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.6;
}

.modal-scroll-area ul {
  padding-left: 20px;
  margin-bottom: 16px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.modal-scroll-area li {
  margin-bottom: 8px;
}

/* Responsiveness */
@media (max-width: 992px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }
  
  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .app-detail-container, .app-detail-container.reverse {
    grid-template-columns: 1fr;
    gap: 40px;
    direction: ltr;
  }
  
  .app-detail-image {
    order: 2;
  }
  
  .app-detail-text {
    order: 1;
  }
  
  .app-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-menu, .header-cta {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .hero-title {
    font-size: 2.8rem;
  }
  
  .app-detail-text h2 {
    font-size: 2.2rem;
  }
  
  .footer-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

/* Language Selector Styles */
.lang-selector-wrapper {
  position: relative;
  display: inline-block;
  margin-right: 15px;
}

.lang-selector-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.lang-selector-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
}

.lang-selector-btn .chevron-icon {
  font-size: 0.75rem;
  transition: transform 0.3s ease;
  color: var(--text-secondary);
}

.lang-selector-wrapper.open .lang-selector-btn .chevron-icon {
  transform: rotate(180deg);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 8px;
  min-width: 140px;
  box-shadow: var(--shadow-card);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition-smooth);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lang-selector-wrapper.open .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 8px 12px;
  text-align: left;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
  width: 100%;
}

.lang-option:hover, .lang-option.active {
  background: rgba(129, 140, 248, 0.1);
  color: var(--primary);
}

.lang-option.active {
  font-weight: 700;
}

/* Mobile Language Selector Styles */
.mobile-lang-selector {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-lang-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  flex-grow: 1;
  text-align: center;
}

.mobile-lang-btn.active {
  background: var(--grad-primary);
  color: white;
  border-color: transparent;
}

