@charset "utf-8";
/* CSS Document */

  * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Microsoft JhengHei", sans-serif;
        }

        body {
            display: flex;
            flex-direction: column;
            height: 100vh;
            background-color: #e5e8f0;
        }

        .header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background-color: #ffffff;
            padding: 12px 20px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.05);
            z-index: 10;
        }

        .header-title {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 18px;
            font-weight: 600;
            color: #333333;
        }

        .header-icon {
            width: 24px;
            height: 24px;
            color: #2b3a67;
        }

        .leave-btn {
            background-color: #f25c69;
            color: #ffffff;
            border: none;
            border-radius: 8px;
            padding: 8px 16px;
            font-size: 15px;
            font-weight: bold;
            cursor: pointer;
            transition: opacity 0.2s;
        }

        .leave-btn:hover {
            opacity: 0.8;
        }

        .chat-container {
            flex: 1;
            padding: 20px 15px;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .message-wrapper {
            display: flex;
            max-width: 85%;
        }

        .message-wrapper.bot {
            align-self: flex-start;
        }

        .message-wrapper.user {
            align-self: flex-end;
            flex-direction: row-reverse;
        }

        .message-bubble {
            padding: 14px 18px;
            border-radius: 18px;
            font-size: 16px;
            line-height: 1.5;
            word-wrap: break-word;
            white-space: pre-wrap;
            box-shadow: 0 1px 2px rgba(0,0,0,0.05);
        }

        .message-wrapper.bot .message-bubble {
            background-color: #ffffff;
            color: #333333;
            border-top-left-radius: 4px;
        }

        .message-wrapper.user .message-bubble {
            background-color: #2e3a5f;
            color: #ffffff;
            border-top-right-radius: 4px;
        }

        .typing-indicator {
            display: flex;
            align-items: center;
            gap: 4px;
            padding: 4px 2px;
        }

        .typing-indicator span {
            width: 8px;
            height: 8px;
            background-color: #90949c;
            border-radius: 50%;
            animation: typing 1.4s infinite ease-in-out both;
        }

        .typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
        .typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

        @keyframes typing {
            0%, 80%, 100% { transform: scale(0); opacity: 0.3; }
            40% { transform: scale(1); opacity: 1; }
        }

        .captcha-overlay {
            position: fixed;
            inset: 0;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 20px;
            background: rgba(30, 35, 48, 0.55);
            z-index: 1000;
        }

        .captcha-overlay.show {
            display: flex;
        }

        .captcha-card {
            width: min(420px, 100%);
            background: #ffffff;
            border-radius: 16px;
            padding: 24px;
            text-align: center;
            box-shadow: 0 12px 40px rgba(0,0,0,0.18);
        }

        .captcha-card h2 {
            margin-bottom: 10px;
            font-size: 20px;
            color: #25314f;
        }

        .captcha-card p {
            margin-bottom: 18px;
            font-size: 14px;
            line-height: 1.6;
            color: #666666;
        }

        #turnstile-container {
            display: flex;
            justify-content: center;
            min-height: 65px;
        }

        .captcha-status {
            min-height: 20px;
            margin-top: 12px;
            font-size: 14px;
            color: #666666;
        }

        .footer {
            background-color: #ffffff;
            padding: 12px 15px;
            padding-bottom: max(12px, env(safe-area-inset-bottom));
        }

        .input-wrapper {
            display: flex;
            align-items: center;
            background-color: #f0f2f5;
            border-radius: 30px;
            padding: 8px 16px;
        }

        .chat-input {
            flex: 1;
            border: none;
            background: transparent;
            font-size: 16px;
            color: #333333;
            outline: none;
            padding: 5px 0;
        }

        .chat-input::placeholder {
            color: #999999;
        }

        .chat-input:disabled {
            cursor: not-allowed;
        }

        .send-btn {
            background: transparent;
            border: none;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            color: #2e3a5f;
            padding: 5px;
            margin-left: 8px;
        }

        .send-btn:disabled {
            opacity: 0.4;
            cursor: not-allowed;
        }

        .send-btn svg {
            width: 24px;
            height: 24px;
            fill: currentColor;
        }

