/*
Theme Name: MI9 Social CRM Data Theme
Theme URI: https://miniai.vn
Author: MI9
Author URI: https://miniai.vn
Description: Theme for MI9 Social CRM - Mô Hình Khai Thác Data Độc Quyền
Version: 1.0
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.0
Text Domain: miniai-data
*/

:root {
    --bg: #060b18;
    --bg2: #0b1225;
    --blue: #00c2ff;
    --blue-dim: #0077aa;
    --orange: #ff5f1f;
    --orange-dim: #a33a0a;
    --green: #00e5a0;
    --green-dim: #007a54;
    --purple: #a855f7;
    --gold: #fbbf24;
    --white: #f0f4ff;
    --muted: #8896b3;
    --card: rgba(255,255,255,0.04);
    --border: rgba(255,255,255,0.08);
  }

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

  body {
    background: var(--bg);
    font-family: 'Be Vietnam Pro', sans-serif;
    color: var(--white);
    min-height: 100vh;
    overflow-x: hidden;
  }

  /* ─── BG NOISE & GRID ─── */
  body::before {
    content: '';
    position: fixed; inset: 0; z-index: 0;
    background-image:
      linear-gradient(rgba(0,194,255,0.03) 1px, transparent 1px),
      linear-gradient(90deg, rgba(0,194,255,0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
  }

  .glow-orb {
    position: fixed; border-radius: 50%; filter: blur(100px); pointer-events: none; z-index: 0;
  }
  .orb1 { width: 500px; height: 500px; background: rgba(0,194,255,0.08); top: -100px; left: -100px; }
  .orb2 { width: 400px; height: 400px; background: rgba(255,95,31,0.07); bottom: 100px; right: -100px; }
  .orb3 { width: 300px; height: 300px; background: rgba(0,229,160,0.06); top: 40%; left: 40%; }

  .wrapper { position: relative; z-index: 1; max-width: 1280px; margin: 0 auto; padding: 48px 24px 80px; }

  /* ─── HEADER ─── */
  .header {
    text-align: center;
    margin-bottom: 64px;
    animation: fadeDown 0.8s ease both;
  }

  .header-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(0,194,255,0.1); border: 1px solid rgba(0,194,255,0.25);
    border-radius: 999px; padding: 6px 18px;
    font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
    color: var(--blue); margin-bottom: 20px;
  }

  .header-badge::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%;
    background: var(--blue); box-shadow: 0 0 8px var(--blue);
    animation: pulse 2s infinite;
  }

  h1 {
    font-size: clamp(32px, 5vw, 60px);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #fff 0%, var(--blue) 50%, var(--orange) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
  }

  .header-sub {
    font-size: 16px; color: var(--muted); max-width: 600px; margin: 0 auto;
    line-height: 1.7;
  }

  /* ─── SECTION LABELS ─── */
  .section-label {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 10px; font-weight: 800; letter-spacing: 3px; text-transform: uppercase;
    margin-bottom: 12px;
  }

  .section-label .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

  /* ─── MAIN 3-COL ─── */
  .main-flow {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    gap: 0;
    align-items: start;
    margin-bottom: 48px;
    animation: fadeUp 0.9s 0.2s ease both;
  }

  /* ─── COLUMNS ─── */
  .col-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px 24px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
  }

  .col-card:hover {
    transform: translateY(-4px);
  }

  .col-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    border-radius: 20px 20px 0 0;
  }

  .col-blue::before { background: linear-gradient(90deg, var(--blue), transparent); box-shadow: 0 0 20px var(--blue); }
  .col-orange::before { background: linear-gradient(90deg, var(--orange), transparent); box-shadow: 0 0 20px var(--orange); }
  .col-green::before { background: linear-gradient(90deg, var(--green), transparent); box-shadow: 0 0 20px var(--green); }

  .col-blue:hover { box-shadow: 0 20px 60px rgba(0,194,255,0.12); }
  .col-orange:hover { box-shadow: 0 20px 60px rgba(255,95,31,0.12); }
  .col-green:hover { box-shadow: 0 20px 60px rgba(0,229,160,0.12); }

  .col-title {
    font-size: 20px; font-weight: 800; margin-bottom: 20px; line-height: 1.2;
  }

  /* ─── SOURCE ITEMS ─── */
  .source-grid { display: flex; flex-direction: column; gap: 6px; }

  .source-item {
    display: flex; align-items: flex-start; gap: 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 12.5px; line-height: 1.45;
    transition: background 0.2s, border-color 0.2s;
    cursor: default;
  }

  .source-item:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.12); }

  .source-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
  .source-text .name { font-weight: 700; display: block; }
  .source-text .desc { color: var(--muted); font-size: 11px; }

  .top3-badge {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #000; font-size: 9px; font-weight: 800;
    padding: 2px 7px; border-radius: 999px; letter-spacing: 1px;
    text-transform: uppercase; white-space: nowrap; margin-top: 3px;
  }

  /* ─── ARROWS ─── */
  .flow-arrow {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 0 8px; gap: 4px; min-width: 48px;
  }

  .arrow-line {
    width: 2px; height: 120px;
    background: linear-gradient(180deg, transparent, var(--muted), transparent);
  }

  .arrow-head {
    font-size: 22px; color: var(--muted); line-height: 1;
  }

  .arrow-label {
    font-size: 9px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
    color: var(--muted); writing-mode: vertical-rl; text-orientation: mixed;
  }

  /* ─── MI9 CORE CENTER ─── */
  .mi9-core {
    background: linear-gradient(145deg, rgba(0,194,255,0.08), rgba(255,95,31,0.05));
    border: 1px solid rgba(0,194,255,0.2);
    border-radius: 24px;
    padding: 32px 28px;
    position: relative;
    overflow: hidden;
    animation: fadeUp 0.9s 0.3s ease both;
    margin-bottom: 48px;
  }

  .mi9-core::after {
    content: 'MI9';
    position: absolute; bottom: -20px; right: -10px;
    font-size: 120px; font-weight: 900;
    color: rgba(0,194,255,0.04); line-height: 1;
    font-family: 'Space Mono', monospace;
    pointer-events: none;
  }

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

  .mi9-card {
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(0,194,255,0.12);
    border-radius: 14px;
    padding: 18px 16px;
    text-align: center;
    transition: transform 0.25s, border-color 0.25s;
  }

  .mi9-card:hover { transform: scale(1.03); border-color: rgba(0,194,255,0.3); }

  .mi9-card .icon { font-size: 28px; margin-bottom: 8px; }
  .mi9-card .mi9-title { font-size: 13px; font-weight: 800; margin-bottom: 4px; }
  .mi9-card .mi9-desc { font-size: 11px; color: var(--muted); line-height: 1.5; }

  /* ─── OPTIMIZE SECTION ─── */
  .optimize-section {
    background: linear-gradient(145deg, rgba(0,229,160,0.05), rgba(168,85,247,0.04));
    border: 1px solid rgba(0,229,160,0.15);
    border-radius: 24px;
    padding: 36px 32px;
    animation: fadeUp 0.9s 0.5s ease both;
    margin-bottom: 48px;
  }

  .optimize-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 24px;
  }

  .opt-card {
    background: rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    padding: 18px 14px;
    position: relative;
    transition: transform 0.25s;
  }
  .opt-card:hover { transform: translateY(-3px); }

  .opt-num {
    font-family: 'Space Mono', monospace;
    font-size: 28px; font-weight: 700;
    background: linear-gradient(135deg, var(--green), var(--blue));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; line-height: 1; margin-bottom: 8px;
  }

  .opt-title { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
  .opt-desc { font-size: 11px; color: var(--muted); line-height: 1.5; }

  /* ─── LIFECYCLE ─── */
  .lifecycle {
    animation: fadeUp 0.9s 0.7s ease both;
  }

  .lifecycle-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 8px 0;
  }

  .lc-step {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px 18px;
    text-align: center;
    min-width: 140px;
    flex-shrink: 0;
    position: relative;
    transition: transform 0.2s;
  }
  .lc-step:hover { transform: scale(1.04); }

  .lc-step .lc-icon { font-size: 24px; margin-bottom: 6px; }
  .lc-step .lc-name { font-size: 12px; font-weight: 800; }
  .lc-step .lc-sub { font-size: 10px; color: var(--muted); margin-top: 2px; }

  .lc-arrow {
    flex-shrink: 0;
    display: flex; flex-direction: column; align-items: center;
    padding: 0 4px;
    color: var(--muted);
    font-size: 20px;
  }

  /* color rings on steps */
  .lc-step.s1 { border-color: rgba(0,194,255,0.3); }
  .lc-step.s2 { border-color: rgba(251,191,36,0.3); }
  .lc-step.s3 { border-color: rgba(0,229,160,0.3); }
  .lc-step.s4 { border-color: rgba(255,95,31,0.3); }
  .lc-step.s5 { border-color: rgba(168,85,247,0.3); }
  .lc-step.s6 { border-color: rgba(0,194,255,0.3); }

  /* ─── TEMPERATURE ─── */
  .temp-section {
    margin-top: 48px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    animation: fadeUp 0.9s 0.9s ease both;
  }

  .temp-card {
    border-radius: 16px; padding: 22px 20px;
    border: 1px solid; position: relative; overflow: hidden;
  }

  .temp-hot { background: rgba(255,95,31,0.07); border-color: rgba(255,95,31,0.25); }
  .temp-warm { background: rgba(251,191,36,0.07); border-color: rgba(251,191,36,0.25); }
  .temp-cold { background: rgba(0,194,255,0.07); border-color: rgba(0,194,255,0.25); }

  .temp-label { font-size: 28px; font-weight: 900; margin-bottom: 4px; }
  .temp-hot .temp-label { color: var(--orange); }
  .temp-warm .temp-label { color: var(--gold); }
  .temp-cold .temp-label { color: var(--blue); }

  .temp-name { font-size: 15px; font-weight: 800; margin-bottom: 8px; }
  .temp-list { list-style: none; }
  .temp-list li {
    font-size: 12px; color: var(--muted); padding: 3px 0;
    padding-left: 14px; position: relative;
  }
  .temp-list li::before { content: '→'; position: absolute; left: 0; }

  /* ─── FOOTER ─── */
  .footer {
    text-align: center; margin-top: 64px;
    animation: fadeUp 1s 1.1s ease both;
  }

  .footer-logo {
    font-family: 'Space Mono', monospace;
    font-size: 36px; font-weight: 700;
    background: linear-gradient(135deg, var(--blue), var(--orange));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
  }

  .footer-tagline { font-size: 12px; color: var(--muted); letter-spacing: 3px; text-transform: uppercase; }

  /* ─── DIVIDERS ─── */
  .section-divider {
    display: flex; align-items: center; gap: 16px;
    margin: 48px 0 32px;
  }
  .divider-line { flex: 1; height: 1px; background: var(--border); }
  .divider-label {
    font-size: 10px; font-weight: 800; letter-spacing: 3px; text-transform: uppercase;
    color: var(--muted); white-space: nowrap;
  }

  /* ─── KEYFRAMES ─── */
  @keyframes fadeDown { from { opacity: 0; transform: translateY(-24px); } to { opacity: 1; transform: none; } }
  @keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
  @keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

  /* ─── RESPONSIVE ─── */
  @media (max-width: 900px) {
    .main-flow { grid-template-columns: 1fr; }
    .flow-arrow { flex-direction: row; min-width: unset; padding: 8px 0; }
    .arrow-line { height: 2px; width: 60px; }
    .arrow-label { writing-mode: horizontal-tb; }
    .mi9-grid { grid-template-columns: repeat(2, 1fr); }
    .optimize-grid { grid-template-columns: repeat(2, 1fr); }
    .temp-section { grid-template-columns: 1fr; }
    .lifecycle-flow { justify-content: flex-start; }
  }
