        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent;
        }

        html {
            font-size: 15px;
            -webkit-text-size-adjust: 100%;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
            background: linear-gradient(145deg, #f6f8fc 0%, #edf0f7 100%);
            min-height: 100vh;
            padding: 0;
            display: flex;
            flex-direction: column;
        }

        .chat-header {
            background: rgba(255, 255, 255, 0.92);
            -webkit-backdrop-filter: blur(12px);
            backdrop-filter: blur(12px);
            border-bottom: 1px solid rgba(255, 255, 255, 0.7);
            padding: clamp(0.8rem, 3vw, 1.2rem);
            display: flex;
            align-items: center;
            gap: 1rem;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 100;
        }

        .back-btn {
            background: #e9eefa;
            border: none;
            border-radius: 50%;
            width: clamp(2.5rem, 8vw, 3rem);
            height: clamp(2.5rem, 8vw, 3rem);
            display: flex;
            align-items: center;
            justify-content: center;
            color: #1d2c4a;
            font-size: clamp(1rem, 4vw, 1.2rem);
            cursor: pointer;
        }

        .user-info {
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }

        .user-name {
            font-weight: 700;
            color: #1d2c4a;
            font-size: clamp(1rem, 4vw, 1.2rem);
        }

        .online-status {
            color: #4CAF50;
            font-size: clamp(0.8rem, 3vw, 0.9rem);
            display: flex;
            align-items: center;
            gap: 0.3rem;
            margin-top: 0.2rem;
        }

        .chat-container {
            flex: 1;
            padding: clamp(5rem, 15vw, 6rem) clamp(1rem, 4vw, 1.5rem) clamp(7rem, 20vw, 8rem);
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }

        .message {
            max-width: 75%;
            display: flex;
            flex-direction: column;
            gap: 0.3rem;
        }

        .message.user {
            align-self: flex-end;
            align-items: flex-end;
        }

        .message.admin {
            align-self: flex-start;
            align-items: flex-start;
        }

        .message-content {
            background: white;
            border-radius: 12px;
            padding: clamp(0.6rem, 2vw, 0.8rem) clamp(0.8rem, 3vw, 1rem);
            box-shadow: 0 2px 6px rgba(0,0,0,0.05);
            word-break: break-word;
            overflow-wrap: break-word;
        }

        .message.user .message-content {
            background: #335599;
            color: white;
            border-bottom-right-radius: 4px;
        }

        .message.admin .message-content {
            background: white;
            color: #1d2c4a;
            border-bottom-left-radius: 4px;
        }

        .message-time {
            font-size: clamp(0.7rem, 2vw, 0.8rem);
            color: #6c757d;
            padding: 0 0.5rem;
        }

        .message-image, .message-video {
            max-width: 100%;
            border-radius: 8px;
            cursor: pointer;
        }

        .chat-input {
            background: rgba(255, 255, 255, 0.92);
            -webkit-backdrop-filter: blur(12px);
            backdrop-filter: blur(12px);
            border-top: 1px solid rgba(255, 255, 255, 0.7);
            padding: clamp(0.8rem, 3vw, 1rem);
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            display: flex;
            flex-direction: column;
            gap: 0.8rem;
        }

        .input-tools {
            display: flex;
            gap: 0.8rem;
            flex-shrink: 0;
        }

        .tool-btn {
            background: #e9eefa;
            border: none;
            border-radius: 50%;
            width: clamp(2.2rem, 7vw, 2.5rem);
            height: clamp(2.2rem, 7vw, 2.5rem);
            display: flex;
            align-items: center;
            justify-content: center;
            color: #1d2c4a;
            font-size: clamp(1rem, 4vw, 1.1rem);
            cursor: pointer;
            flex-shrink: 0;
        }

        .input-send-wrap {
            display: flex;
            align-items: center;
            gap: 0.8rem;
            width: 100%;
            flex-shrink: 0;
        }

        .input-wrapper {
            flex: 1;
            position: relative;
        }

        .message-input {
            width: 100%;
            background: #e9eefa;
            border: none;
            border-radius: 20px;
            padding: clamp(0.6rem, 2vw, 0.8rem) clamp(1rem, 3vw, 1.2rem);
            font-size: clamp(0.9rem, 3vw, 1rem);
            color: #1d2c4a;
            outline: none;
            resize: none;
            min-height: clamp(2.2rem, 7vw, 2.5rem);
            max-height: clamp(6rem, 20vw, 8rem);
        }

        .send-btn {
            background: #335599;
            color: white;
            border: none;
            border-radius: 20px;
            padding: clamp(0.6rem, 2vw, 0.8rem) clamp(1.2rem, 4vw, 1.5rem);
            font-weight: 700;
            font-size: clamp(0.9rem, 3vw, 1rem);
            cursor: pointer;
            flex-shrink: 0;
            white-space: nowrap;
        }

        .send-btn:active {
            transform: translateY(1px);
        }

        @media (min-width: 768px) {
            .chat-container {
                max-width: 800px;
                margin: 0 auto;
                padding-bottom: clamp(8rem, 20vw, 9rem);
            }
            .chat-header, .chat-input {
                max-width: 800px;
                left: 50%;
                transform: translateX(-50%);
            }
        }

        @media (max-width: 480px) {
            .send-btn {
                padding: 0.6rem 1rem;
                font-size: 0.85rem;
            }
            .input-tools {
                gap: 0.5rem;
            }
            .tool-btn {
                width: 2rem;
                height: 2rem;
                font-size: 0.9rem;
            }
            .chat-container {
                padding-bottom: clamp(6rem, 20vw, 7rem);
            }
        }