:root {
      --primary: #2563eb;
      --primary-hover: #1d4ed8;
      --primary-light: #dbeafe;
      --primary-foreground: #ffffff;
      --background: #f8fafc;
      --foreground: #0f172a;
      --card: #ffffff;
      --card-foreground: #0f172a;
      --muted: #f1f5f9;
      --muted-foreground: #64748b;
      --border: #e2e8f0;
      --secondary: #f1f5f9;
      --secondary-foreground: #334155;
      --success: #16a34a;
      --success-light: #dcfce7;
      --destructive: #dc2626;
      --sidebar-bg: #1e293b;
      --sidebar-text: #f8fafc;
      --sidebar-muted: #94a3b8;
      --radius: 0.75rem;
    }

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

    html {
      overflow-x: hidden;
      width: 100%;
    }

    body {
      font-family: 'IBM Plex Sans Thai', sans-serif;
      background-color: var(--background);
      color: var(--foreground);
      line-height: 1.6;
      overflow-x: hidden;
      width: 100%;
      max-width: 100vw;
      position: relative;
    }

    /* Header */
    .header {
      position: sticky;
      top: 0;
      z-index: 50;
      background: rgba(255, 255, 255, 0.95);
      backdrop-filter: blur(12px);
      border-bottom: 1px solid var(--border);
      max-width: 100%;
      overflow-x: hidden;
    }

    .header-container {
      max-width: 1280px;
      width: 100%;
      margin: 0 auto;
      padding: 0 1rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
      height: 64px;
    }

    .logo {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      text-decoration: none;
    }

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

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

    .logo-text {
      font-size: 1.25rem;
      font-weight: 700;
      color: var(--foreground);
    }

    .nav-desktop {
      display: none;
      align-items: center;
      gap: 2rem;
    }

    .nav-desktop a {
      color: var(--muted-foreground);
      text-decoration: none;
      font-weight: 500;
      transition: color 0.2s;
    }

    .nav-desktop a:hover {
      color: var(--primary);
    }

    .header-actions {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      flex-shrink: 0;
    }

    .header-actions .btn {
      padding: 0.5rem 0.75rem;
      font-size: 0.8125rem;
      white-space: nowrap;
    }

    /* Language Switcher */
    .lang-switcher {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 44px;
      height: 44px;
      padding: 0;
      background: linear-gradient(145deg, #f8fafc 0%, #e2e8f0 100%);
      border: 2px solid var(--border);
      border-radius: 12px;
      cursor: pointer;
      transition: all 0.25s ease;
      position: relative;
      overflow: hidden;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    }

    .lang-switcher:hover {
      background: linear-gradient(145deg, var(--primary-light) 0%, #bfdbfe 100%);
      border-color: var(--primary);
      box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
      transform: scale(1.05);
    }

    .lang-switcher:active {
      transform: scale(0.98);
    }

    .lang-flag {
      width: 24px;
      height: 18px;
      object-fit: cover;
      border-radius: 3px;
      transition: all 0.3s ease;
      box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    }

    .lang-flag-th, .lang-flag-en {
      display: flex;
      align-items: center;
      justify-content: center;
    }

    img.lang-flag {
      display: block;
    }

    img.lang-flag[style*="display:none"], 
    img.lang-flag[style*="display: none"] {
      display: none !important;
    }

    /* Animation for flag switch */
    .lang-switcher.switching .lang-flag {
      animation: flagPop 0.3s ease;
    }

    @keyframes flagPop {
      0% { transform: scale(1); }
      50% { transform: scale(0.8) rotate(10deg); }
      100% { transform: scale(1) rotate(0); }
    }

    /* Mobile language switcher in mobile menu */
    .mobile-lang-switcher {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0.75rem;
      padding: 1rem;
      margin-top: 1rem;
      background: var(--muted);
      border-radius: 12px;
    }

    .mobile-lang-switcher .lang-option {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      padding: 0.75rem 1.25rem;
      border: 2px solid transparent;
      border-radius: 10px;
      background: var(--card);
      cursor: pointer;
      transition: all 0.2s ease;
      font-size: 0.9375rem;
      font-weight: 500;
      font-family: inherit;
    }

    .mobile-lang-switcher .lang-option:hover {
      border-color: var(--primary-light);
    }

    .mobile-lang-switcher .lang-option.active {
      background: var(--primary);
      color: white;
      border-color: var(--primary);
    }

    .mobile-lang-switcher .lang-option .flag {
      font-size: 1.25rem;
    }

    .mobile-lang-switcher .lang-option .flag-img {
      width: 24px;
      height: 18px;
      object-fit: cover;
      border-radius: 2px;
    }

    .header-actions .btn-primary {
      color: #ffffff;
    }

    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.5rem;
      padding: 0.625rem 1.25rem;
      border-radius: var(--radius);
      font-weight: 500;
      font-size: 0.875rem;
      cursor: pointer;
      transition: all 0.2s;
      border: none;
      text-decoration: none;
      font-family: inherit;
    }

    .btn-primary {
      background: var(--primary);
      color: var(--primary-foreground);
    }

    .btn-primary:hover {
      background: var(--primary-hover);
    }

    .btn-ghost {
      background: transparent;
      color: var(--foreground);
    }

    .btn-ghost:hover {
      background: var(--muted);
    }

    .btn-outline {
      background: transparent;
      color: var(--foreground);
      border: 1px solid var(--border);
    }

    .btn-outline:hover {
      background: var(--secondary);
    }

    .btn-outline-primary {
      background: transparent;
      color: var(--primary);
      border: 1px solid var(--primary);
    }

    .btn-outline-primary:hover {
      background: var(--primary-light);
    }

    .btn-lg {
      padding: 0.875rem 2rem;
      font-size: 1rem;
    }

    .btn-sm {
      padding: 0.5rem 1rem;
      font-size: 0.813rem;
    }

    /* ปุ่มแฮมเบอร์เกอร์มือถือ — อยู่เหนือ overlay เสมอ */
    .mobile-menu-btn {
      display: none;
      align-items: center;
      justify-content: center;
      width: 48px;
      height: 48px;
      padding: 0;
      background: linear-gradient(145deg, #f1f5f9 0%, #e2e8f0 100%);
      border: 1px solid rgba(0, 0, 0, 0.06);
      border-radius: 14px;
      cursor: pointer;
      color: var(--foreground);
      position: relative;
      z-index: 100;
      transition: background 0.25s ease, color 0.25s ease, transform 0.2s ease, box-shadow 0.2s ease;
      -webkit-tap-highlight-color: transparent;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    }

    .mobile-menu-btn:hover {
      background: linear-gradient(145deg, var(--primary-light) 0%, #bfdbfe 100%);
      color: var(--primary);
      box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    }

    .mobile-menu-btn:active {
      transform: scale(0.96);
    }

    .mobile-menu-btn.is-open {
      background: linear-gradient(145deg, var(--primary) 0%, var(--primary-hover) 100%);
      color: #fff;
      border-color: transparent;
      box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
    }

    .mobile-menu-btn.is-open:hover {
      background: linear-gradient(145deg, var(--primary-hover) 0%, #1e40af 100%);
      color: #fff;
    }

    .mobile-menu-btn .hamburger-box {
      width: 22px;
      height: 18px;
      position: relative;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    }

    .mobile-menu-btn .hamburger-line {
      display: block;
      width: 100%;
      height: 2.5px;
      background: currentColor;
      border-radius: 2px;
      transform-origin: center;
      transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.2s ease;
    }

    .mobile-menu-btn.is-open .hamburger-line:nth-child(1) {
      transform: translateY(7.75px) rotate(45deg);
    }

    .mobile-menu-btn.is-open .hamburger-line:nth-child(2) {
      opacity: 0;
      transform: scaleX(0);
    }

    .mobile-menu-btn.is-open .hamburger-line:nth-child(3) {
      transform: translateY(-7.75px) rotate(-45deg);
    }

    /* Overlay และแผงเมนู — ไม่ใช้บนมือถือ (แสดงปุ่มบน header แทน) */
    .mobile-menu-overlay,
    .mobile-menu {
      display: none;
    }

    .mobile-menu-overlay {
      position: fixed;
      inset: 0;
      background: rgba(15, 23, 42, 0.5);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      z-index: 90;
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.3s ease, visibility 0.3s ease;
      pointer-events: none;
    }

    .mobile-menu-overlay.is-open {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
    }

    .mobile-menu {
      position: fixed;
      top: 0;
      right: 0;
      bottom: 0;
      width: min(320px, 90vw);
      max-width: 100%;
      background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
      box-shadow: -12px 0 40px rgba(15, 23, 42, 0.15);
      z-index: 95;
      padding: 0;
      display: flex;
      flex-direction: column;
      transform: translateX(100%);
      transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
      overflow-y: auto;
      overflow-x: hidden;
      border-left: 1px solid var(--border);
    }

    .mobile-menu.active {
      transform: translateX(0);
    }

    .mobile-menu .mobile-menu-inner {
      padding: 1.5rem 1.25rem 1.5rem;
      display: flex;
      flex-direction: column;
      gap: 0;
      flex: 1;
      min-height: 0;
    }

    .mobile-menu .mobile-menu-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 1.25rem;
      padding-bottom: 1rem;
      border-bottom: 2px solid var(--border);
    }

    .mobile-menu-logo {
      font-size: 1.125rem;
      font-weight: 700;
      color: var(--foreground);
      letter-spacing: -0.02em;
    }

    /* ปุ่มปิดภายในแผงเมนู */
    .mobile-menu-close {
      width: 44px;
      height: 44px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--muted);
      border: none;
      border-radius: 12px;
      cursor: pointer;
      color: var(--foreground);
      transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
      -webkit-tap-highlight-color: transparent;
    }

    .mobile-menu-close:hover {
      background: var(--primary-light);
      color: var(--primary);
    }

    .mobile-menu-close:active {
      transform: scale(0.95);
    }

    .mobile-menu-close-icon {
      position: relative;
      width: 20px;
      height: 20px;
    }

    .mobile-menu-close-icon::before,
    .mobile-menu-close-icon::after {
      content: '';
      position: absolute;
      left: 50%;
      top: 50%;
      width: 20px;
      height: 2.5px;
      background: currentColor;
      border-radius: 2px;
      transform-origin: center;
    }

    .mobile-menu-close-icon::before {
      transform: translate(-50%, -50%) rotate(45deg);
    }

    .mobile-menu-close-icon::after {
      transform: translate(-50%, -50%) rotate(-45deg);
    }

    /* ลิงก์เมนูแบบการ์ด */
    .mobile-menu-nav {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
    }

    .mobile-menu-link {
      display: flex;
      align-items: center;
      gap: 0.875rem;
      color: var(--foreground);
      text-decoration: none;
      font-weight: 500;
      font-size: 1rem;
      padding: 1rem 1rem;
      border-radius: 12px;
      background: var(--muted);
      transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
      -webkit-tap-highlight-color: transparent;
    }

    .mobile-menu-link:hover {
      background: var(--primary-light);
      color: var(--primary);
    }

    .mobile-menu-link:active {
      transform: scale(0.99);
    }

    .mobile-menu-link-icon {
      width: 40px;
      height: 40px;
      min-width: 40px;
      border-radius: 10px;
      background: rgba(255, 255, 255, 0.8);
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    }

    .mobile-menu-link-icon svg {
      width: 20px;
      height: 20px;
      color: var(--primary);
    }

    .mobile-menu-link:hover .mobile-menu-link-icon svg {
      color: var(--primary);
    }

    .mobile-menu-actions {
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
      margin-top: 1.5rem;
      padding-top: 1.25rem;
      border-top: 2px solid var(--border);
    }

    .mobile-menu-actions .btn {
      width: 100%;
      justify-content: center;
      padding: 0.875rem 1.25rem;
      font-size: 0.9375rem;
      border-radius: 12px;
      font-weight: 600;
    }

    .mobile-menu-actions .btn-primary {
      color: #ffffff;
      background: linear-gradient(145deg, var(--primary) 0%, var(--primary-hover) 100%);
      box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    }

    .mobile-menu-actions .btn-primary:hover {
      color: #ffffff;
    }

    body.mobile-menu-open {
      overflow: hidden;
    }

    /* Hero Language Switcher สำหรับมือถือ */
    .hero-lang-switcher {
      display: none;
      justify-content: center;
      margin-bottom: 1rem;
    }

    /* โลโก้เล็กลงบนมือถือ */
    @media (max-width: 767px) {
      .logo {
        gap: 0.25rem;
        margin-right: 0.5rem;
      }
      .logo-icon {
        width: 28px;
        height: 28px;
        border-radius: 8px;
      }
      .logo-icon svg {
        width: 16px;
        height: 16px;
      }
      .logo-text {
        font-size: 0.8rem;
        font-weight: 600;
      }
      .header-actions {
        gap: 0.5rem;
      }
      .header-actions .lang-switcher {
        display: none;
      }
      .hero-lang-switcher {
        display: flex;
      }
      .hero-lang-switcher .lang-switcher {
        width: auto;
        height: auto;
        padding: 0.5rem 0.75rem;
        gap: 0.5rem;
      }
      .hero-lang-switcher .lang-flag {
        width: 32px;
        height: 24px;
        display: block !important;
        opacity: 0.5;
        transition: opacity 0.2s;
      }
      .hero-lang-switcher .lang-flag.active {
        opacity: 1;
      }
    }

    @media (min-width: 768px) {
      .nav-desktop {
        display: flex;
      }
      .header-actions {
        gap: 0.75rem;
      }
      .header-actions .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
      }
      .mobile-menu-btn {
        display: none;
      }
      .header-container {
        padding: 0 1.5rem;
      }
    }

    @media (min-width: 1024px) {
      .header-container {
        padding: 0 2rem;
      }
    }

    /* Hero Section */
    .hero {
      position: relative;
      overflow: hidden;
      width: 100%;
      max-width: 100%;
      background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, var(--background) 50%, rgba(37, 99, 235, 0.03) 100%);
    }

    .hero-bg-circle {
      position: absolute;
      border-radius: 50%;
      filter: blur(80px);
      opacity: 0.3;
    }

    .hero-bg-circle-1 {
      top: 80px;
      left: 40px;
      width: 288px;
      height: 288px;
      background: var(--primary-light);
    }

    .hero-bg-circle-2 {
      bottom: 80px;
      right: 40px;
      width: 384px;
      height: 384px;
      background: rgba(37, 99, 235, 0.1);
    }

    .hero-container {
      position: relative;
      max-width: 1280px;
      width: 100%;
      margin: 0 auto;
      padding: 3rem 1rem 5rem;
    }

    .hero-grid {
      display: grid;
      gap: 3rem;
      align-items: center;
      justify-items: center;
    }

    .hero-content {
      text-align: center;
      max-width: 640px;
    }

    .hero-content .hero-description {
      margin-left: auto;
      margin-right: auto;
    }

    .hero-content .hero-buttons {
      justify-content: center;
    }

    .hero-badge {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      background: var(--primary-light);
      color: var(--primary);
      padding: 0.5rem 1rem;
      border-radius: 9999px;
      font-size: 0.875rem;
      font-weight: 500;
    }

    .hero-badge-dot {
      width: 8px;
      height: 8px;
      background: var(--success);
      border-radius: 50%;
      animation: pulse 2s infinite;
    }

    @keyframes pulse {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.5; }
    }

    .hero-title {
      font-size: 2.5rem;
      font-weight: 700;
      line-height: 1.2;
      margin: 1.5rem 0;
    }

    .hero-title span {
      color: var(--primary);
      display: block;
      margin-top: 0.55em;
    }

    .hero-typemessage {
      display: block;
      min-height: 1.2em;
    }

    /* ให้ข้อความกับเคอร์เซอร์อยู่บรรทัดเดียวกัน เคอร์เซอร์ | อยู่หลังข้อความที่พิมพ์ */
    .hero-typemessage .hero-typemessage-text,
    .hero-typemessage .hero-typemessage-cursor {
      display: inline;
    }

    .hero-typemessage-cursor {
      animation: hero-cursor-blink 0.8s step-end infinite;
      margin-left: 0;
      vertical-align: baseline;
    }

    .hero-typemessage-cursor-blink.hero-typemessage-cursor {
      animation: hero-cursor-blink 1s step-end infinite;
    }

    @keyframes hero-cursor-blink {
      50% { opacity: 0; }
    }

    .hero-description {
      font-size: 1.125rem;
      color: var(--muted-foreground);
      max-width: 560px;
      line-height: 1.7;
    }

    .hero-buttons {
      display: flex;
      flex-direction: column;
      gap: 1rem;
      margin-top: 2rem;
    }

    .hero-trust {
      display: flex;
      flex-wrap: wrap;
      gap: 1.5rem;
      margin-top: 1.5rem;
    }

    .hero-trust-item {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      font-size: 0.875rem;
      color: var(--muted-foreground);
    }

    .hero-trust-item svg {
      width: 20px;
      height: 20px;
      color: var(--primary);
    }

    .stats-card {
      background: var(--card);
      border-radius: 1.5rem;
      box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
      border: 1px solid var(--border);
      padding: 2rem;
    }

    .stats-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 1.5rem;
    }

    .stats-header h3 {
      font-size: 1.125rem;
      font-weight: 600;
    }

    .stats-badge {
      font-size: 0.75rem;
      color: var(--muted-foreground);
      background: var(--secondary);
      padding: 0.25rem 0.75rem;
      border-radius: 9999px;
    }

    .stats-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 1rem;
    }

    .stat-item {
      background: rgba(241, 245, 249, 0.5);
      border-radius: 1rem;
      padding: 1rem;
    }

    .stat-label {
      font-size: 0.875rem;
      color: var(--muted-foreground);
      margin-bottom: 0.25rem;
    }

    .stat-value {
      font-size: 1.5rem;
      font-weight: 700;
    }

    .stat-value.primary {
      color: var(--primary);
    }

    .stat-change {
      font-size: 0.75rem;
      color: var(--success);
      display: flex;
      align-items: center;
      gap: 0.25rem;
    }

    .stat-change svg {
      width: 12px;
      height: 12px;
    }

    .stat-sub {
      font-size: 0.75rem;
      color: var(--muted-foreground);
    }

    .mini-chart {
      background: var(--primary-light);
      border-radius: 1rem;
      padding: 1rem;
      margin-top: 1.5rem;
    }

    .mini-chart-title {
      font-size: 0.875rem;
      font-weight: 500;
      margin-bottom: 0.75rem;
    }

    .mini-chart-bars {
      display: flex;
      align-items: flex-end;
      gap: 4px;
      height: 64px;
    }

    .mini-chart-bar {
      flex: 1;
      background: rgba(37, 99, 235, 0.6);
      border-radius: 4px 4px 0 0;
      transition: background 0.2s;
    }

    .mini-chart-bar:hover {
      background: var(--primary);
    }

    .floating-badge {
      position: absolute;
      bottom: -16px;
      left: -16px;
      background: var(--card);
      border-radius: 1rem;
      box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
      border: 1px solid var(--border);
      padding: 1rem;
      display: flex;
      align-items: center;
      gap: 0.75rem;
    }

    .floating-badge-icon {
      width: 48px;
      height: 48px;
      background: var(--success-light);
      border-radius: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .floating-badge-icon svg {
      width: 24px;
      height: 24px;
      color: var(--success);
    }

    .floating-badge-value {
      font-size: 0.875rem;
      font-weight: 600;
    }

    .floating-badge-label {
      font-size: 0.75rem;
      color: var(--muted-foreground);
    }

    @media (min-width: 640px) {
      .hero-title {
        font-size: 3rem;
      }
      .hero-buttons {
        flex-direction: row;
      }
    }

    @media (min-width: 768px) {
      .hero-container {
        padding: 3.5rem 1.5rem 5rem;
      }
    }

    @media (min-width: 1024px) {
      .hero-container {
        padding: 4rem 2rem 8rem;
      }
      .hero-grid {
        grid-template-columns: 1fr;
      }
      .hero-title {
        font-size: 3.75rem;
      }
    }

    /* Projects Section */
    .projects {
      padding: 2.5rem 1rem 5rem;
      background: var(--background);
      width: 100%;
      max-width: 100%;
      overflow-x: hidden;
    }

    .projects-container {
      max-width: 1280px;
      width: 100%;
      margin: 0 auto;
    }

    .section-header {
      text-align: center;
      margin-bottom: 3rem;
    }

    .section-title {
      font-size: 2rem;
      font-weight: 700;
      margin-bottom: 1rem;
    }

    .section-description {
      color: var(--muted-foreground);
      max-width: 640px;
      margin: 0 auto;
    }

    .category-filter {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 0.75rem;
      margin-bottom: 2.5rem;
    }

    .category-btn {
      padding: 0.5rem 1.25rem;
      border-radius: var(--radius);
      font-weight: 500;
      font-size: 0.875rem;
      cursor: pointer;
      transition: all 0.2s;
      border: 1px solid var(--border);
      background: transparent;
      color: var(--foreground);
      font-family: inherit;
    }

    .category-btn:hover {
      background: var(--secondary);
    }

    .category-btn.active {
      background: var(--primary);
      color: var(--primary-foreground);
      border-color: var(--primary);
    }

    .projects-grid {
      display: grid;
      gap: 1.5rem;
    }

    .project-card {
      background: var(--card);
      border-radius: 1rem;
      border: 1px solid var(--border);
      overflow: hidden;
      transition: all 0.3s;
    }

    .project-card:hover {
      box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    }

    .project-card-header {
      padding: 1.5rem;
      padding-bottom: 1rem;
    }

    .project-card-top {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      margin-bottom: 1rem;
    }

    .project-icon {
      width: 56px;
      height: 56px;
      background: var(--primary-light);
      border-radius: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .project-icon svg {
      width: 28px;
      height: 28px;
      color: var(--primary);
    }

    .badge {
      font-size: 0.75rem;
      font-weight: 500;
      padding: 0.25rem 0.75rem;
      border-radius: 9999px;
    }

    .badge-secondary {
      background: var(--secondary);
      color: var(--secondary-foreground);
    }

    .badge-primary {
      background: var(--primary);
      color: var(--primary-foreground);
    }

    .badge-destructive {
      background: #fef2f2;
      color: var(--destructive);
    }

    .project-title {
      font-size: 1.125rem;
      font-weight: 600;
      margin-bottom: 0.5rem;
      transition: color 0.2s;
    }

    .project-card:hover .project-title {
      color: var(--primary);
    }

    .project-location {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      font-size: 0.875rem;
      color: var(--muted-foreground);
      margin-bottom: 1rem;
    }

    .project-location svg {
      width: 16px;
      height: 16px;
    }

    .project-stats {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 0.5rem;
      margin-bottom: 1rem;
    }

    .project-stat {
      text-align: center;
      padding: 0.5rem;
      background: rgba(241, 245, 249, 0.5);
      border-radius: 0.5rem;
    }

    .project-stat-label {
      font-size: 0.75rem;
      color: var(--muted-foreground);
    }

    .project-stat-value {
      font-size: 0.875rem;
      font-weight: 700;
    }

    .project-stat-value.primary {
      color: var(--primary);
    }

    .project-progress {
      padding: 0 1.5rem 1rem;
    }

    .project-progress-header {
      display: flex;
      justify-content: space-between;
      font-size: 0.875rem;
      margin-bottom: 0.5rem;
    }

    .project-progress-label {
      color: var(--muted-foreground);
    }

    .project-progress-value {
      font-weight: 600;
    }

    .progress-bar {
      height: 8px;
      background: var(--muted);
      border-radius: 9999px;
      overflow: hidden;
      margin-bottom: 0.75rem;
    }

    .progress-bar-fill {
      height: 100%;
      background: var(--primary);
      border-radius: 9999px;
      transition: width 0.3s;
    }

    .project-progress-footer {
      display: flex;
      justify-content: space-between;
      font-size: 0.875rem;
    }

    .project-progress-raised {
      font-weight: 600;
    }

    .project-progress-target {
      color: var(--muted-foreground);
    }

    .project-card-footer {
      padding: 1rem 1.5rem;
      background: rgba(241, 245, 249, 0.3);
      border-top: 1px solid var(--border);
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .project-meta {
      display: flex;
      gap: 1rem;
      font-size: 0.875rem;
      color: var(--muted-foreground);
    }

    .project-meta-item {
      display: flex;
      align-items: center;
      gap: 0.25rem;
    }

    .project-meta-item svg {
      width: 16px;
      height: 16px;
    }

    .section-footer {
      text-align: center;
      margin-top: 3rem;
    }

    @media (min-width: 640px) {
      .section-title {
        font-size: 2.25rem;
      }
    }

    @media (min-width: 768px) {
      .projects {
        padding: 2.5rem 1.5rem 5rem;
      }
      .projects-grid {
        grid-template-columns: repeat(2, 1fr);
      }
    }

    @media (min-width: 1024px) {
      .projects {
        padding: 2.5rem 2rem 5rem;
      }
      .projects-grid {
        grid-template-columns: repeat(3, 1fr);
      }
    }

    /* How It Works */
    .how-it-works {
      padding: 5rem 1rem;
      background: rgba(241, 245, 249, 0.3);
      width: 100%;
      max-width: 100%;
      overflow-x: hidden;
    }

    .how-it-works-container {
      max-width: 1280px;
      width: 100%;
      margin: 0 auto;
    }

    .steps-grid {
      display: grid;
      gap: 2rem;
    }

    .step-card {
      position: relative;
      background: var(--card);
      border-radius: 1rem;
      padding: 1.5rem;
      border: 1px solid var(--border);
      transition: all 0.3s;
    }

    .step-card:hover {
      border-color: rgba(37, 99, 235, 0.5);
      box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    }

    .step-number {
      position: absolute;
      top: -16px;
      left: 24px;
      width: 32px;
      height: 32px;
      background: var(--primary);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--primary-foreground);
      font-weight: 700;
      font-size: 0.875rem;
    }

    .step-icon {
      width: 64px;
      height: 64px;
      background: var(--primary-light);
      border-radius: 1rem;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 1rem;
      transition: background 0.3s;
    }

    .step-card:hover .step-icon {
      background: rgba(37, 99, 235, 0.2);
    }

    .step-icon svg {
      width: 32px;
      height: 32px;
      color: var(--primary);
    }

    .step-title {
      font-size: 1.25rem;
      font-weight: 600;
      margin-bottom: 0.5rem;
    }

    .step-description {
      color: var(--muted-foreground);
      line-height: 1.6;
    }

    @media (max-width: 767px) {
      .step-card {
        text-align: center;
      }
      .step-number {
        left: 50%;
        transform: translateX(-50%);
      }
      .step-icon {
        margin-left: auto;
        margin-right: auto;
      }
    }

    @media (min-width: 768px) {
      .how-it-works {
        padding: 5rem 1.5rem;
      }
      .how-it-works .section-header {
        text-align: center;
      }
      .how-it-works .section-description {
        margin-left: auto;
        margin-right: auto;
      }
      .how-it-works .step-card {
        text-align: center;
      }
      .how-it-works .step-number {
        left: 50%;
        transform: translateX(-50%);
      }
      .how-it-works .step-icon {
        margin-left: auto;
        margin-right: auto;
      }
      .steps-grid {
        grid-template-columns: repeat(2, 1fr);
      }
    }

    @media (min-width: 1024px) {
      .how-it-works {
        padding: 5rem 2rem;
      }
      .steps-grid {
        grid-template-columns: repeat(4, 1fr);
      }
    }

    /* Portfolio Section */
    .portfolio {
      padding: 5rem 1rem;
      background: var(--background);
    }

    .portfolio-container {
      max-width: 1280px;
      margin: 0 auto;
    }

    .portfolio-grid {
      display: grid;
      gap: 1.5rem;
    }

    .portfolio-main {
      background: var(--card);
      border-radius: 1rem;
      border: 1px solid var(--border);
      padding: 1.5rem;
    }

    .portfolio-summary {
      display: flex;
      flex-direction: column;
      gap: 1rem;
      margin-bottom: 1.5rem;
    }

    .portfolio-total-label {
      font-size: 0.875rem;
      color: var(--muted-foreground);
      margin-bottom: 0.25rem;
    }

    .portfolio-total-value {
      font-size: 2rem;
      font-weight: 700;
    }

    .portfolio-return {
      display: flex;
      align-items: center;
      gap: 1rem;
    }

    .portfolio-return-label {
      font-size: 0.875rem;
      color: var(--muted-foreground);
    }

    .portfolio-return-value {
      font-size: 1.25rem;
      font-weight: 700;
      color: var(--success);
      display: flex;
      align-items: center;
      gap: 0.25rem;
    }

    .portfolio-return-value svg {
      width: 20px;
      height: 20px;
    }

    .portfolio-return-percent {
      width: 64px;
      height: 64px;
      background: var(--success-light);
      border-radius: 1rem;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 700;
      color: var(--success);
    }

    .portfolio-section-title {
      font-weight: 600;
      display: flex;
      align-items: center;
      gap: 0.5rem;
      margin-bottom: 1rem;
    }

    .portfolio-section-title svg {
      width: 20px;
      height: 20px;
      color: var(--primary);
    }

    .investment-list {
      display: flex;
      flex-direction: column;
      gap: 1rem;
    }

    .investment-item {
      display: flex;
      align-items: center;
      gap: 1rem;
      padding: 1rem;
      background: rgba(241, 245, 249, 0.3);
      border-radius: 12px;
      transition: background 0.2s;
    }

    .investment-item:hover {
      background: rgba(241, 245, 249, 0.5);
    }

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

    .investment-icon svg {
      width: 24px;
      height: 24px;
      color: var(--primary);
    }

    .investment-info {
      flex: 1;
      min-width: 0;
    }

    .investment-name {
      font-weight: 500;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .investment-type {
      font-size: 0.875rem;
      color: var(--muted-foreground);
    }

    .investment-value {
      text-align: right;
    }

    .investment-amount {
      font-weight: 600;
    }

    .investment-return {
      font-size: 0.875rem;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 0.25rem;
    }

    .investment-return.positive {
      color: var(--success);
    }

    .investment-return.negative {
      color: var(--destructive);
    }

    .investment-return svg {
      width: 12px;
      height: 12px;
    }

    .investment-allocation {
      display: none;
      width: 80px;
    }

    .allocation-bar {
      height: 8px;
      background: var(--border);
      border-radius: 9999px;
      overflow: hidden;
    }

    .allocation-bar-fill {
      height: 100%;
      background: var(--primary);
      border-radius: 9999px;
    }

    .allocation-percent {
      font-size: 0.75rem;
      color: var(--muted-foreground);
      text-align: center;
      margin-top: 0.25rem;
    }

    .portfolio-actions {
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
      margin-top: 1.5rem;
      padding-top: 1.5rem;
    }

    .transactions-card {
      background: var(--card);
      border-radius: 1rem;
      border: 1px solid var(--border);
      padding: 1.5rem;
    }

    .transactions-title {
      font-weight: 600;
      margin-bottom: 1rem;
    }

    .transactions-list {
      display: flex;
      flex-direction: column;
      gap: 1rem;
    }

    .transaction-item {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      padding: 0.75rem;
      border-radius: 12px;
      transition: background 0.2s;
    }

    .transaction-item:hover {
      background: rgba(241, 245, 249, 0.3);
    }

    .transaction-icon {
      width: 40px;
      height: 40px;
      border-radius: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .transaction-icon.positive {
      background: var(--success-light);
    }

    .transaction-icon.positive svg {
      color: var(--success);
    }

    .transaction-icon.negative {
      background: var(--primary-light);
    }

    .transaction-icon.negative svg {
      color: var(--primary);
    }

    .transaction-icon svg {
      width: 20px;
      height: 20px;
    }

    .transaction-info {
      flex: 1;
      min-width: 0;
    }

    .transaction-name {
      font-size: 0.875rem;
      font-weight: 500;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .transaction-date {
      font-size: 0.75rem;
      color: var(--muted-foreground);
    }

    .transaction-amount {
      font-weight: 600;
    }

    .transaction-amount.positive {
      color: var(--success);
    }

    @media (min-width: 640px) {
      .portfolio-summary {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
      }
      .portfolio-total-value {
        font-size: 2.5rem;
      }
      .portfolio-actions {
        flex-direction: row;
      }
      .portfolio-actions .btn {
        flex: 1;
      }
      .investment-allocation {
        display: block;
      }
    }

    @media (min-width: 768px) {
      .portfolio {
        padding: 5rem 1.5rem;
      }
    }

    @media (min-width: 1024px) {
      .portfolio {
        padding: 5rem 2rem;
      }
      .portfolio-grid {
        grid-template-columns: 2fr 1fr;
      }
    }

    /* Footer */
    .footer {
      background: var(--sidebar-bg);
      color: var(--sidebar-text);
      padding: 4rem 1rem;
    }

    .footer-container {
      max-width: 1280px;
      margin: 0 auto;
    }

    .footer-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 2rem;
    }

    .footer-brand {
      grid-column: span 2;
    }

    .footer-logo {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      margin-bottom: 1rem;
      text-decoration: none;
    }

    .footer-logo-icon {
      width: 40px;
      height: 40px;
      background: var(--primary);
      border-radius: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

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

    .footer-logo-text {
      font-size: 1.25rem;
      font-weight: 700;
      color: var(--sidebar-text);
    }

    .footer-description {
      color: var(--sidebar-muted);
      font-size: 0.875rem;
      line-height: 1.7;
    }

    .footer-section h4 {
      font-weight: 600;
      margin-bottom: 1rem;
    }

    .footer-links {
      list-style: none;
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
    }

    .footer-links a {
      color: var(--sidebar-muted);
      text-decoration: none;
      font-size: 0.875rem;
      transition: color 0.2s;
    }

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

    .footer-contact {
      list-style: none;
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
    }

    .footer-contact li {
      display: flex;
      align-items: flex-start;
      gap: 0.5rem;
      color: var(--sidebar-muted);
      font-size: 0.875rem;
    }

    .footer-contact svg {
      width: 16px;
      height: 16px;
      flex-shrink: 0;
      margin-top: 2px;
    }

    .footer-bottom {
      margin-top: 3rem;
      padding-top: 2rem;
      border-top: 1px solid rgba(148, 163, 184, 0.2);
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 1rem;
    }

    .footer-copyright {
      font-size: 0.875rem;
      color: var(--sidebar-muted);
    }

    .footer-badge {
      font-size: 0.75rem;
      color: var(--sidebar-muted);
      background: rgba(148, 163, 184, 0.2);
      padding: 0.25rem 0.75rem;
      border-radius: 9999px;
    }

    @media (min-width: 768px) {
      .footer {
        padding: 4rem 1.5rem;
      }
      .footer-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 3rem;
      }
      .footer-brand {
        grid-column: span 1;
      }
      .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
      }
    }

    @media (min-width: 1024px) {
      .footer {
        padding: 4rem 2rem;
      }
    }

    /* Utilities */
    .sr-only {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border-width: 0;
    }

    .relative {
      position: relative;
    }

    /* แบนเนอร์ Add to Home Screen (แบบ lottery) */
    .install-app-banner {
      display: none;
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      z-index: 100;
      padding: 12px 16px;
      padding-bottom: calc(12px + env(safe-area-inset-bottom, 0));
      background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary) 100%);
      color: #fff;
      box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
      font-family: inherit;
    }
    @media (max-width: 768px) {
      .install-app-banner {
        display: block;
      }
    }
    .install-app-banner.is-hidden {
      display: none !important;
    }
    .install-app-inner {
      display: flex;
      align-items: center;
      gap: 12px;
      max-width: 480px;
      margin: 0 auto;
    }
    .install-app-icon img {
      width: 48px;
      height: 48px;
      border-radius: 12px;
    }
    .install-app-text {
      flex: 1;
      min-width: 0;
      display: flex;
      flex-direction: column;
      gap: 2px;
    }
    .install-app-text strong {
      font-size: 1rem;
    }
    .install-app-text span {
      font-size: 0.85rem;
      opacity: 0.95;
    }
    .install-app-banner .btn-install {
      background: #fff;
      color: var(--primary);
      border: none;
      padding: 10px 18px;
      border-radius: 10px;
      font-weight: 700;
      font-size: 0.95rem;
      cursor: pointer;
      font-family: inherit;
    }
    .install-app-banner .btn-install:hover {
      background: var(--primary-light);
    }
    .install-app-banner .install-app-dismiss {
      background: transparent;
      color: #fff;
      border: none;
      width: 36px;
      height: 36px;
      font-size: 1.5rem;
      line-height: 1;
      cursor: pointer;
      opacity: 0.9;
      padding: 0;
    }
    .install-app-banner .install-app-dismiss:hover {
      background: rgba(255,255,255,0.2);
    }
  