/* 
 * Ghibli Forest Spirit Style CSS
 * 基于吉卜力工作室森林之灵风格设计
 */

:root {
    /* 森林之灵配色方案 */
    --forest-green-dark: #2c5f2d;
    --forest-green: #97c1a9;
    --forest-green-light: #cce3de;
    --earth-brown: #a68a64;
    --earth-brown-light: #d4c19c;
    --cream: #f5f5dc;
    --wood-brown: #6e4c1e;
    --leaf-green: #5f8d4e;
    --moss-green: #8fb339;
    --sunlight: #ffd166;
    --water-blue: #a4c3b2;
    --sky-blue: #a8d8ea;
    --dust-pink: #ffcab0;
    --sunset-orange: #f6ae2d;
    --night-blue: #2a4365;

    /* 字体颜色 */
    --text-dark: #2c3e50;
    --text-light: #f5f5dc;
    --text-muted: #6e4c1e;

    /* 阴影 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
    --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-glow: 0 0 15px rgba(255, 209, 102, 0.4);

    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;

    /* 毛玻璃效果 */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-blur: blur(12px);
    --glass-blur-light: blur(8px);
}

/* 基础样式 */
html,
body {
    height: 100%;
    overflow: hidden;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: "Hiragino Kaku Gothic Pro", "ヒラギノ角ゴ Pro W3", Meiryo, "メイリオ", "MS PGothic", "MS Pゴシック", sans-serif;
    background-color: var(--cream);
    color: var(--text-dark);
}

/* 应用容器 */
.app-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-image: url('../images/bg2.webp'), linear-gradient(to bottom, var(--forest-green-light) 0%, var(--cream) 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

/* 页面头部 - 毛玻璃效果 */
.header {
    background: rgba(44, 95, 45, 0.65);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    color: var(--text-light);
    padding: 15px 0;
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 10;
    border-bottom: 1px solid var(--glass-border);
}

.header h1 {
    font-size: 20px;
    margin: 0;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* 头部按钮 - 增强动画效果 */
.header .btn {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-light);
    border: 1px solid var(--glass-border);
    font-size: 13px;
    padding: 8px 15px;
    border-radius: var(--radius-full);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--shadow-sm);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    position: relative;
    overflow: hidden;
}

.header .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.4s ease;
}

.header .btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-md), var(--shadow-glow);
    color: white;
}

.header .btn:hover::before {
    left: 100%;
}

.header .btn:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: var(--shadow-sm);
}

.connection-status {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--moss-green);
    animation: pulse 2s infinite;
}

.status-indicator.disconnected {
    background: #e74c3c;
    animation: none;
}

@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* 聊天容器 */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* 聊天消息区 - 增强背景效果 */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
    background-image: url('../images/subtle-paper-texture.png');
    background-repeat: repeat;
    position: relative;
}

/* 添加飘动的树叶装饰 */
.chat-messages::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, rgba(151, 193, 169, 0.3) 0%, rgba(151, 193, 169, 0) 100%);
    pointer-events: none;
    animation: leafSway 15s ease-in-out infinite alternate;
}

@keyframes leafSway {
    0% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 100% 10%;
    }
}

.chat-messages::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to top, rgba(212, 193, 156, 0.2) 0%, rgba(212, 193, 156, 0) 100%);
    pointer-events: none;
}

/* 添加飘动的光点 */
.app-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 25px),
        radial-gradient(circle at 80% 40%, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 35px),
        radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 30px),
        radial-gradient(circle at 70% 90%, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 20px);
    pointer-events: none;
    animation: sparkle 10s ease-in-out infinite alternate;
    opacity: 0.7;
    z-index: 1;
}

@keyframes sparkle {
    0% {
        background-position: 0% 0%, 100% 0%, 0% 100%, 100% 100%;
    }

    100% {
        background-position: 5% 10%, 95% 15%, 10% 90%, 90% 95%;
    }
}

/* 消息组 */
.message-group {
    margin-bottom: 25px;
    position: relative;
}

/* 消息气泡 - 增强样式和动画 */
.message-bubble {
    max-width: 70%;
    padding: 15px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    position: relative;
    word-wrap: break-word;
    box-shadow: var(--shadow-md);
    animation: growIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.message-bubble:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

@keyframes growIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.message-ai {
    background-color: rgba(204, 227, 222, 0.85);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: 1px solid var(--forest-green);
    margin-right: auto;
    border-bottom-left-radius: var(--radius-sm);
    color: var(--text-dark);
}

.message-ai::before {
    content: '';
    position: absolute;
    left: -12px;
    bottom: 12px;
    width: 20px;
    height: 20px;
    background: rgba(204, 227, 222, 0.85);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border-left: 1px solid var(--forest-green);
    border-bottom: 1px solid var(--forest-green);
    transform: rotate(45deg);
    border-radius: 2px;
    z-index: -1;
}

.message-user {
    background: linear-gradient(135deg, rgba(166, 138, 100, 0.9) 0%, rgba(110, 76, 30, 0.9) 100%);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    color: var(--text-light);
    margin-left: auto;
    border-bottom-right-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.message-user::after {
    content: '';
    position: absolute;
    right: -12px;
    bottom: 12px;
    width: 20px;
    height: 20px;
    background: rgba(166, 138, 100, 0.9);
    transform: rotate(45deg);
    border-radius: 2px;
    z-index: -1;
}

.message-pending {
    background: var(--sunlight);
    border: 1px solid rgba(255, 209, 102, 0.5);
    margin-right: auto;
    border-bottom-left-radius: var(--radius-sm);
}

.message-pending::before {
    content: '';
    position: absolute;
    left: -12px;
    bottom: 12px;
    width: 20px;
    height: 20px;
    background: var(--sunlight);
    border-left: 1px solid rgba(255, 209, 102, 0.5);
    border-bottom: 1px solid rgba(255, 209, 102, 0.5);
    transform: rotate(45deg);
    border-radius: 2px;
    z-index: -1;
}

.message-pending .pending-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--wood-brown);
    font-style: italic;
}

.typing-indicator {
    display: inline-flex;
    gap: 4px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--wood-brown);
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {

    0%,
    80%,
    100% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 头像 */
.message-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    box-shadow: var(--shadow-sm);
}

.avatar-ai {
    background: linear-gradient(135deg, var(--forest-green) 0%, var(--forest-green-dark) 100%);
    color: var(--text-light);
}

.avatar-user {
    background: linear-gradient(135deg, var(--earth-brown) 0%, var(--wood-brown) 100%);
    color: var(--text-light);
}

/* 时间戳 */
.message-time {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    margin: 10px 0;
    font-style: italic;
}

/* 消息内容 */
.message-content {
    line-height: 1.6;
}

.message-ai .message-content {
    color: var(--text-dark);
}

.message-user .message-content {
    color: var(--text-light);
}

/* 输入区域 - 毛玻璃效果 */
.input-container {
    background: rgba(245, 245, 220, 0.7);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-top: 1px solid var(--glass-border);
    padding: 18px 20px;
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 5;
}

.input-container::before {
    content: '';
    position: absolute;
    top: -40px;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to top, rgba(245, 245, 220, 0.7) 0%, rgba(245, 245, 220, 0) 100%);
    pointer-events: none;
}

.input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    max-width: 100%;
    position: relative;
}

/* 输入框 - 毛玻璃效果 */
.input-field {
    flex: 1;
    min-height: 45px;
    max-height: 120px;
    border: 2px solid var(--forest-green);
    border-radius: var(--radius-md);
    padding: 12px 18px;
    resize: none;
    font-size: 15px;
    line-height: 1.5;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow-y: auto;
    background-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    color: var(--text-dark);
    box-shadow: var(--shadow-sm);
}

.input-field:focus {
    outline: none;
    border-color: var(--forest-green-dark);
    box-shadow: var(--shadow-md), 0 0 0 4px rgba(151, 193, 169, 0.3);
    background-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
}

/* 发送按钮 - 增强动画效果 */
.send-button {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--forest-green) 0%, var(--forest-green-dark) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.send-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: all 0.4s ease;
}

.send-button:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.send-button:hover::before {
    left: 100%;
}

.send-button:active {
    transform: scale(0.95);
    box-shadow: var(--shadow-sm);
}

.send-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 空状态 - 增强吉卜力风格 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    text-align: center;
    padding: 40px;
    background-image: url('../images/subtle-paper-texture.png');
    background-repeat: repeat;
    position: relative;
    z-index: 2;
}

/* 添加小精灵/小动物装饰 */
.empty-state::before {
    content: '';
    position: absolute;
    bottom: 10%;
    left: 15%;
    width: 30px;
    height: 30px;
    background: radial-gradient(circle, rgba(255, 209, 102, 0.7) 0%, rgba(255, 209, 102, 0) 70%);
    border-radius: 50%;
    filter: blur(2px);
    animation: floatSpirit 8s ease-in-out infinite;
    z-index: -1;
}

.empty-state::after {
    content: '';
    position: absolute;
    top: 20%;
    right: 20%;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, rgba(151, 193, 169, 0.7) 0%, rgba(151, 193, 169, 0) 70%);
    border-radius: 50%;
    filter: blur(2px);
    animation: floatSpirit 12s ease-in-out 2s infinite;
    z-index: -1;
}

@keyframes floatSpirit {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 0.7;
    }

    50% {
        transform: translate(20px, -30px) scale(1.2);
        opacity: 1;
    }

    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.7;
    }
}

.empty-state-icon {
    font-size: 52px;
    margin-bottom: 20px;
    opacity: 0.8;
    animation: float 4s ease-in-out infinite;
    position: relative;
    text-shadow: 0 0 15px rgba(143, 179, 57, 0.4);
}

/* 图标发光效果 */
.empty-state-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(143, 179, 57, 0.2) 0%, rgba(143, 179, 57, 0) 70%);
    transform: translate(-50%, -50%);
    z-index: -1;
    animation: pulse 3s ease-in-out infinite alternate;
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-15px) rotate(5deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0.2;
    }
}

.empty-state-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--forest-green-dark);
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

.empty-state-subtitle {
    font-size: 16px;
    opacity: 0.8;
    max-width: 300px;
    line-height: 1.5;
    color: var(--wood-brown);
}

/* Markdown内容样式 */
.markdown-content {
    font-size: 15px;
    line-height: 1.6;
    word-wrap: break-word;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
    margin: 15px 0 10px 0;
    font-weight: 600;
    color: var(--forest-green-dark);
}

.message-user .markdown-content h1,
.message-user .markdown-content h2,
.message-user .markdown-content h3,
.message-user .markdown-content h4,
.message-user .markdown-content h5,
.message-user .markdown-content h6 {
    color: var(--text-light);
}

.markdown-content h1 {
    font-size: 20px;
}

.markdown-content h2 {
    font-size: 18px;
}

.markdown-content h3 {
    font-size: 17px;
}

.markdown-content h4 {
    font-size: 16px;
}

.markdown-content p {
    margin: 8px 0;
}

.markdown-content ul,
.markdown-content ol {
    margin: 8px 0;
    padding-left: 20px;
}

.markdown-content li {
    margin: 4px 0;
}

.markdown-content blockquote {
    border-left: 4px solid var(--forest-green);
    margin: 10px 0;
    padding: 8px 15px;
    background: rgba(151, 193, 169, 0.2);
    border-radius: var(--radius-sm);
    font-style: italic;
}

.message-user .markdown-content blockquote {
    border-left-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.1);
}

.markdown-content code {
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 5px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
}

.message-user .markdown-content code {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-light);
}

.markdown-content pre {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
    padding: 12px;
    margin: 12px 0;
    overflow-x: auto;
}

.message-user .markdown-content pre {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.markdown-content pre code {
    background: none;
    padding: 0;
    font-size: 13px;
}

.markdown-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 10px 0;
    font-size: 14px;
}

.markdown-content th,
.markdown-content td {
    border: 1px solid var(--forest-green-light);
    padding: 8px 10px;
    text-align: left;
}

.markdown-content th {
    background: rgba(151, 193, 169, 0.2);
    font-weight: 600;
}

.message-user .markdown-content th {
    background: rgba(255, 255, 255, 0.1);
}

.message-user .markdown-content th,
.message-user .markdown-content td {
    border-color: rgba(255, 255, 255, 0.2);
}

.markdown-content a {
    color: var(--forest-green-dark);
    text-decoration: none;
    border-bottom: 1px dotted var(--forest-green);
    transition: all 0.2s;
}

.message-user .markdown-content a {
    color: var(--text-light);
    border-bottom: 1px dotted rgba(255, 255, 255, 0.5);
}

.markdown-content a:hover {
    border-bottom: 1px solid;
}

.markdown-content hr {
    border: none;
    border-top: 1px solid var(--forest-green-light);
    margin: 15px 0;
}

.message-user .markdown-content hr {
    border-top-color: rgba(255, 255, 255, 0.2);
}

/* 日志相关样式 */
.log-container {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100%;
    background: rgba(44, 95, 45, 0.85);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    color: var(--text-light);
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.2);
    transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    z-index: 2000;
    border-left: 1px solid var(--glass-border);
}

.log-container.active {
    right: 0;
}

.log-header {
    padding: 15px 20px;
    background: rgba(44, 95, 45, 0.95);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
}

.log-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    font-family: monospace;
    font-size: 13px;
    line-height: 1.5;
    background-image: url('../images/subtle-paper-texture.png');
    background-repeat: repeat;
    background-color: rgba(245, 245, 220, 0.1);
}

.log-entry {
    padding: 8px 10px;
    margin-bottom: 8px;
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.1);
    border-left: 3px solid transparent;
}

.log-entry-info {
    border-left-color: var(--forest-green-light);
    color: var(--forest-green-light);
}

.log-entry-debug {
    border-left-color: var(--sunlight);
    color: var(--sunlight);
}

.log-entry-error {
    border-left-color: #e74c3c;
    color: #ffcccc;
}

.log-actions {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    background: rgba(44, 95, 45, 0.95);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-top: 1px solid var(--glass-border);
}

.log-actions .btn {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-light);
    border: none;
    padding: 8px 15px;
    border-radius: var(--radius-full);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    flex: 1;
    text-align: center;
}

.log-actions .btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.log-level-filter {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 12px;
    background: rgba(110, 76, 30, 0.6);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    padding: 12px 15px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
}

.log-level-filter label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
}

.log-level-filter label:hover {
    transform: translateY(-2px);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

/* 日志徽章 */
.log-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.log-badge .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* 日志滚动条样式 */
.log-content::-webkit-scrollbar {
    width: 8px;
}

.log-content::-webkit-scrollbar-track {
    background: transparent;
}

.log-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.log-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* UID 输入蒙版 - 毛玻璃效果 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(44, 95, 45, 0.4);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    transition: all 0.4s ease;
}

.overlay-content {
    background: rgba(245, 245, 220, 0.9);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(143, 179, 57, 0.3);
    text-align: center;
    max-width: 400px;
    width: 90%;
    border: 2px solid var(--glass-border);
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.overlay-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--forest-green) 0%, var(--forest-green-dark) 100%);
}

/* 添加自然元素装饰 */
.overlay-content::after {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 80px;
    height: 80px;
    background-image:
        radial-gradient(circle at 30% 30%, rgba(143, 179, 57, 0.1) 0%, rgba(143, 179, 57, 0) 50%),
        radial-gradient(circle at 70% 70%, rgba(255, 209, 102, 0.1) 0%, rgba(255, 209, 102, 0) 50%);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.8;
}

.overlay-content h2 {
    margin-bottom: 25px;
    color: var(--forest-green-dark);
    font-size: 26px;
    position: relative;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

.overlay-content h2::after {
    content: '🌿';
    font-size: 18px;
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.7;
}

.overlay-content input {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid var(--forest-green-light);
    border-radius: var(--radius-md);
    margin-bottom: 30px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--shadow-inner);
}

.overlay-content input:focus {
    outline: none;
    border-color: var(--forest-green);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-sm), 0 0 0 4px rgba(151, 193, 169, 0.2);
    transform: translateY(-2px);
}

.overlay-content button {
    background: linear-gradient(135deg, var(--forest-green) 0%, var(--forest-green-dark) 100%);
    color: white;
    border: none;
    padding: 14px 38px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 16px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.overlay-content button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: all 0.4s ease;
}

.overlay-content button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.overlay-content button:hover::before {
    left: 100%;
}

.overlay-content button:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: var(--shadow-sm);
}

/* 滚动条样式 */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(110, 76, 30, 0.3);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(110, 76, 30, 0.5);
}

/* 移动端响应式设计 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 18px;
    }

    .header .btn {
        font-size: 12px;
        padding: 6px 10px;
    }

    .connection-status {
        font-size: 11px;
        padding: 4px 8px;
    }

    .chat-messages {
        padding: 15px;
    }

    .message-bubble {
        max-width: 85%;
        padding: 12px 15px;
    }

    .input-container {
        padding: 15px;
    }

    .input-field {
        font-size: 16px;
        padding: 10px 15px;
    }

    .markdown-content {
        font-size: 14px;
    }

    .markdown-content h1 {
        font-size: 18px;
    }

    .markdown-content h2 {
        font-size: 16px;
    }

    .markdown-content h3 {
        font-size: 15px;
    }

    .markdown-content h4 {
        font-size: 14px;
    }

    .overlay-content {
        padding: 25px;
    }

    .overlay-content h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }
}

.pets-avatar-fixed {
    position: absolute;
    right: 24px;
    bottom: 24px;
    width: 54px;
    height: 54px;
    z-index: 2;
    background: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: petsJump 2.2s infinite cubic-bezier(0.4, 0.2, 0.6, 1);
    pointer-events: none;
}

@keyframes petsJump {

    0%,
    100% {
        transform: translateY(0);
    }

    20% {
        transform: translateY(-18px) scale(1.08);
    }

    40% {
        transform: translateY(0) scale(1);
    }

    60% {
        transform: translateY(-10px) scale(1.04);
    }

    80% {
        transform: translateY(0) scale(1);
    }
}