
    * { margin: 0; padding: 0; box-sizing: border-box; }
    
    body {
      min-height: 100vh;
      background: radial-gradient(circle at 15% 20%, #f1f7ff 0%, #deebf8 35%, #cddff1 100%);
      display: flex;
      align-items: center;
      justify-content: center;
      font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
      overflow-x: hidden;
      position: relative;
    }

    .bg-scene {
      position: fixed;
      inset: 0;
      z-index: 0;
      overflow: hidden;
      pointer-events: none;
    }

    .bg-scene .shape {
      position: absolute;
      border: 2px solid rgba(87, 155, 214, 0.28);
      background: rgba(255, 255, 255, 0.15);
      backdrop-filter: blur(2px);
      border-radius: 26px;
      animation-timing-function: ease-in-out;
      animation-iteration-count: infinite;
      will-change: transform;
    }

    .bg-scene .shape.s1 {
      width: 220px;
      height: 220px;
      top: -40px;
      left: -60px;
      border-radius: 50%;
      animation: drift-a 16s infinite;
    }

    .bg-scene .shape.s2 {
      width: 280px;
      height: 280px;
      right: -70px;
      top: 70px;
      border-radius: 42% 58% 54% 46%;
      animation: drift-b 18s infinite;
    }

    .bg-scene .shape.s3 {
      width: 170px;
      height: 170px;
      left: 12%;
      bottom: 10%;
      border-style: dashed;
      border-radius: 38% 62% 44% 56%;
      animation: drift-c 14s infinite;
    }

    .bg-scene .shape.s4 {
      width: 160px;
      height: 160px;
      right: 16%;
      bottom: 16%;
      border-radius: 24px;
      animation: drift-d 20s infinite;
    }

    .bg-scene .shape.s5 {
      width: 280px;
      height: 280px;
      right: 30%;
      bottom: -120px;
      border-radius: 50%;
      border-width: 5px;
      border-color: rgba(131, 186, 232, 0.35);
      animation: drift-e 22s infinite;
    }

    @keyframes drift-a {
      0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
      50% { transform: translate3d(28px, 36px, 0) rotate(8deg); }
    }

    @keyframes drift-b {
      0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
      50% { transform: translate3d(-32px, -24px, 0) rotate(-10deg); }
    }

    @keyframes drift-c {
      0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
      50% { transform: translate3d(22px, -18px, 0) rotate(12deg); }
    }

    @keyframes drift-d {
      0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
      50% { transform: translate3d(-25px, 24px, 0) rotate(-8deg); }
    }

    @keyframes drift-e {
      0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
      50% { transform: translate3d(30px, -20px, 0) scale(1.04); }
    }

    #chat-container {
      min-height: 100vh;
      padding: 20px;
      position: relative;
      z-index: 2;
    }

    .chat-card {
      background: rgba(255, 255, 255, 0.88);
      border-radius: 22px;
      border: 1px solid rgba(255, 255, 255, 0.7);
      backdrop-filter: blur(8px);
      box-shadow: 0 25px 60px rgba(37, 72, 106, 0.2);
      padding: 40px 30px;
      max-width: 380px;
      width: 100%;
      animation: slideUp 0.6s ease-out, floatCard 6s ease-in-out infinite 0.6s;
      will-change: transform;
    }

    @keyframes floatCard {
      0%, 100% { transform: translateY(0px); }
      50% { transform: translateY(-10px); }
    }

    @keyframes slideUp {
      from {
        opacity: 0;
        transform: translateY(30px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .chat-logo {
      width: 90px;
      height: 90px;
      margin: 0 auto 16px;
      object-fit: cover;
      animation: fadeInDown 0.6s ease-out;
    }

    @keyframes fadeInDown {
      from {
        opacity: 0;
        transform: translateY(-20px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .system-title {
      font-size: 20px;
      font-weight: 700;
      color: #0a2942;
      margin-bottom: 6px;
      letter-spacing: -0.01em;
    }

    .system-subtitle {
      font-size: 12px;
      color: #6c757d;
      font-weight: 500;
      margin-bottom: 24px;
      padding-bottom: 16px;
      border-bottom: 1px solid #e9ecef;
    }

    .form-control {
      border: 2px solid #e9ecef;
      border-radius: 10px;
      padding: 12px 16px;
      font-size: 15px;
      transition: all 0.3s ease;
      background-color: #f8f9fa;
    }

    .form-control:focus {
      border-color: #1d6fa5;
      background-color: white;
      box-shadow: 0 0 0 0.2rem rgba(29, 111, 165, 0.15);
      outline: none;
    }

    .form-control::placeholder {
      color: #adb5bd;
    }

    .message-limit-note {
      margin-top: 8px;
      font-size: 12px;
      color: #56748d;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }

    .message-limit-count {
      font-weight: 700;
      color: #2f5f84;
    }

    .emoji-picker {
      margin-top: 12px;
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
      background: rgba(240, 247, 254, 0.75);
      border: 1px solid rgba(111, 164, 207, 0.25);
      border-radius: 10px;
      padding: 10px;
    }

    .emoji-picker__label {
      font-size: 12px;
      font-weight: 700;
      color: #2f5f84;
      margin-right: 2px;
    }

    .emoji-picker__btn {
      border: 1px solid rgba(111, 164, 207, 0.3);
      border-radius: 8px;
      min-width: 34px;
      height: 34px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: #ffffff;
      font-size: 18px;
      line-height: 1;
      cursor: pointer;
      transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    }

    .emoji-picker__btn:hover {
      transform: translateY(-1px);
      border-color: #5f95c3;
      box-shadow: 0 6px 14px rgba(37, 72, 106, 0.14);
    }

    .emoji-picker__btn:focus-visible {
      outline: 2px solid #1d6fa5;
      outline-offset: 2px;
    }

    .hp-field {
      position: absolute;
      left: -9999px;
      width: 1px;
      height: 1px;
      overflow: hidden;
    }

    .input-group-text {
      border-radius: 0 10px 10px 0;
      border: 2px solid #e9ecef;
      border-left: none;
      cursor: pointer;
      transition: all 0.3s ease;
      color: #1d6fa5;
    }

    .input-group-text:hover {
      background-color: #f0f7fe;
      color: #0a2942;
    }

    .input-group > .form-control:focus ~ .input-group-text {
      border-color: #1d6fa5;
      background-color: white;
    }

    .btn-primary {
      background: linear-gradient(135deg, #0a3b5c 0%, #1d6fa5 100%);
      border: none;
      border-radius: 10px;
      padding: 10px 20px;
      font-weight: 600;
      font-size: 14px;
      margin-top: 18px;
      transition: all 0.3s ease;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      box-shadow: 0 4px 15px rgba(10, 41, 66, 0.4);
    }

    .btn-primary:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(10, 41, 66, 0.6);
      background: linear-gradient(135deg, #1f4b74 0%, #2d7ab8 100%);
    }

    .btn-primary:active {
      transform: translateY(0);
      box-shadow: 0 2px 10px rgba(10, 41, 66, 0.4);
    }

    .btn-primary:disabled {
      opacity: 0.6;
      cursor: not-allowed;
      transform: none;
    }

    #chat-message {
      border-radius: 10px;
      border: none;
      margin-bottom: 24px;
      background-color: #f8d7da;
      color: #721c24;
      border-left: 4px solid #dc3545;
      animation: slideDown 0.3s ease-out;
    }

    @keyframes slideDown {
      from {
        opacity: 0;
        transform: translateY(-10px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    #chat-message .btn-close {
      color: #721c24;
    }

    .custom-modal {
      position: fixed;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 24px;
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition: opacity 0.25s ease, visibility 0.25s ease;
      z-index: 20;
    }

    .custom-modal.is-open {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
    }

    .custom-modal__backdrop {
      position: absolute;
      inset: 0;
      background: rgba(9, 30, 48, 0.28);
      backdrop-filter: blur(7px);
    }

    .custom-modal__dialog {
      position: relative;
      width: min(100%, 420px);
      background: rgba(255, 255, 255, 0.96);
      border: 1px solid rgba(255, 255, 255, 0.85);
      border-radius: 24px;
      box-shadow: 0 28px 60px rgba(18, 56, 88, 0.24);
      padding: 28px 24px 24px;
      text-align: center;
      transform: translateY(18px) scale(0.96);
      transition: transform 0.28s ease;
    }

    .custom-modal.is-open .custom-modal__dialog {
      transform: translateY(0) scale(1);
    }

    .custom-modal__close {
      position: absolute;
      top: 14px;
      right: 14px;
      width: 34px;
      height: 34px;
      border: none;
      border-radius: 50%;
      background: #eef5fb;
      color: #356488;
      font-size: 22px;
      line-height: 1;
      cursor: pointer;
      transition: background-color 0.2s ease, transform 0.2s ease;
    }

    .custom-modal__close:hover {
      background: #dcecf8;
      transform: rotate(90deg);
    }

    .custom-modal__icon {
      width: 68px;
      height: 68px;
      margin: 0 auto 16px;
      border-radius: 50%;
      display: grid;
      place-items: center;
      font-size: 30px;
      font-weight: 700;
      color: #fff;
      background: linear-gradient(135deg, #6daee0 0%, #2d77b0 100%);
      box-shadow: 0 12px 28px rgba(45, 119, 176, 0.28);
    }

    .custom-modal__title {
      margin-bottom: 8px;
      color: #0a2942;
      font-size: 24px;
      font-weight: 700;
    }

    .custom-modal__text {
      margin-bottom: 22px;
      color: #587188;
      font-size: 15px;
      line-height: 1.6;
    }

    .custom-modal__button {
      min-width: 140px;
      border: none;
      border-radius: 999px;
      padding: 12px 24px;
      color: #fff;
      font-size: 14px;
      font-weight: 700;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      background: linear-gradient(135deg, #0a3b5c 0%, #1d6fa5 100%);
      box-shadow: 0 10px 22px rgba(10, 41, 66, 0.24);
      transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .custom-modal__button:hover {
      transform: translateY(-2px);
      box-shadow: 0 14px 24px rgba(10, 41, 66, 0.28);
    }

    .custom-modal--error .custom-modal__icon {
      background: linear-gradient(135deg, #f08c95 0%, #d95465 100%);
      box-shadow: 0 12px 28px rgba(217, 84, 101, 0.24);
    }

    .custom-modal--success .custom-modal__icon {
      background: linear-gradient(135deg, #53c48a 0%, #2e9b68 100%);
      box-shadow: 0 12px 28px rgba(46, 155, 104, 0.24);
    }

    .custom-modal--success .custom-modal__button {
      background: linear-gradient(135deg, #2e9b68 0%, #53c48a 100%);
    }

    .creator-badge {
      position: fixed;
      right: 14px;
      bottom: 14px;
      z-index: 5;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 8px 12px;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.78);
      border: 1px solid rgba(118, 171, 216, 0.45);
      box-shadow: 0 8px 20px rgba(37, 72, 106, 0.16);
      backdrop-filter: blur(8px);
    }

    .creator-badge__logo {
      width: 24px;
      height: 24px;
      border-radius: 50%;
      object-fit: cover;
      border: 1px solid rgba(255, 255, 255, 0.9);
      flex: 0 0 auto;
    }

    .creator-badge__meta {
      display: flex;
      flex-direction: column;
      gap: 1px;
      line-height: 1.1;
    }

    .creator-badge__tag {
      font-size: 9px;
      font-weight: 800;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: #5d7f9b;
    }

    .creator-badge__name {
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.02em;
      color: #285880;
      white-space: nowrap;
    }

    @media (prefers-reduced-motion: reduce) {
      .bg-scene .shape,
      .chat-card,
      .chat-logo,
      .custom-modal,
      .custom-modal__dialog {
        animation: none !important;
        transition: none !important;
      }
    }

    @media (max-width: 480px) {
      .chat-card {
        padding: 30px 20px;
      }

      .system-title {
        font-size: 18px;
      }

      .chat-logo {
        width: 80px;
        height: 80px;
      }

      .custom-modal__dialog {
        padding: 24px 18px 20px;
      }

      .creator-badge {
        right: 10px;
        bottom: 10px;
        padding: 7px 10px;
      }

      .creator-badge__logo {
        width: 22px;
        height: 22px;
      }

      .creator-badge__name {
        font-size: 11px;
      }

      .creator-badge__tag {
        font-size: 8px;
      }
    }