* { box-sizing: border-box; }
    body {
      margin: 0;
      font-family: 'Segoe UI', sans-serif;
      background: #f4f4f4;
      display: flex;
      flex-direction: column;
      min-height: 100vh;
    }
    body, html {
      max-width: 100%;
      overflow-x: hidden;
    }
    header {
      background: #2c3e50;
      color: white;
      padding: 0.5rem 1rem; /* giảm padding trên/dưới */
      text-align: center;
    }
    
    header h1 {
      margin: 0;
      font-size: 1.2rem; /* hoặc 1rem nếu bạn muốn nhỏ hơn nữa */
      font-weight: 500;
    }
    .container { display: flex; flex: 1; }
    .container {
      flex: 1;
      flex-direction: row;
      width: 100%;
      max-width: 100%;
    }
    .sidebar {
      display: none;
      flex-direction: column;
      background: #ffffff;
      width: 220px;
      border-right: 1px solid #ddd;
      padding-top: 1rem;
    }
    .sidebar button {
      padding: 1rem;
      background: none;
      border: none;
      text-align: left;
      font-size: 1rem;
      color: #2c3e50;
      border-bottom: 1px solid #eee;
      cursor: pointer;
    }
    .sidebar button.active {
      background: #eaf4ff;
      color: #3498db;
    }
    #main-content {
      flex: 1;
      padding: 1rem;
      padding-bottom: 60px;
    }
    .card {
      background: white;
      padding: 1rem;
      margin-bottom: 1rem;
      border-radius: 10px;
      box-shadow: 0 2px 5px rgba(0,0,0,0.1);
      overflow-x: auto;
    }
    .bottom-nav {
      position: fixed;
      bottom: 0;
      left: 0;
      width: 100%;
      background: white;
      border-top: 1px solid #ddd;
      display: flex;
      justify-content: space-around;
      padding: 0.5rem 0;
      z-index: 1000;
    }
    .bottom-nav button {
      background: none;
      border: none;
      font-size: 1.2rem;
      color: #333;
    }
    .bottom-nav button.active {
      color: #3498db;
    }
    @media(min-width: 768px) {
      .bottom-nav { display: none; }
      .sidebar { display: flex; position: relative; }
    }
    canvas {
      width: 100% !important;
      height: auto !important;
      max-width: 100%;
    }