@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Primary (Green) - 앱과 동일 */
  --primary: #59C36A;
  --primary-light: #7DD68B;
  --primary-dark: #3DAA57;

  /* Income/Expense - 앱과 동일 */
  --income: #59C36A;
  --income-light: #E8F5E9;
  --expense: #F44336;
  --expense-light: #FFEBEE;

  /* Light Mode - 앱과 동일 */
  --background: #FFF9E6;
  --surface: #FFFFFF;
  --surface-secondary: #F5F5F5;
  --text-primary: #212121;
  --text-secondary: #757575;
  --text-muted: #9E9E9E;
  --divider: #E0E0E0;
  --border: #E0E0E0;
}

/* Dark Mode - 앱과 동일 */
@media (prefers-color-scheme: dark) {
  :root {
    --background: #121212;
    --surface: #1E1E1E;
    --surface-secondary: #2C2C2C;
    --text-primary: #FFFFFF;
    --text-secondary: #B3B3B3;
    --text-muted: #808080;
    --divider: #424242;
    --border: #424242;
  }

  .container {
    box-shadow: none;
  }

  .info-box {
    background: linear-gradient(135deg, rgba(89, 195, 106, 0.15) 0%, rgba(125, 214, 139, 0.08) 100%);
  }

  .app-info {
    background: linear-gradient(135deg, var(--surface-secondary) 0%, var(--surface) 100%);
  }

  .faq-item {
    background: var(--surface-secondary);
  }

  table {
    box-shadow: none;
  }

  th {
    background-color: var(--surface-secondary);
  }
}

body {
  font-family: 'Inter', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--background);
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px;
  background-color: var(--surface);
  min-height: 100vh;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--divider);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

/* Language Selector */
.lang-selector {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn:hover {
  background-color: var(--surface-secondary);
  border-color: var(--primary);
  color: var(--primary);
}

.lang-btn svg {
  width: 18px;
  height: 18px;
}

.lang-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 100;
  min-width: 140px;
}

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

.lang-option {
  display: block;
  width: 100%;
  padding: 12px 20px;
  text-align: left;
  background: none;
  border: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.lang-option:hover {
  background-color: var(--surface-secondary);
}

.lang-option.active {
  background-color: rgba(89, 195, 106, 0.1);
  color: var(--primary);
}

/* Content Sections */
.content-section {
  display: none;
}

.content-section.active {
  display: block;
}

/* Typography */
h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 40px 0 16px 0;
  letter-spacing: -0.02em;
}

h2:first-child {
  margin-top: 0;
}

h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 32px 0 12px 0;
}

h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 20px 0 8px 0;
}

p {
  margin-bottom: 16px;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.8;
}

ul, ol {
  margin: 16px 0;
  padding-left: 24px;
}

li {
  margin-bottom: 10px;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.7;
}

a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Info Box */
.info-box {
  background: linear-gradient(135deg, rgba(89, 195, 106, 0.1) 0%, rgba(125, 214, 139, 0.05) 100%);
  border-left: 4px solid var(--primary);
  padding: 20px 24px;
  margin: 24px 0;
  border-radius: 0 12px 12px 0;
}

.info-box p {
  margin: 0;
  color: var(--text-primary);
  font-weight: 500;
}

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--divider);
}

th, td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--divider);
}

th {
  background-color: var(--surface-secondary);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.875rem;
}

td {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

tr:last-child td {
  border-bottom: none;
}

/* Footer */
footer {
  margin-top: 64px;
  padding: 24px 0;
  border-top: 1px solid var(--divider);
  text-align: center;
}

footer p {
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 0.875rem;
}

footer a {
  color: var(--text-secondary);
  font-weight: 400;
}

footer a:hover {
  color: var(--primary);
}

/* App Info Card */
.app-info {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: linear-gradient(135deg, var(--surface-secondary) 0%, var(--surface) 100%);
  border: 1px solid var(--divider);
  border-radius: 16px;
  margin-bottom: 32px;
}

.app-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--income) 0%, var(--income-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
  flex-shrink: 0;
}

.app-icon svg {
  width: 32px;
  height: 32px;
  color: white;
}

.app-details h3 {
  margin: 0 0 4px 0;
  font-size: 1.125rem;
  color: var(--text-primary);
}

.app-details p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* FAQ Style */
.faq-item {
  margin-bottom: 16px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-item:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(89, 195, 106, 0.15);
}

.faq-item h4 {
  margin: 0 0 8px 0;
  color: var(--text-primary);
  font-weight: 600;
}

.faq-item p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Feature Badge */
.badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  margin-right: 8px;
}

.badge-income {
  background: rgba(89, 195, 106, 0.15);
  color: var(--income);
}

.badge-expense {
  background: rgba(244, 67, 54, 0.1);
  color: var(--expense);
}

.badge-feature {
  background: rgba(89, 195, 106, 0.15);
  color: var(--primary);
}

/* Contact Card */
.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: var(--surface-secondary);
  border-radius: 16px;
  margin: 24px 0;
}

.contact-icon {
  width: 48px;
  height: 48px;
  background: var(--primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon svg {
  width: 24px;
  height: 24px;
  color: white;
}

.contact-info h4 {
  margin: 0 0 4px 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

.contact-info a {
  font-size: 1rem;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 640px) {
  .container {
    padding: 16px;
  }

  header {
    flex-direction: column;
    gap: 16px;
    padding: 16px 0;
  }

  h1 {
    font-size: 1.25rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .app-info {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }

  .faq-item {
    padding: 16px 20px;
  }

  .contact-card {
    flex-direction: column;
    text-align: center;
  }

  table {
    font-size: 0.8125rem;
  }

  th, td {
    padding: 12px 14px;
  }
}
