    :root {
      --bg: #ffffff;
      --text: #2d3436;
      --bubble-bot: #f0f0f0;
      --bubble-user: linear-gradient(135deg, #0984e3, #6c5ce7);
      --bg-header: linear-gradient(135deg, #00b894, #00cec9);
    }

    @media (prefers-color-scheme: dark) {
      :root {
        --bg: #1e1e1e;
        --text: #ecf0f1;
        --bubble-bot: #333;
        --bubble-user: linear-gradient(135deg, #00cec9, #0984e3);
        --bg-header: linear-gradient(135deg, #2ecc71, #27ae60);
      }
    }

    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body {
      font-family: 'Segoe UI', Tahoma, sans-serif;
      background: var(--bg);
      color: var(--text);
      height: 100vh;
      display: flex;
      justify-content: center;
      align-items: center;
      padding: 20px;
    }

    .chat-container {
      width: 100%;
      max-width: 800px;
      height: 90vh;
      background: var(--bg);
      border-radius: 20px;
      box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
      display: flex;
      flex-direction: column;
      overflow: hidden;
      border: 1px solid #ddd;
    }

    .chat-header {
      background: var(--bg-header);
      color: white;
      padding: 20px;
      text-align: center;
    }

    .chat-header h1 {
      font-size: 1.5rem;
      font-weight: bold;
    }

    .chat-messages {
      flex: 1;
      padding: 20px;
      overflow-y: auto;
      scroll-behavior: smooth;
    }

    .message {
      margin-bottom: 15px;
      display: flex;
      align-items: flex-end;
    }

    .message.user {
      justify-content: flex-end;
    }

    .message.bot {
      justify-content: flex-start;
    }

    .avatar {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      margin: 0 10px;
      flex-shrink: 0;
      background-size: cover;
      background-position: center;
    }

    .avatar.bot {
      background-image: url('https://chat.smkalbadri.sch.id/assets/img/iconrobo.jpeg');
    }

    .avatar.user {
      background-image: url('https://cdn-icons-png.flaticon.com/512/848/848006.png');
    }

    .message-content {
      max-width: 80%;
    }

    .message-bubble {
      display: inline-block;
      padding: 14px 18px;
      border-radius: 18px;
      font-size: 0.95rem;
      line-height: 1.4;
      white-space: pre-wrap;
    }

    .message.user .message-bubble {
      background: var(--bubble-user);
      color: white;
      border-bottom-right-radius: 5px;
    }

    .message.bot .message-bubble {
      background: var(--bubble-bot);
      color: var(--text);
      border-bottom-left-radius: 5px;
    }

    .timestamp {
      font-size: 0.7rem;
      opacity: 0.6;
      margin-top: 5px;
    }

    .chat-input-container {
      padding: 20px;
      background: rgba(248, 249, 250, 0.9);
      border-top: 1px solid #ddd;
    }

    @media (prefers-color-scheme: dark) {
      .chat-input-container {
        background: #1a1a1a;
        border-top: 1px solid #444;
      }
    }

    .input-group {
      display: flex;
      gap: 10px;
      align-items: flex-end;
    }

    .message-input {
      flex: 1;
      padding: 12px 18px;
      border: 2px solid #ccc;
      border-radius: 25px;
      font-size: 1rem;
      resize: none;
      min-height: 50px;
      max-height: 120px;
    }

    .message-input:focus {
      outline: none;
      border-color: #00cec9;
    }

    .send-button {
      width: 50px;
      height: 50px;
      background: linear-gradient(135deg, #00cec9, #0984e3);
      color: white;
      border: none;
      border-radius: 50%;
      cursor: pointer;
      font-size: 1.2rem;
      transition: all 0.2s ease;
    }

    .send-button:hover {
      transform: scale(1.05);
    }

    .typing-indicator {
      display: none;
      text-align: center;
      padding: 10px;
      font-style: italic;
      color: #555;
    }
 