/* ===== Tiểu Mỡ Studio — tông 3D cartoon (Pixar-ish) ===== */
:root {
  --bg-top: #e9f4ff;
  --bg-bottom: #fff3e6;
  --ink: #2a2a4a;
  --ink-soft: #6a6a8c;
  --card: #ffffff;
  --border: #eceaf6;

  /* bảng màu tươi, cân bằng */
  --c-blue:      #3b9dff;
  --c-blue-deep: #2b6fe0;
  --c-teal:      #17c3b2;
  --c-orange:    #ff8c42;
  --c-orange-deep:#ff6a2b;
  --c-yellow:    #ffd23f;
  --c-green:     #3ddc84;

  --radius: 26px;
  --maxw: 1040px;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--ink);
  font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  background-attachment: fixed;
  position: relative;
  overflow-x: hidden;
}

/* quả cầu 3D bồng bềnh phía sau */
body::before,
body::after {
  content: "";
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(2px);
}
body::before {
  width: 300px; height: 300px;
  top: 8%; left: -90px;
  background: radial-gradient(circle at 35% 30%, #7fc4ff, #2b7fe0 70%);
  box-shadow: inset -18px -20px 40px rgba(0,0,0,.18), inset 12px 14px 30px rgba(255,255,255,.5);
  opacity: .35;
}
body::after {
  width: 340px; height: 340px;
  bottom: 4%; right: -110px;
  background: radial-gradient(circle at 35% 30%, #ffb27a, #ff7a3d 70%);
  box-shadow: inset -20px -22px 44px rgba(0,0,0,.2), inset 14px 16px 32px rgba(255,255,255,.45);
  opacity: .32;
}

h1, h2, h3, .brand span, .btn, .badge {
  font-family: "Baloo 2", "Be Vietnam Pro", system-ui, sans-serif;
  font-weight: 700;
}

a { color: var(--c-blue-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; position: relative; z-index: 1; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(233, 244, 255, 0.72);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid rgba(255,255,255,.6);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 70px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand span { font-size: 21px; }
.brand .logo {
  width: 42px; height: 42px; border-radius: 14px; object-fit: cover; display: block;
  box-shadow: 0 6px 0 rgba(43,111,224,.35), 0 10px 20px rgba(43,111,224,.35);
}
.nav {
  display: flex; gap: 6px;
  background: #fff;
  padding: 7px; border-radius: 999px;
  box-shadow: 0 6px 0 rgba(42,42,74,.06), 0 10px 22px rgba(42,42,74,.1);
}
.nav a {
  color: var(--ink-soft); font-weight: 700; font-size: 14px;
  padding: 8px 17px; border-radius: 999px; transition: .18s;
  font-family: "Baloo 2", sans-serif;
}
.nav a:hover { color: #fff; background: var(--c-blue); text-decoration: none; }

/* ===== Hero ===== */
.hero { padding: 90px 0 56px; text-align: center; }
.hero h1 {
  font-size: clamp(38px, 6.5vw, 64px);
  font-weight: 800;
  margin: 0 0 18px;
  line-height: 1.3;
  padding-top: 8px;              /* chừa chỗ cho dấu tiếng Việt */
  background: linear-gradient(100deg, var(--c-orange), var(--c-orange-deep) 26%, var(--c-blue) 62%, var(--c-teal));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 2px rgba(34,49,79,.14));
}
.hero p {
  color: var(--ink-soft); font-size: 18px; font-weight: 500;
  max-width: 570px; margin: 0 auto;
}
.hero-cta { margin-top: 34px; }

/* ===== Section ===== */
.section { padding: 20px 0 76px; }
.section-title {
  font-size: 15px; text-transform: uppercase; letter-spacing: 0.12em;
  font-weight: 800; margin: 0 0 20px;
  color: var(--c-blue);
  display: inline-block;
  font-family: "Baloo 2", sans-serif;
}

/* ===== Lưới tool ===== */
.tools-hint { color: var(--ink-soft); font-size: 15px; font-weight: 500; margin: 0; }
.tools-hint strong { color: var(--c-blue); }

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(275px, 1fr));
  gap: 24px;
}
.tool-card {
  --accent: var(--c-blue);
  --accent2: var(--c-teal);
  position: relative;
  display: flex; flex-direction: column; gap: 12px;
  padding: 26px;
  background: var(--card);
  border-radius: var(--radius);
  /* khối 3D: viền sáng trên + gờ tối dưới + bóng đổ */
  box-shadow:
    inset 0 2px 3px rgba(255,255,255,.9),
    inset 0 -6px 10px rgba(42,42,74,.06),
    0 10px 0 rgba(42,42,74,.05),
    0 20px 34px rgba(42,42,74,.12);
  transition: opacity .35s ease, transform .28s cubic-bezier(.34,1.56,.64,1),
              box-shadow .25s;
}
.tool-card.available { cursor: pointer; }
.tool-card.available:hover {
  transform: translateY(-8px);
  box-shadow:
    inset 0 2px 3px rgba(255,255,255,.9),
    inset 0 -6px 10px rgba(42,42,74,.06),
    0 14px 0 color-mix(in srgb, var(--accent) 40%, #fff),
    0 28px 44px color-mix(in srgb, var(--accent) 40%, transparent);
  text-decoration: none;
}
.tool-card.available:active { transform: translateY(-2px); }
.tool-card.soon { opacity: 0.9; }
.tools-grid .tool-card.hidden {
  opacity: 0; transform: translateY(22px) scale(.94); pointer-events: none;
}
.tool-card .icon {
  width: 60px; height: 60px; border-radius: 20px;
  display: grid; place-items: center; font-size: 30px;
  background: linear-gradient(160deg, var(--accent), var(--accent2));
  /* icon dạng viên kẹo 3D bóng */
  box-shadow:
    inset 0 4px 6px rgba(255,255,255,.55),
    inset 0 -6px 10px rgba(0,0,0,.22),
    0 10px 16px color-mix(in srgb, var(--accent) 50%, transparent);
}
.tool-card h3 { margin: 0; font-size: 20px; color: var(--ink); }
.tool-card p { margin: 0; font-size: 14.5px; color: var(--ink-soft); font-weight: 500; }
.tool-card .badge {
  position: absolute; top: 20px; right: 20px;
  font-size: 11.5px; font-weight: 700; padding: 5px 12px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: 0.05em; color: #fff;
  box-shadow: inset 0 2px 2px rgba(255,255,255,.5), 0 4px 8px rgba(0,0,0,.15);
}
.badge.badge-soon { background: linear-gradient(160deg, #ffb15c, var(--c-orange)); }
.badge.badge-new  { background: linear-gradient(160deg, #63e89b, var(--c-green)); }

/* ===== Panel / giới thiệu ===== */
.panel {
  background: var(--card); border-radius: var(--radius); padding: 28px;
  box-shadow:
    inset 0 2px 3px rgba(255,255,255,.9),
    0 10px 0 rgba(42,42,74,.04),
    0 20px 34px rgba(42,42,74,.1);
}
.panel p { font-weight: 500; }

/* ===== Footer ===== */
.site-footer {
  border-top: 2px solid rgba(255,255,255,.6);
  padding: 32px 0; color: var(--ink-soft); font-size: 14px;
  font-weight: 600; text-align: center;
}

/* ===== Nút ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 999px; border: none;
  font-size: 16px; font-weight: 700; cursor: pointer;
  color: var(--ink); background: #fff;
  box-shadow: inset 0 2px 2px rgba(255,255,255,.8), 0 6px 0 rgba(42,42,74,.1), 0 12px 22px rgba(42,42,74,.12);
  transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .18s;
}
.btn:hover { transform: translateY(-3px); text-decoration: none; }
.btn:active { transform: translateY(1px); box-shadow: inset 0 2px 2px rgba(255,255,255,.8), 0 3px 0 rgba(42,42,74,.1); }
.btn-primary {
  color: #fff;
  background: linear-gradient(160deg, #5cb3ff, var(--c-blue-deep));
  box-shadow:
    inset 0 3px 4px rgba(255,255,255,.5),
    inset 0 -5px 8px rgba(0,0,0,.2),
    0 7px 0 #1f56b8,
    0 16px 26px rgba(43,111,224,.4);
}
.btn-primary:active {
  box-shadow:
    inset 0 3px 4px rgba(255,255,255,.5),
    inset 0 -5px 8px rgba(0,0,0,.2),
    0 3px 0 #1f56b8,
    0 8px 16px rgba(43,111,224,.4);
}

/* ===== Trang tool con ===== */
.tool-page { padding: 46px 0 88px; }
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink-soft); font-size: 14px; font-weight: 700; margin-bottom: 24px;
}
.back-link:hover { color: var(--c-blue); text-decoration: none; }
.tool-page h1 { font-size: 34px; margin: 0 0 8px; }
.tool-page .lead { color: var(--ink-soft); font-weight: 500; margin: 0 0 32px; }
.placeholder {
  border: 3px dashed var(--border); border-radius: var(--radius);
  padding: 56px 24px; text-align: center; color: var(--ink-soft); font-weight: 500;
  background: rgba(255,255,255,.6);
}

/* ===== Tool nén ảnh ===== */
.cmp-panel { margin-bottom: 26px; }
.cmp-row { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label {
  font-size: 12px; font-weight: 800; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: .05em; font-family: "Baloo 2", sans-serif;
}
.field .row-inline { display: flex; gap: 8px; }
.field input, .field select {
  padding: 11px 14px; border-radius: 14px; border: 2px solid var(--border);
  background: #fff; font: inherit; font-weight: 600; color: var(--ink);
  box-shadow: inset 0 2px 4px rgba(42,42,74,.05);
}
.field input:focus, .field select:focus { outline: none; border-color: var(--c-blue); }

.dropzone {
  margin-top: 20px; border: 3px dashed var(--border); border-radius: var(--radius);
  padding: 40px 24px; text-align: center; color: var(--ink-soft); font-weight: 600;
  cursor: pointer; background: rgba(255,255,255,.55); transition: .2s;
}
.dropzone u { color: var(--c-blue-deep); }
.dropzone:hover, .dropzone.drag {
  border-color: var(--c-blue); color: var(--c-blue-deep); background: #fff;
}

.cmp-actions { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; align-items: center; }
.cmp-actions .btn { padding: 11px 22px; font-size: 15px; }
.cmp-progress { color: var(--ink-soft); font-weight: 700; font-size: 14px; }

.table-wrap { overflow-x: auto; }
.cmp-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
.cmp-table th {
  text-align: left; font-family: "Baloo 2", sans-serif; color: var(--ink-soft);
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em;
  padding: 10px 12px; border-bottom: 2px solid var(--border);
}
.cmp-table td { padding: 12px; border-bottom: 1px solid var(--border); font-weight: 600; }
.cmp-table .st-ok { color: #12a150; }
.cmp-table .st-warn { color: #c2410c; }
.cmp-table .st-pending { color: var(--ink-soft); }
.mini-btn {
  padding: 6px 15px; border-radius: 999px; border: none; color: #fff; cursor: pointer;
  font: inherit; font-weight: 700; font-size: 12.5px;
  background: linear-gradient(160deg, #5cb3ff, var(--c-blue-deep));
  box-shadow: 0 3px 0 #1f56b8;
}
.mini-btn:active { transform: translateY(1px); box-shadow: 0 1px 0 #1f56b8; }
