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

:root {
  --primary: #E91E63;
  --primary-dark: #C2185B;
  --primary-light: #F8BBD0;
  --primary-gradient: linear-gradient(135deg, #E91E63 0%, #AD1457 100%);
  --bg: #F5F6FA;
  --card: #FFFFFF;
  --text: #1A1A2E;
  --text-secondary: #6B7280;
  --border: #E5E7EB;
  --shadow: 0 4px 24px rgba(233,30,99,0.08);
  --shadow-hover: 0 8px 40px rgba(233,30,99,0.15);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Be Vietnam Pro', 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ═══════ HEADER ═══════ */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(233,30,99,0.1);
  transition: var(--transition);
}
.header.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.08); }
.header-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 0 24px; height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-icon {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--primary-gradient);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 18px;
}
.logo-text { font-weight: 700; font-size: 18px; color: var(--text); }
.logo-text span { color: var(--primary); }
.header-nav { display: flex; gap: 8px; }
.header-nav a {
  padding: 8px 16px; border-radius: 8px;
  text-decoration: none; font-size: 14px; font-weight: 500;
  color: var(--text-secondary); transition: var(--transition);
}
.header-nav a:hover, .header-nav a.active {
  background: var(--primary-light); color: var(--primary);
}

/* ═══════ HERO ═══════ */
.hero {
  margin-top: 64px;
  background: var(--primary-gradient);
  padding: 80px 24px 60px;
  text-align: center; color: #fff;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(255,255,255,0.08) 0%, transparent 50%);
}
.hero-content { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.15); backdrop-filter: blur(10px);
  padding: 6px 16px; border-radius: 100px;
  font-size: 13px; font-weight: 500; margin-bottom: 20px;
}
.hero h1 { font-size: 36px; font-weight: 800; margin-bottom: 16px; line-height: 1.3; }
.hero p { font-size: 16px; opacity: 0.9; max-width: 600px; margin: 0 auto; }

/* ═══════ CONTAINER ═══════ */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.section { padding: 60px 0; }
.section-title {
  font-size: 28px; font-weight: 700; margin-bottom: 8px;
}
.section-subtitle { color: var(--text-secondary); margin-bottom: 40px; font-size: 15px; }

/* ═══════ UC GRID ═══════ */
.uc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.uc-card {
  background: var(--card); border-radius: var(--radius);
  padding: 28px; cursor: pointer;
  border: 1px solid var(--border);
  transition: var(--transition);
  position: relative; overflow: hidden;
}
.uc-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-light);
}
.uc-card-number {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-light) 0%, rgba(233,30,99,0.1) 100%);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--primary); font-size: 16px;
  margin-bottom: 16px;
}
.uc-card h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.uc-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }
.uc-card-arrow {
  position: absolute; top: 28px; right: 24px;
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--bg); display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); transition: var(--transition);
}
.uc-card:hover .uc-card-arrow { background: var(--primary); color: #fff; }

/* ═══════ UC DETAIL ═══════ */
.uc-detail { display: none; animation: fadeIn 0.4s ease; }
.uc-detail.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.back-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 10px;
  background: var(--card); border: 1px solid var(--border);
  cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 500;
  color: var(--text-secondary); transition: var(--transition);
  margin-bottom: 24px;
}
.back-btn:hover { border-color: var(--primary); color: var(--primary); }

.uc-detail-header {
  background: var(--card); border-radius: var(--radius);
  padding: 32px; margin-bottom: 32px;
  border: 1px solid var(--border);
}
.uc-detail-header h2 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.uc-detail-header p { color: var(--text-secondary); font-size: 14px; }
.uc-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.uc-tag {
  padding: 4px 12px; border-radius: 6px; font-size: 12px; font-weight: 500;
  background: var(--primary-light); color: var(--primary-dark);
}
.uc-tag.figma { background: #EDE7F6; color: #5E35B1; }

/* ═══════ STEP TIMELINE ═══════ */
.steps-timeline { position: relative; }
.step-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 0;
  position: relative;
  margin-bottom: 48px;
}
.step-item:last-child { margin-bottom: 0; }
.step-marker {
  display: flex; flex-direction: column; align-items: center;
  position: relative;
}
.step-number {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--primary-gradient); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px; z-index: 2;
  box-shadow: 0 4px 16px rgba(233,30,99,0.3);
}
.step-line {
  position: absolute; top: 48px; bottom: -48px;
  width: 2px; background: var(--primary-light);
}
.step-item:last-child .step-line { display: none; }

.step-content {
  background: var(--card); border-radius: var(--radius);
  padding: 28px; border: 1px solid var(--border);
  transition: var(--transition);
}
.step-content:hover { box-shadow: var(--shadow); }
.step-content h3 { font-size: 18px; font-weight: 600; margin-bottom: 12px; color: var(--text); }
.step-content p { font-size: 14px; color: var(--text-secondary); margin-bottom: 16px; }

/* ═══════ PHONE FRAME ═══════ */
.phone-wrapper {
  display: flex; justify-content: center; gap: 24px;
  flex-wrap: wrap; margin: 20px 0;
}
.phone-frame {
  width: 280px; flex-shrink: 0;
  background: #1A1A2E;
  border-radius: 36px;
  padding: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2), 0 0 0 1px rgba(255,255,255,0.1) inset;
  position: relative;
}
.phone-notch {
  width: 120px; height: 28px;
  background: #1A1A2E; border-radius: 0 0 16px 16px;
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  z-index: 3;
}
.phone-notch::after {
  content: ''; position: absolute;
  width: 60px; height: 4px; background: #333;
  border-radius: 2px; top: 10px; left: 50%; transform: translateX(-50%);
}
.phone-screen {
  border-radius: 24px; overflow: hidden;
  background: #fff; position: relative;
  max-height: 580px; overflow-y: auto;
}
.phone-screen::-webkit-scrollbar { width: 0; }
.phone-screen img {
  width: 100%; display: block;
  object-fit: contain;
}
.phone-label {
  text-align: center; margin-top: 12px;
  font-size: 13px; color: var(--text-secondary); font-weight: 500;
}

/* ═══════ BUSINESS RULES ═══════ */
.rules-box {
  background: linear-gradient(135deg, #FFF8E1 0%, #FFF3E0 100%);
  border: 1px solid #FFE082; border-radius: var(--radius-sm);
  padding: 20px; margin-top: 16px;
}
.rules-box h4 {
  font-size: 14px; font-weight: 600; color: #E65100;
  margin-bottom: 10px; display: flex; align-items: center; gap: 8px;
}
.rules-box ul { padding-left: 20px; }
.rules-box li { font-size: 13px; color: #5D4037; margin-bottom: 6px; line-height: 1.6; }

.figma-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 8px;
  background: #EDE7F6; color: #5E35B1;
  text-decoration: none; font-size: 13px; font-weight: 500;
  margin-top: 16px; transition: var(--transition);
}
.figma-link:hover { background: #D1C4E9; }
.figma-link svg { width: 16px; height: 16px; }

/* ═══════ STATUS TABLE ═══════ */
.status-table-wrapper {
  overflow-x: auto; margin: 20px 0;
  border-radius: var(--radius); border: 1px solid var(--border);
}
.status-table {
  width: 100%; border-collapse: collapse;
  font-size: 14px; white-space: nowrap;
}
.status-table thead { background: var(--primary-gradient); color: #fff; }
.status-table th { padding: 14px 20px; text-align: left; font-weight: 600; }
.status-table td { padding: 12px 20px; border-bottom: 1px solid var(--border); }
.status-table tbody tr:hover { background: rgba(233,30,99,0.03); }
.status-table tbody tr:last-child td { border-bottom: none; }
.status-badge {
  display: inline-flex; padding: 4px 10px; border-radius: 6px;
  font-size: 12px; font-weight: 600;
}
.status-badge.pending { background: #FFF3E0; color: #E65100; }
.status-badge.processing { background: #E3F2FD; color: #1565C0; }
.status-badge.supplement { background: #FCE4EC; color: #C62828; }
.status-badge.rejected { background: #FFEBEE; color: #B71C1C; }
.status-badge.completed { background: #E8F5E9; color: #2E7D32; }

/* ═══════ FLOW DIAGRAM ═══════ */
.flow-diagram {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 8px; padding: 24px;
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--border); margin: 20px 0;
}
.flow-node {
  padding: 12px 20px; border-radius: 10px;
  font-size: 13px; font-weight: 600; text-align: center;
  min-width: 120px;
}
.flow-node.start { background: var(--primary-gradient); color: #fff; }
.flow-node.pending { background: #FFF3E0; color: #E65100; border: 2px solid #FFE082; }
.flow-node.processing { background: #E3F2FD; color: #1565C0; border: 2px solid #90CAF9; }
.flow-node.supplement { background: #FCE4EC; color: #C62828; border: 2px solid #EF9A9A; }
.flow-node.rejected { background: #FFEBEE; color: #B71C1C; border: 2px solid #EF9A9A; }
.flow-node.completed { background: #E8F5E9; color: #2E7D32; border: 2px solid #A5D6A7; }
.flow-arrow { font-size: 20px; color: var(--text-secondary); }

/* ═══════ FOOTER ═══════ */
.footer {
  background: #1A1A2E; color: rgba(255,255,255,0.7);
  padding: 48px 24px; text-align: center;
}
.footer a { color: var(--primary-light); text-decoration: none; }
.footer a:hover { color: #fff; }
.footer-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 16px; flex-wrap: wrap; }
.footer-links a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 8px;
  background: rgba(255,255,255,0.08); font-size: 14px;
  transition: var(--transition);
}
.footer-links a:hover { background: rgba(255,255,255,0.15); }

/* ═══════ RESPONSIVE ═══════ */
@media (max-width: 768px) {
  .hero { padding: 60px 16px 40px; }
  .hero h1 { font-size: 26px; }
  .uc-grid { grid-template-columns: 1fr; }
  .step-item { grid-template-columns: 60px 1fr; }
  .step-number { width: 40px; height: 40px; font-size: 16px; }
  .step-line { top: 40px; bottom: -48px; }
  .phone-wrapper { justify-content: center; }
  .phone-frame { width: 240px; }
  .header-nav { display: none; }
  .flow-diagram { flex-direction: column; }
  .flow-arrow { transform: rotate(90deg); }
  .status-table { font-size: 12px; }
  .status-table th, .status-table td { padding: 10px 12px; }
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .phone-frame { width: 220px; }
  .step-content { padding: 20px; }
}

/* ═══════ ANIMATIONS ═══════ */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
