/* ============================================================
   Dolmaro Tools — Hub Page
   ============================================================ */

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

:root {
  --bg: #ffffff;
  --bg-soft: #f9fafb;
  --bg-alt: #f1f5f9;
  --text: #111827;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --border: #e5e7eb;
  --header-bg: #0f172a;
  --header-text: #f1f5f9;
  --header-accent: #60a5fa;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-card: 0 2px 10px rgba(15, 23, 42, 0.06);
  --shadow-card-hover: 0 12px 40px rgba(15, 23, 42, 0.12);
}

html, body {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg-soft);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }

/* ------------------------------------------------------------
   Container
   ------------------------------------------------------------ */
.hub-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ------------------------------------------------------------
   Header
   ------------------------------------------------------------ */
.hub-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: var(--header-text);
  padding: 56px 0 64px;
  position: relative;
  overflow: hidden;
}
.hub-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(96, 165, 250, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 30%, rgba(220, 38, 38, 0.12) 0%, transparent 40%);
  pointer-events: none;
}
.hub-header > * { position: relative; z-index: 1; }

.hub-brand {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: #fff;
}
.brand-mark {
  font-size: 28px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}
.hub-tagline {
  margin-top: 10px;
  font-size: 16px;
  color: rgba(241, 245, 249, 0.8);
  font-weight: 400;
}

/* ------------------------------------------------------------
   Main
   ------------------------------------------------------------ */
.hub-main {
  padding: 48px 0 64px;
  min-height: 60vh;
}

.section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.apps-section { margin-bottom: 56px; }

/* ------------------------------------------------------------
   App Cards Grid
   ------------------------------------------------------------ */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 18px;
}

.app-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 24px 22px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.app-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: transparent;
  transition: background 0.2s;
}

.app-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
  border-color: transparent;
}

.app-card[data-accent="blue"]:hover::before { background: #3b82f6; }
.app-card[data-accent="red"]:hover::before { background: #dc2626; }
.app-card[data-accent="green"]:hover::before { background: #10b981; }
.app-card[data-accent="purple"]:hover::before { background: #a855f7; }

.app-card.coming-soon {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: auto;
}
.app-card.coming-soon:hover {
  transform: none;
  box-shadow: var(--shadow-card);
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.card-body { min-width: 0; }

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 10px;
}

.card-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag {
  display: inline-block;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 500;
  background: var(--bg-alt);
  color: var(--text-muted);
  border-radius: 100px;
  letter-spacing: 0.01em;
}

.app-card.coming-soon .tag {
  background: #fef3c7;
  color: #92400e;
}

.card-arrow {
  font-size: 20px;
  color: var(--text-light);
  transition: color 0.2s, transform 0.2s;
  flex-shrink: 0;
}
.app-card:hover .card-arrow {
  color: var(--text);
  transform: translateX(4px);
}
.app-card.coming-soon:hover .card-arrow {
  transform: none;
  color: var(--text-light);
}

/* ------------------------------------------------------------
   Info Section
   ------------------------------------------------------------ */
.info-section {
  padding-top: 20px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.info-item {
  padding: 20px 22px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.info-item h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.info-item p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */
.hub-footer {
  padding: 32px 0 40px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.hub-footer p {
  font-size: 12px;
  color: var(--text-light);
  text-align: center;
}

/* ------------------------------------------------------------
   Back-to-hub link (used on each app's index.html)
   ------------------------------------------------------------ */
.back-to-hub {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(6px);
  text-decoration: none;
  transition: all 0.15s;
  opacity: 0.85;
}
.back-to-hub:hover {
  opacity: 1;
  transform: translateX(-2px);
  text-decoration: none;
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */
@media (max-width: 640px) {
  .hub-container { padding: 0 20px; }
  .hub-header { padding: 36px 0 44px; }
  .hub-brand { font-size: 26px; }
  .hub-tagline { font-size: 14px; }
  .apps-grid { grid-template-columns: 1fr; }
  .app-card { padding: 18px 16px; gap: 14px; }
  .card-icon { width: 48px; height: 48px; }
  .card-title { font-size: 15px; }
  .card-desc { font-size: 12px; }
}
