/* K230 4G无线连接管理系统 - 样式文件 */

/* 基础样式 */
body {
    margin: 0;
    padding: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(120, 119, 255, 0.2) 0%, transparent 50%),
        linear-gradient(135deg, #0f1117 0%, #1a1f2e 25%, #2a2d47 50%, #1e2139 75%, #0d1117 100%);
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #ffffff;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(600px circle at 30% 30%, rgba(29, 78, 216, 0.15), transparent 40%),
        radial-gradient(800px circle at 70% 70%, rgba(139, 92, 246, 0.1), transparent 40%),
        radial-gradient(1000px circle at 50% 10%, rgba(59, 130, 246, 0.08), transparent 50%);
    animation: backgroundShift 20s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes backgroundShift {

    0%,
    100% {
        transform: translateX(0) translateY(0) rotate(0deg);
        opacity: 1;
    }

    33% {
        transform: translateX(-20px) translateY(-10px) rotate(1deg);
        opacity: 0.8;
    }

    66% {
        transform: translateX(20px) translateY(10px) rotate(-1deg);
        opacity: 0.9;
    }
}

#app {
    max-width: calc(100vw - 40px);
    width: 100%;
    margin: 20px auto 0 auto;
    box-shadow:
        0 32px 64px rgba(0, 0, 0, 0.5),
        0 16px 32px rgba(29, 78, 216, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(15, 17, 23, 0.9) 0%, rgba(26, 31, 46, 0.95) 100%);
    backdrop-filter: blur(30px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    min-height: calc(100vh - 40px);
    position: relative;
}

#app::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(135deg,
            rgba(59, 130, 246, 0.05) 0%,
            transparent 25%,
            rgba(139, 92, 246, 0.03) 50%,
            transparent 75%,
            rgba(29, 78, 216, 0.04) 100%);
    pointer-events: none;
    z-index: 0;
}


/* 左侧导航栏 */
.nav-sidebar {
    width: 250px;
    background:
        linear-gradient(180deg, rgba(15, 17, 23, 0.95) 0%, rgba(22, 27, 45, 0.9) 100%);
    backdrop-filter: blur(25px) saturate(180%);
    border-right: 1px solid rgba(59, 130, 246, 0.15);
    box-shadow:
        inset -1px 0 0 rgba(255, 255, 255, 0.05),
        4px 0 24px rgba(29, 78, 216, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.nav-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.12) 0%, transparent 60%),
        linear-gradient(180deg,
            rgba(29, 78, 216, 0.08) 0%,
            rgba(139, 92, 246, 0.06) 50%,
            rgba(15, 17, 23, 0.1) 100%);
    pointer-events: none;
    z-index: 0;
}

.nav-sidebar::after {
    content: '';
    position: absolute;
    top: 20%;
    left: -50%;
    width: 200%;
    height: 60%;
    background:
        radial-gradient(ellipse at center, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    animation: navGlow 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes navGlow {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1) rotate(0deg);
    }

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

.nav-sidebar.collapsed {
    width: 60px;
}

.nav-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.nav-toggle {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5em;
    cursor: pointer;
    padding: 5px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.nav-title {
    color: #fff;
    font-weight: bold;
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.nav-sidebar.collapsed .nav-title {
    opacity: 0;
}

.nav-content {
    padding: 10px 0;
    flex: 1;
    position: relative;
    z-index: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
    margin: 2px 8px;
    border-radius: 12px;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(135deg,
            rgba(59, 130, 246, 0.1) 0%,
            rgba(139, 92, 246, 0.08) 100%);
    border-radius: 12px;
    opacity: 0;
    transition: all 0.4s ease;
    z-index: -1;
}

.nav-item:hover {
    color: rgba(255, 255, 255, 0.95);
    transform: translateX(4px);
    box-shadow:
        0 8px 32px rgba(59, 130, 246, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.nav-item:hover::before {
    opacity: 1;
    transform: scale(1.02);
}

.nav-item.active {
    color: #ffffff;
    background:
        linear-gradient(135deg,
            rgba(59, 130, 246, 0.2) 0%,
            rgba(139, 92, 246, 0.15) 100%);
    border-right: 3px solid rgba(59, 130, 246, 0.8);
    box-shadow:
        0 8px 32px rgba(59, 130, 246, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(59, 130, 246, 0.2);
    transform: translateX(2px);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: linear-gradient(180deg, transparent, rgba(59, 130, 246, 0.8), transparent);
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
}

.nav-item span:first-child {
    font-size: 1.2em;
    min-width: 20px;
    text-align: center;
}

.nav-item span:last-child {
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.nav-sidebar.collapsed .nav-item span:last-child {
    opacity: 0;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    min-height: 100%;
    position: relative;
    background: rgba(255, 255, 255, 0.05);
}

.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* 页面切换 */
.page {
    display: none;
    flex: 1;
    flex-direction: column;
}

.page.active {
    display: flex;
}

/* 页面头部样式 */
.page-header {
    padding: 32px 24px;
    text-align: center;
    background:
        linear-gradient(135deg, rgba(15, 17, 23, 0.8) 0%, rgba(22, 27, 45, 0.7) 100%);
    backdrop-filter: blur(30px) saturate(150%);
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    position: relative;
    z-index: 1;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at top center, rgba(59, 130, 246, 0.15) 0%, transparent 70%),
        linear-gradient(135deg,
            rgba(29, 78, 216, 0.08) 0%,
            rgba(139, 92, 246, 0.06) 50%,
            rgba(59, 130, 246, 0.04) 100%);
    z-index: -1;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background:
        linear-gradient(90deg,
            transparent 0%,
            rgba(59, 130, 246, 0.6) 50%,
            transparent 100%);
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

.page-header h1 {
    margin: 0 0 16px 0;
    font-size: 2.2em;
    color: #ffffff;
    text-shadow:
        0 2px 8px rgba(59, 130, 246, 0.3),
        0 4px 16px rgba(29, 78, 216, 0.2);
    font-weight: 700;
    letter-spacing: -0.02em;
    background:
        linear-gradient(135deg,
            #ffffff 0%,
            rgba(255, 255, 255, 0.9) 50%,
            rgba(59, 130, 246, 0.9) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.status-indicators {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.gps-info {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background:
        linear-gradient(135deg, rgba(15, 17, 23, 0.8) 0%, rgba(22, 27, 45, 0.6) 100%);
    padding: 12px 20px;
    border-radius: 16px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    backdrop-filter: blur(20px);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
}

.status-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
    border-radius: 16px;
    pointer-events: none;
}

.status-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85em;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.status-value {
    color: rgba(59, 130, 246, 0.9);
    font-weight: 600;
    background:
        linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 0.85em;
    border: 1px solid rgba(59, 130, 246, 0.25);
    box-shadow:
        0 2px 8px rgba(59, 130, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* 页面主要内容区域 */
.page-main {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
}

/* 消息容器 */
.message-container {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 300px;
}

.message-header {
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.message-header h3 {
    margin: 0;
    color: #fff;
    font-size: 1.1em;
}

.message-stats {
    display: flex;
    gap: 16px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85em;
}

.message-list {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) rgba(255, 255, 255, 0.1);
}

/* 自定义滚动条样式 */
.message-list::-webkit-scrollbar {
    width: 8px;
}

.message-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.message-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    transition: background 0.2s ease;
}

.message-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.message-list.hidden {
    display: none;
}

/* 消息样式 */
.msg {
    display: inline-block;
    align-self: flex-end;
    max-width: 70%;
    min-width: 80px;
    width: fit-content;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.9), rgba(139, 92, 246, 0.8));
    color: #fff;
    padding: 12px 16px;
    border-radius: 18px 18px 8px 18px;
    box-shadow: 0 2px 12px rgba(59, 130, 246, 0.25);
    animation: popin 0.3s ease;
    position: relative;
    word-break: break-word;
    text-align: right;
    font-size: 0.95em;
    line-height: 1.4;
}

.msg.recv {
    align-self: flex-start;
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.8), rgba(59, 130, 246, 0.9));
    text-align: left;
    border-radius: 18px 18px 18px 8px;
}

.msg-top {
    position: absolute;
    top: 4px;
    right: 12px;
    font-size: 0.7em;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.msg-bot {
    position: absolute;
    left: 12px;
    bottom: 2px;
    font-size: 0.7em;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.msg.recv .msg-top {
    left: 12px;
    right: auto;
}

.msg.recv .msg-bot {
    right: 12px;
    left: auto;
}

/* 页面底部控制区域 */
.page-footer {
    padding: 20px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.control-label {
    color: #fff;
    font-size: 0.9em;
    font-weight: 500;
    min-width: 100px;
}

.control-input {
    flex: 1;
    min-width: 200px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.95em;
    color: #333;
    transition: all 0.2s ease;
}

.control-input:focus {
    background: #fff;
    box-shadow: 0 0 0 2px rgba(30, 144, 255, 0.3);
    outline: none;
}

.control-btn {
    border: none;
    border-radius: 14px;
    padding: 14px 24px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.connect-btn,
.send-btn {
    background:
        linear-gradient(135deg, rgba(59, 130, 246, 0.9) 0%, rgba(139, 92, 246, 0.8) 100%);
    color: #ffffff;
    box-shadow:
        0 8px 32px rgba(59, 130, 246, 0.3),
        0 4px 16px rgba(29, 78, 216, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.disconnect-btn,
.clear-btn {
    background:
        linear-gradient(135deg, rgba(239, 68, 68, 0.9) 0%, rgba(220, 38, 38, 0.8) 100%);
    color: #ffffff;
    box-shadow:
        0 8px 32px rgba(239, 68, 68, 0.3),
        0 4px 16px rgba(220, 38, 38, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.settings-btn {
    background:
        linear-gradient(135deg, rgba(139, 92, 246, 0.9) 0%, rgba(168, 85, 247, 0.8) 100%);
    color: #ffffff;
    box-shadow:
        0 8px 32px rgba(139, 92, 246, 0.3),
        0 4px 16px rgba(168, 85, 247, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(139, 92, 246, 0.4);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.control-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: left 0.6s ease;
}

.control-btn:hover::before {
    left: 100%;
}

.control-btn:hover {
    transform: translateY(-3px);
    box-shadow:
        0 12px 48px rgba(59, 130, 246, 0.4),
        0 8px 24px rgba(29, 78, 216, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.disconnect-btn:hover,
.clear-btn:hover {
    box-shadow:
        0 12px 48px rgba(239, 68, 68, 0.4),
        0 8px 24px rgba(220, 38, 38, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.settings-btn:hover {
    box-shadow:
        0 12px 48px rgba(139, 92, 246, 0.4),
        0 8px 24px rgba(168, 85, 247, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.control-btn:active {
    transform: translateY(-1px);
    transition: all 0.1s ease;
}

/* 遥控器样式 */
.remote-control {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 500;
}

.remote-control.hidden {
    display: none;
}

.remote-container {
    text-align: center;
}

.remote-container h3 {
    color: #fff;
    margin-bottom: 30px;
    font-size: 1.5em;
}

.remote-grid {
    display: grid;
    grid-template-columns: repeat(3, 80px);
    grid-template-rows: repeat(3, 80px);
    gap: 15px;
    position: relative;
}

.remote-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.9) 0%, rgba(139, 92, 246, 0.8) 100%);
    border: none;
    color: white;
    font-size: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
}

.remote-btn:active {
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.remote-btn span {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    font-weight: bold;
}

.up-btn {
    grid-column: 2;
    grid-row: 1;
}

.left-btn {
    grid-column: 1;
    grid-row: 2;
}

.ok-btn {
    grid-column: 2;
    grid-row: 2;
    background: linear-gradient(135deg, #11998e, #38ef7d);
    font-size: 20px;
}

.right-btn {
    grid-column: 3;
    grid-row: 2;
}

.down-btn {
    grid-column: 2;
    grid-row: 3;
}

.back-btn {
    grid-column: 3;
    grid-row: 3;
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
    font-size: 20px;
}

.exit-btn {
    grid-column: 1;
    grid-row: 3;
    background: linear-gradient(135deg, #333333, #666666);
    font-size: 18px;
}

/* 侧边栏样式 */
.sidebar {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(25px);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    border-left: 1px solid rgba(74, 85, 162, 0.2);
}

.sidebar.show {
    right: 0;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 1.2em;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5em;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-content {
    padding: 20px;
}

.setting-group {
    margin-bottom: 30px;
}

.setting-group h4 {
    color: #ffffff;
    margin-bottom: 15px;
    font-size: 1.1em;
    font-weight: 600;
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
}

.setting-item input[type="checkbox"] {
    margin: 0;
}

.filter-label {
    display: block;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.filter-input {
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    font-size: 0.9em;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    backdrop-filter: blur(10px);
    box-sizing: border-box;
}

.filter-input:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
    background: rgba(255, 255, 255, 0.15);
}

.filter-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* 遮罩层 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.overlay.show {
    opacity: 1;
    visibility: visible;
}

/* GPS定位页面样式 */
.gps-main {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.gps-info {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

/* API配置信息区域 */
.api-config-info {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    overflow: hidden;
}

.config-header {
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.config-header h3 {
    margin: 0;
    color: #fff;
    font-size: 1.1em;
}

.config-toggle {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.config-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.config-content {
    padding: 20px;
    transition: all 0.3s ease;
}

.config-content.hidden {
    display: none;
}

.config-section {
    margin-bottom: 20px;
}

.config-section h4 {
    color: #fff;
    margin-bottom: 12px;
    font-size: 1em;
}

.config-section ol {
    color: rgba(255, 255, 255, 0.8);
    padding-left: 20px;
}

.config-section ol li {
    margin-bottom: 8px;
}

.config-section a {
    color: #00d084;
    text-decoration: none;
}

/* 样式选择器 */
.style-selector {
    width: 150px;
    padding: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.9rem;
    margin-left: 10px;
    backdrop-filter: blur(10px);
}

.style-selector option {
    background: rgba(30, 144, 255, 0.9);
    color: #fff;
}

.config-section a:hover {
    text-decoration: underline;
}

.config-section label {
    display: block;
    color: #fff;
    margin-bottom: 8px;
    font-weight: 500;
}

.config-section input {
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 0.9em;
    margin-bottom: 12px;
    box-sizing: border-box;
}

.config-section input:focus {
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(30, 144, 255, 0.3);
}

/* 地图容器样式 */
.map-container {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    overflow: hidden;
    min-height: 400px;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

#amap-container {
    width: 100%;
    height: 100%;
    min-height: 400px;
}

.map-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    min-height: 400px;
    background: rgba(255, 255, 255, 0.03);
}

.placeholder-content {
    text-align: center;
    color: #fff;
}

.placeholder-content h3 {
    margin-bottom: 16px;
    font-size: 1.5em;
}

.placeholder-content p {
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.8);
}

/* GPS数据面板 */
.gps-data-panel {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    position: relative;
}

.gps-data-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(74, 85, 162, 0.1) 0%, rgba(116, 79, 168, 0.05) 100%);
    z-index: -1;
}

.data-header {
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.data-header h3 {
    margin: 0;
    color: #fff;
    font-size: 1.1em;
}

.data-controls {
    display: flex;
    gap: 8px;
}

.data-content {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.data-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
}

.data-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9em;
}

.data-value {
    color: #ffffff;
    font-weight: bold;
    font-family: monospace;
}

/* 按钮通用样式 */
.btn-primary {
    background:
        linear-gradient(135deg, rgba(59, 130, 246, 0.9) 0%, rgba(139, 92, 246, 0.8) 100%);
    color: #ffffff;
    border: none;
    border-radius: 14px;
    padding: 14px 24px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 8px 32px rgba(59, 130, 246, 0.3),
        0 4px 16px rgba(29, 78, 216, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.5);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.btn-primary::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: left 0.6s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-secondary {
    background:
        linear-gradient(135deg, rgba(15, 17, 23, 0.8) 0%, rgba(22, 27, 45, 0.7) 100%);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 14px;
    padding: 14px 24px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    letter-spacing: 0.02em;
    position: relative;
}

.btn-primary:hover {
    background:
        linear-gradient(135deg, rgba(79, 150, 255, 0.95) 0%, rgba(159, 112, 255, 0.9) 100%);
    transform: translateY(-3px);
    box-shadow:
        0 12px 48px rgba(59, 130, 246, 0.4),
        0 8px 24px rgba(29, 78, 216, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    border-color: rgba(59, 130, 246, 0.7);
}

.btn-secondary:hover {
    background:
        linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(139, 92, 246, 0.15) 100%);
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow:
        0 12px 48px rgba(59, 130, 246, 0.25),
        0 8px 24px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-color: rgba(59, 130, 246, 0.4);
}

.btn-primary:active,
.btn-secondary:active {
    transform: translateY(-1px);
    transition: all 0.1s ease;
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background:
        radial-gradient(circle at 30% 20%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        rgba(15, 17, 23, 0.85);
    backdrop-filter: blur(20px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background:
        linear-gradient(135deg, rgba(15, 17, 23, 0.95) 0%, rgba(22, 27, 45, 0.9) 100%);
    backdrop-filter: blur(30px) saturate(150%);
    border-radius: 20px;
    box-shadow:
        0 32px 80px rgba(0, 0, 0, 0.5),
        0 16px 40px rgba(59, 130, 246, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    max-width: 500px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
}

.modal-content.large {
    max-width: 900px;
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px 20px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 1.4em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5em;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    font-size: 0.95em;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    backdrop-filter: blur(10px);
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
    background: rgba(255, 255, 255, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* 动画效果 */
@keyframes popin {
    0% {
        transform: scale(0.8);
        opacity: 0.3;
    }

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

#ani {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 99;
}

/* 响应式设计 */
@media (max-width: 768px) {
    #app {
        max-width: 100%;
        width: 100%;
        margin: 0;
        border-radius: 0;
        height: 100vh;
    }

    .nav-sidebar {
        position: fixed;
        top: 0;
        left: -250px;
        height: 100vh;
        z-index: 1500;
        transition: left 0.3s ease;
    }

    .nav-sidebar.show {
        left: 0;
    }

    .main-content {
        width: 100%;
    }

    .page-header {
        padding: 16px;
    }

    .page-header h1 {
        font-size: 1.5em;
    }

    .status-indicators {
        flex-direction: column;
        gap: 12px;
    }

    .page-main {
        padding: 16px;
    }

    .page-footer {
        padding: 16px;
    }

    .control-group {
        flex-direction: column;
        align-items: stretch;
    }

    .control-label {
        min-width: auto;
        margin-bottom: 8px;
    }

    .control-input {
        min-width: auto;
        width: 100%;
    }

    .control-btn {
        width: 100%;
        margin-bottom: 8px;
    }

    .remote-grid {
        grid-template-columns: repeat(3, 100px);
        grid-template-rows: repeat(3, 100px);
        gap: 20px;
    }

    .remote-btn {
        width: 100px;
        height: 100px;
        font-size: 28px;
    }

    .documents-header {
        flex-direction: column;
        align-items: stretch;
    }

    .document-stats {
        justify-content: center;
    }

    .documents-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        width: 100%;
        right: -100%;
    }

    .modal-content {
        width: 95%;
        margin: 10px;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 12px;
    }

    .page-main {
        padding: 12px;
    }

    .control-btn {
        padding: 16px;
        font-size: 1.1em;
    }

    .remote-grid {
        grid-template-columns: repeat(3, 90px);
        grid-template-rows: repeat(3, 90px);
        gap: 15px;
    }

    .remote-btn {
        width: 90px;
        height: 90px;
        font-size: 26px;
    }
}

/* 地图全屏样式 */
.map-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    background: white;
    border-radius: 0 !important;
}

.map-fullscreen #amap-container {
    height: 100vh !important;
    width: 100% !important;
}

.map-fullscreen-active {
    overflow: hidden;
}

.map-fullscreen-active .nav-sidebar,
.map-fullscreen-active .main-content>*:not(.map-container) {
    display: none !important;
}

/* 地图控件开关样式 */
.map-controls {
    margin-top: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    backdrop-filter: blur(20px);
}

/* 用户管理界面样式 */
.user-management-container {
    padding: 20px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    margin: 20px;
}

.user-list {
    background:
        linear-gradient(135deg, rgba(15, 17, 23, 0.8) 0%, rgba(22, 27, 45, 0.6) 100%);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    overflow: hidden;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.user-list-header {
    padding: 20px;
    background: rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-list-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 1.3em;
    font-weight: 600;
}

.user-item {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    background: transparent;
}

.user-item:last-child {
    border-bottom: none;
}

.user-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.8) 0%, rgba(139, 92, 246, 0.6) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 600;
    font-size: 1.1em;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.user-details h4 {
    margin: 0 0 4px 0;
    color: #ffffff;
    font-size: 1em;
    font-weight: 600;
}

.user-details p {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85em;
}

.user-role {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-role.admin {
    background: rgba(239, 68, 68, 0.2);
    color: rgba(239, 68, 68, 0.9);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.user-role.user {
    background: rgba(59, 130, 246, 0.2);
    color: rgba(59, 130, 246, 0.9);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.user-actions {
    display: flex;
    gap: 8px;
}

.user-action-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    font-size: 0.8em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.user-action-btn.edit {
    background: rgba(139, 92, 246, 0.2);
    color: rgba(139, 92, 246, 0.9);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.user-action-btn.delete {
    background: rgba(239, 68, 68, 0.2);
    color: rgba(239, 68, 68, 0.9);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.user-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.user-action-btn.edit:hover {
    background: rgba(139, 92, 246, 0.3);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.user-action-btn.delete:hover {
    background: rgba(239, 68, 68, 0.3);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.add-user-btn {
    background:
        linear-gradient(135deg, rgba(59, 130, 246, 0.9) 0%, rgba(139, 92, 246, 0.8) 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 12px 20px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 4px 16px rgba(59, 130, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.add-user-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 24px rgba(59, 130, 246, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* 用户表单样式 */
.user-form {
    background:
        linear-gradient(135deg, rgba(15, 17, 23, 0.8) 0%, rgba(22, 27, 45, 0.6) 100%);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 24px;
    margin-top: 20px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.user-form h3 {
    margin: 0 0 20px 0;
    color: #ffffff;
    font-size: 1.2em;
    font-weight: 600;
}

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9em;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    background: rgba(22, 27, 45, 0.8);
    color: #ffffff;
    font-size: 0.9em;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    background: rgba(22, 27, 45, 0.9);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.form-btn {
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.form-btn.primary {
    background:
        linear-gradient(135deg, rgba(59, 130, 246, 0.9) 0%, rgba(139, 92, 246, 0.8) 100%);
    color: #ffffff;
    box-shadow:
        0 4px 16px rgba(59, 130, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.form-btn.secondary {
    background:
        linear-gradient(135deg, rgba(15, 17, 23, 0.8) 0%, rgba(22, 27, 45, 0.7) 100%);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.25);
    backdrop-filter: blur(10px);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.form-btn:hover {
    transform: translateY(-2px);
}

.form-btn.primary:hover {
    box-shadow:
        0 8px 24px rgba(59, 130, 246, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.form-btn.secondary:hover {
    background:
        linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(139, 92, 246, 0.15) 100%);
    color: #ffffff;
    box-shadow:
        0 8px 24px rgba(59, 130, 246, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.map-controls h4 {
    margin: 0 0 10px 0;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
}

.map-controls label {
    display: inline-block;
    margin-right: 15px;
    margin-bottom: 5px;
    cursor: pointer;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.map-controls input[type="checkbox"] {
    margin-right: 5px;
    transform: scale(1.1);
}

.map-controls label:hover {
    color: #ffffff;
}

/* 按钮测试页面样式 */
.button-test-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    height: calc(100vh - 200px);
}

.button-management {
    background: rgba(42, 45, 71, 0.7);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
}

.management-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.management-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 1.2em;
}

.button-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    min-height: 300px;
    max-height: 450px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    align-content: start;
}

.test-button-item {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px;
    cursor: move;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 120px;
}

.test-button-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.test-button-item.dragging {
    opacity: 0.7;
    transform: rotate(5deg);
}

.button-preview {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 6px;
    color: white;
    font-weight: bold;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.button-preview:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.button-info {
    color: #ccc;
    font-size: 0.9em;
}

.button-controls {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
    flex-shrink: 0;
}

/* 确保左右两个容器底部对齐 */
.button-management,
.message-log-container {
    height: 100%;
    box-sizing: border-box;
}

.message-log-container {
    background: rgba(42, 45, 71, 0.7);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
}

.log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.log-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 1.2em;
}

.log-stats {
    display: flex;
    gap: 15px;
    font-size: 0.9em;
    color: #ccc;
}

.bt-message-list {
    flex: 1;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    min-height: 500px;
    max-height: 600px;
}

.log-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
}

.control-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ccc;
}

/* 语音设置样式 */
.voice-note {
    color: #888;
    font-size: 0.85em;
    margin-top: 5px;
    display: block;
    font-style: italic;
}

/* 4G消息日志样式 */
.ai-4g-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.ai-4g-header label {
    margin: 0;
    font-weight: 500;
}

.ai-4g-messages {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    flex: 1;
    /* 自动填充剩余空间 */
    overflow-y: auto;
    /* 有内容时显示滚动条 */
    min-height: 150px;
    max-height: 250px;
    /* 降低最大高度，大约能显示5-6条消息 */
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.4;
    /* 自定义滚动条样式 */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) rgba(255, 255, 255, 0.1);
}

/* WebKit浏览器滚动条样式 */
.ai-4g-messages::-webkit-scrollbar {
    width: 8px;
}

.ai-4g-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.ai-4g-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.ai-4g-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.message-placeholder {
    text-align: center;
    color: #888;
    padding: 20px;
}

.message-placeholder p {
    margin: 0 0 8px 0;
    font-size: 14px;
}

.message-placeholder small {
    font-size: 12px;
    opacity: 0.7;
}

.ai-4g-message {
    margin: 8px 0;
    padding: 8px 12px;
    border-radius: 6px;
    border-left: 3px solid;
}

.ai-4g-message.sent {
    background: rgba(0, 123, 255, 0.1);
    border-left-color: #007bff;
}

.ai-4g-message.received {
    background: rgba(40, 167, 69, 0.1);
    border-left-color: #28a745;
}

.ai-4g-message-time {
    font-size: 11px;
    color: #888;
    margin-bottom: 4px;
}

.ai-4g-message-content {
    color: #fff;
    word-break: break-word;
}

/* 全屏编辑器样式 */
.fullscreen-editor {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fullscreen-editor.hidden {
    display: none;
}

.editor-container {
    width: 90%;
    max-width: 1200px;
    height: 90%;
    background: linear-gradient(135deg, #1a1f2e 0%, #2a2d47 50%, #1e2139 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.editor-header h2 {
    margin: 0;
    color: #ffffff;
    font-size: 1.4em;
}

.editor-stats {
    display: flex;
    gap: 20px;
    color: #ccc;
    font-size: 13px;
}

.close-editor-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
}

.close-editor-btn:hover {
    background: rgba(255, 59, 48, 0.8);
    border-color: #ff3b30;
}

.editor-content {
    flex: 1;
    padding: 20px 24px;
    display: flex;
}

.fullscreen-textarea {
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #ffffff;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    padding: 20px;
    resize: none;
    outline: none;
}

.fullscreen-textarea:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.editor-footer {
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.editor-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.editor-buttons {
    display: flex;
    gap: 12px;
}

.btn-md {
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.btn-primary.btn-md {
    background: #007bff;
    color: white;
}

.btn-primary.btn-md:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.btn-secondary.btn-md {
    background: rgba(255, 255, 255, 0.1);
    color: #ccc;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary.btn-md:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.btn-danger.btn-md {
    background: #dc3545;
    color: white;
}

.btn-danger.btn-md:hover {
    background: #c82333;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: #ccc;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 10px;
}

.btn-sm:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: translateY(-1px);
}

.control-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

/* 按钮配置弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: linear-gradient(135deg, rgba(42, 45, 71, 0.95), rgba(30, 33, 57, 0.95));
    margin: auto;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.7) translateY(-50px);
    }

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 1.3em;
}

.modal-body {
    padding: 20px;
}

.config-group {
    margin-bottom: 20px;
}

.config-group label {
    display: block;
    margin-bottom: 8px;
    color: #ffffff;
    font-weight: 500;
}

.config-input,
.config-select {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.config-input:focus,
.config-select:focus {
    outline: none;
    border-color: #007bff;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.config-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 按钮样式 */
.btn-primary,
.btn-secondary,
.btn-danger {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #545b62);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #545b62, #484e55);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333, #a71e2a);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transform: scale(1.1);
}

/* 拖拽排序效果增强 */
.button-list .test-button-item {
    position: relative;
    z-index: 1;
}

.button-list .test-button-item.dragging {
    opacity: 0.7;
    transform: rotate(5deg) scale(1.05);
    z-index: 10;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.button-list .test-button-item:not(.dragging):hover {
    transform: translateY(-2px);
}

/* 按钮预览点击效果 */
.button-preview:active {
    transform: scale(0.95);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 滚动条美化 */
.bt-message-list::-webkit-scrollbar,
.button-list::-webkit-scrollbar {
    width: 8px;
}

.bt-message-list::-webkit-scrollbar-track,
.button-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.bt-message-list::-webkit-scrollbar-thumb,
.button-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.bt-message-list::-webkit-scrollbar-thumb:hover,
.button-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* 空状态提示 */
.button-list:empty::before {
    content: '暂无按钮\A点击"添加按钮"创建第一个按钮';
    white-space: pre-line;
    display: block;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    padding: 40px;
    margin: 20px;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 8px;
}

.bt-message-list:empty::before {
    content: '消息日志为空\A这里会显示4G无线连接的消息记录';
    white-space: pre-line;
    display: block;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    padding: 40px;
}

/* 按钮数量指示器动画 */
#button-count {
    transition: all 0.3s ease;
}

#button-count::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #00d084;
    border-radius: 50%;
    margin-right: 6px;
    animation: pulse 2s infinite;
}

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

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

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

/* 状态指示器增强 */
.status-indicators .status-value {
    transition: all 0.3s ease;
    position: relative;
    padding-left: 15px;
}

.status-indicators .status-value::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .button-test-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .modal-content {
        width: 95%;
        margin: 10px;
    }

    .modal-footer {
        flex-direction: column;
        gap: 10px;
    }

    .modal-footer button {
        width: 100%;
    }

    .button-controls {
        flex-direction: column;
    }

    .log-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
}

/* 添加加载动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.test-button-item {
    animation: fadeInUp 0.3s ease;
}

/* 成功状态颜色 */
.status-value[style*="color: rgb(0, 255, 0)"],
.status-value[style*="color: #00ff00"] {
    color: #00d084 !important;
}

/* AI对话页面样式 */
.ai-chat-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 20px;
    height: calc(100vh - 200px);
    max-height: 800px;
}

.chat-area {
    display: flex;
    flex-direction: column;
    background: rgba(42, 45, 71, 0.7);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    transition: background 0.3s ease;
}

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

.welcome-message {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
    padding: 20px;
    background: rgba(0, 123, 255, 0.1);
    border: 1px solid rgba(0, 123, 255, 0.3);
    border-radius: 12px;
}

.ai-avatar {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 123, 255, 0.2);
    border-radius: 50%;
    flex-shrink: 0;
}

.user-avatar {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(40, 167, 69, 0.2);
    border-radius: 50%;
    flex-shrink: 0;
}

.message-content {
    flex: 1;
    color: #ffffff;
}

.message-content h3 {
    margin: 0 0 10px 0;
    color: #007bff;
}

.message-content ul {
    margin: 10px 0;
    padding-left: 20px;
}

.message-content ul li {
    margin: 5px 0;
}

.message-bubble {
    display: flex;
    margin-bottom: 15px;
    animation: fadeInUp 0.3s ease;
}

.message-bubble.user {
    justify-content: flex-end;
}

.message-bubble.user .message-content {
    background: rgba(40, 167, 69, 0.2);
    border: 1px solid rgba(40, 167, 69, 0.3);
    margin-left: 60px;
}

.message-bubble.assistant .message-content {
    background: rgba(0, 123, 255, 0.1);
    border: 1px solid rgba(0, 123, 255, 0.2);
    margin-right: 60px;
}

.message-bubble .message-content {
    padding: 15px;
    border-radius: 12px;
    max-width: 80%;
    word-wrap: break-word;
}

.message-time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 8px;
    text-align: right;
}

.message-wrapper {
    flex: 1;
    min-width: 0;
}

.model-indicator {
    font-size: 12px;
    color: #007bff;
    font-weight: 500;
    margin-bottom: 8px;
    padding: 4px 8px;
    background: rgba(0, 123, 255, 0.1);
    border-radius: 12px;
    display: inline-block;
}

.message-attachments {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-attachment {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 13px;
}

.file-icon {
    font-size: 16px;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
    margin-top: 2px;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(0, 123, 255, 0.1);
    border: 1px solid rgba(0, 123, 255, 0.2);
    border-radius: 12px;
    margin-bottom: 15px;
}

.typing-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.typing-message {
    font-size: 13px;
    color: #007bff;
    font-weight: 500;
}

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

.typing-dot {
    width: 8px;
    height: 8px;
    background: #007bff;
    border-radius: 50%;
    animation: typingPulse 1.4s infinite ease-in-out both;
}

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

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

@keyframes typingPulse {

    0%,
    80%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

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

/* 临时消息样式 */
.temp-message {
    padding: 10px 15px;
    margin: 5px 0;
    border-radius: 8px;
    font-size: 14px;
    animation: fadeInOut 3s ease-in-out;
}

.temp-message-info {
    background: rgba(0, 123, 255, 0.1);
    border: 1px solid rgba(0, 123, 255, 0.3);
    color: #007bff;
}

.temp-message-success {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: #28a745;
}

.temp-message-error {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #dc3545;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }

    10% {
        opacity: 1;
        transform: translateY(0);
    }

    90% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* AI设置中的提示词编辑样式 */
.system-prompt-group {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    flex: 1;
    /* 让这个组也能扩展 */
}

.system-prompt-group .prompt-textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #ffffff;
    padding: 12px;
    font-size: 13px;
    line-height: 1.4;
    resize: vertical;
    min-height: 120px;
    max-height: 250px;
    font-family: 'Consolas', 'Monaco', monospace;
    transition: border-color 0.2s ease;
    margin-top: 8px;
}

.system-prompt-group .prompt-textarea:focus {
    outline: none;
    border-color: #00d084;
    box-shadow: 0 0 0 2px rgba(0, 208, 132, 0.2);
}

.system-prompt-group .prompt-textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.prompt-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.prompt-stats {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

.prompt-buttons {
    display: flex;
    gap: 6px;
}

.btn-xs {
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.btn-secondary.btn-xs {
    background: rgba(108, 117, 125, 0.2);
    color: #ffffff;
    border: 1px solid rgba(108, 117, 125, 0.3);
}

.btn-secondary.btn-xs:hover {
    background: rgba(108, 117, 125, 0.3);
    border-color: rgba(108, 117, 125, 0.5);
}

.btn-primary.btn-xs {
    background: linear-gradient(45deg, #00d084, #00a067);
    color: #ffffff;
    border: 1px solid rgba(0, 208, 132, 0.3);
}

.btn-primary.btn-xs:hover {
    background: linear-gradient(45deg, #00a067, #008254);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 208, 132, 0.3);
}

.chat-input-area {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.1);
}

.input-controls {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
    align-items: center;
}

.control-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    color: #ffffff;
    font-size: 14px;
}

.control-toggle input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 50px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.control-toggle input[type="checkbox"]:checked+.toggle-slider {
    background: #007bff;
}

.control-toggle input[type="checkbox"]:checked+.toggle-slider::before {
    transform: translateX(26px);
}

.message-input-container {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    position: relative;
}

.message-input {
    flex: 1;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.5;
    resize: vertical;
    min-height: 120px;
    max-height: 200px;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.message-input {
    flex: 1;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.5;
    resize: vertical;
    min-height: 100px;
    max-height: 200px;
    transition: all 0.3s ease;
}

.message-input:focus {
    outline: none;
    border-color: #007bff;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.message-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.input-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    min-width: 60px;
}

.input-buttons button {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.file-preview-area {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* 确保隐藏时不占用空间 */
.file-preview-area[style*="display: none"] {
    margin-bottom: 0;
    padding: 0;
    border: none;
}

.file-preview-item {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 200px;
}

.file-preview-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.file-preview-info {
    flex: 1;
    min-width: 0;
}

.file-preview-name {
    color: #ffffff;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-preview-size {
    color: rgba(255, 255, 255, 0.6);
    font-size: 10px;
}

.file-preview-remove {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 16px;
    height: 16px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.file-preview-remove:hover {
    background: #c82333;
    transform: scale(1.1);
}

.file-preview-image {
    max-width: 100px;
    max-height: 100px;
    border-radius: 4px;
    object-fit: cover;
}

/* 多模态消息样式 */
.message-attachments {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.message-attachment {
    max-width: 200px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    overflow: hidden;
}

.message-attachment img {
    max-width: 100%;
    height: auto;
    display: block;
}

.message-attachment audio,
.message-attachment video {
    max-width: 100%;
}

.attachment-info {
    padding: 8px;
    background: rgba(0, 0, 0, 0.2);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

.chat-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-section {
    background: rgba(42, 45, 71, 0.7);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 只有包含AI设置的section使用flex布局 */
.sidebar-section:last-child {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.sidebar-section h3 {
    margin: 0 0 15px 0;
    color: #ffffff;
    font-size: 1.1em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding: 5px 0;
    transition: all 0.3s ease;
}

.collapsible-header:hover {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 5px 10px;
}

.collapsible-header h3 {
    margin: 0;
    border: none;
    padding: 0;
}

.toggle-icon {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    transition: transform 0.3s ease;
}

.collapsible-header.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.collapsible-content {
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

/* 只有AI设置的内容区域才使用flex布局 */
#ai-settings-content {
    display: flex;
    flex-direction: column;
    max-height: none;
    overflow: visible;
    flex: 1;
}

.collapsible-content.collapsed {
    max-height: 0;
}

.api-key-info {
    margin-top: 20px;
    padding: 15px;
    background: rgba(0, 123, 255, 0.1);
    border: 1px solid rgba(0, 123, 255, 0.2);
    border-radius: 8px;
}

.api-key-info h4 {
    margin: 0 0 10px 0;
    color: #007bff;
    font-size: 1em;
}

.api-key-info p {
    margin: 8px 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.4;
}

.config-path {
    display: block;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    color: #00d084;
    word-break: break-all;
    margin: 8px 0;
}

.chat-history {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.history-item {
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(2px);
}

.history-item.active {
    background: rgba(0, 123, 255, 0.2);
    border-color: rgba(0, 123, 255, 0.4);
}

.history-title {
    color: #ffffff;
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-time {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
}

.btn-full-width {
    width: 100%;
}

.api-config .config-group {
    margin-bottom: 15px;
}

.api-config .config-group:last-of-type {
    margin-bottom: 20px;
}

.range-input {
    width: calc(100% - 40px);
    margin-right: 10px;
}

.range-value {
    color: #007bff;
    font-weight: bold;
    font-size: 14px;
    min-width: 30px;
    display: inline-block;
}

.error-message {
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid rgba(220, 53, 69, 0.4);
    color: #ff6b6b;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
}

.success-message {
    background: rgba(40, 167, 69, 0.2);
    border: 1px solid rgba(40, 167, 69, 0.4);
    color: #28a745;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
}

/* 代码块样式 */
.message-content pre {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 12px;
    overflow-x: auto;
    margin: 10px 0;
}

.message-content code {
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', monospace;
}

/* 语音输入模式样式 */
/* 普通输入模式 */
.normal-input-mode {
    display: block;
    width: 100%;
    flex: 1;
}

/* 语音输入模式 */
.voice-input-mode {
    display: none;
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    background: rgba(15, 17, 23, 0.9);
    border-radius: 12px;
    padding: 15px;
    border: 2px solid rgba(59, 130, 246, 0.3);
    backdrop-filter: blur(20px);
    box-shadow:
        0 4px 16px rgba(59, 130, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    z-index: 10;
    overflow: hidden;
}

/* 当语音模式激活时 */
.voice-input-mode[style*="display: block"] {
    display: block !important;
}

.voice-input-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    height: 100%;
    text-align: center;
}

.voice-status-text {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    font-weight: 500;
    min-height: 25px;
}

.voice-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.voice-record-btn {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.8) 0%, rgba(139, 92, 246, 0.6) 100%);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 4px 16px rgba(59, 130, 246, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 2px 0 rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.voice-record-btn:hover {
    transform: scale(1.05);
    box-shadow:
        0 12px 48px rgba(59, 130, 246, 0.5),
        0 6px 24px rgba(0, 0, 0, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.25);
}

.voice-record-btn:active {
    transform: scale(0.95);
}

.voice-record-btn.recording {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.8) 0%, rgba(220, 38, 38, 0.6) 100%);
    animation: recordingPulse 1.5s infinite;
    box-shadow:
        0 8px 32px rgba(239, 68, 68, 0.4),
        0 4px 16px rgba(0, 0, 0, 0.2),
        inset 0 2px 0 rgba(255, 255, 255, 0.2);
}

@keyframes recordingPulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow:
            0 8px 32px rgba(239, 68, 68, 0.4),
            0 0 0 0 rgba(239, 68, 68, 0.7);
    }

    50% {
        transform: scale(1.05);
        box-shadow:
            0 12px 48px rgba(239, 68, 68, 0.5),
            0 0 0 20px rgba(239, 68, 68, 0);
    }
}

.voice-icon {
    font-size: 48px;
    z-index: 2;
    position: relative;
}

.voice-mic {
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.voice-waves {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.wave {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
}

.voice-record-btn.recording .wave {
    animation: waveAnimation 2s infinite;
}

.wave1 {
    animation-delay: 0s;
}

.wave2 {
    animation-delay: 0.5s;
}

.wave3 {
    animation-delay: 1s;
}

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

    100% {
        transform: translate(-50%, -50%) scale(1.8);
        opacity: 0;
    }
}

.voice-buttons {
    display: flex;
    gap: 15px;
}

.voice-result {
    width: 100%;
    max-width: 500px;
}

.voice-result-textarea {
    width: 100%;
    min-height: 120px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 15px;
    color: #ffffff;
    font-size: 16px;
    line-height: 1.5;
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
}

.voice-result-textarea:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.voice-result-textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* 语音输入按钮样式 */
#voice-input-btn {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.8) 0%, rgba(22, 163, 74, 0.6) 100%);
    color: #ffffff;
    border: 1px solid rgba(34, 197, 94, 0.4);
    transition: all 0.3s ease;
}

#voice-input-btn:hover {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.9) 0%, rgba(22, 163, 74, 0.7) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.3);
}

#voice-input-btn.active {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.8) 0%, rgba(220, 38, 38, 0.6) 100%);
    border-color: rgba(239, 68, 68, 0.4);
}

#voice-input-btn.active:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.9) 0%, rgba(220, 38, 38, 0.7) 100%);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3);
}

/* 语音状态指示 */
.voice-connecting {
    color: #fbbf24 !important;
}

.voice-connected {
    color: #10b981 !important;
}

.voice-recording {
    color: #ef4444 !important;
    animation: textPulse 1s infinite;
}

.voice-processing {
    color: #3b82f6 !important;
}

.voice-error {
    color: #ef4444 !important;
}

@keyframes textPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .ai-chat-container {
        grid-template-columns: 1fr 280px;
    }
}

@media (max-width: 768px) {
    .ai-chat-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .chat-sidebar {
        order: -1;
    }

    .input-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .message-input-container {
        flex-direction: column;
    }

    .input-buttons {
        flex-direction: row;
        align-self: stretch;
    }

    .input-buttons button {
        width: auto;
        flex: 1;
    }
}

/* 语音设置样式 */
.voice-setting-group {
    margin-bottom: 12px;
}

.voice-setting-label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    margin-bottom: 5px;
    font-weight: 500;
}

#voice-settings-header {
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 10px;
}

#voice-settings-header:hover {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    padding: 8px 10px;
    margin: 0 -10px 10px -10px;
}

#voice-settings-header .toggle-icon {
    transition: transform 0.3s ease;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

#voice-settings-header.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

#voice-settings-content {
    overflow: hidden;
    transition: all 0.3s ease;
    padding-top: 10px;
}

#voice-settings-content.collapsed {
    max-height: 0;
    padding-top: 0;
    opacity: 0;
}

/* SD预配置页面样式 */
.sd-preconfig-main {
    display: flex;
    flex-direction: row;
    height: calc(100vh - 180px);
    position: relative;
}

/* 左侧导航目录 */
.sd-nav-sidebar {
    width: 220px;
    background: linear-gradient(180deg, rgba(15, 17, 23, 0.95) 0%, rgba(22, 27, 45, 0.9) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    border-right: 1px solid rgba(59, 130, 246, 0.15);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.05);
    overflow-y: auto;
    flex-shrink: 0;
}

.sd-nav-header {
    padding: 20px 15px 15px 15px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

.sd-nav-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    text-align: center;
}

.sd-nav-content {
    padding: 10px 8px;
}

.sd-nav-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin: 5px 0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.sd-nav-item:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sd-nav-item:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateX(3px);
}

.sd-nav-item:hover:before {
    opacity: 1;
}

.sd-nav-item.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(139, 92, 246, 0.15) 100%);
    border-color: rgba(59, 130, 246, 0.4);
    color: #ffffff;
    transform: translateX(5px);
}

.sd-nav-item.active:before {
    opacity: 1;
}

.sd-nav-item span:first-child {
    font-size: 18px;
    margin-right: 12px;
    width: 24px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.sd-nav-item span:last-child {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    position: relative;
    z-index: 1;
}

/* 右侧内容区域 */
.sd-content-area {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    margin-bottom: 80px;
    /* 为底部按钮留出空间 */
}

.sd-tab-content {
    display: none;
    animation: fadeInSlide 0.3s ease-out;
}

.sd-tab-content.active {
    display: block;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.sd-tab-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(59, 130, 246, 0.2);
}

.sd-tab-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* SD通用组件样式 */
.sd-card-status-section,
.sd-info-section,
.guide-section,
.import-methods-section,
.warning-section,
.models-list-section,
.audio-model-section,
.audio-config-section,
.cloud-enable-section,
.cloud-config-area,
.generate-section {
    background: linear-gradient(135deg, rgba(15, 17, 23, 0.6) 0%, rgba(26, 31, 46, 0.4) 100%);
    backdrop-filter: blur(15px) saturate(150%);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.sd-card-status-section h3,
.sd-info-section h3,
.guide-section h3,
.import-methods-section h3,
.warning-section h3,
.models-list-section h3,
.audio-model-section h3,
.cloud-enable-section h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
}

.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.status-group {
    margin-bottom: 20px;
}

.status-info {
    background: rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    padding: 15px;
    margin: 10px 0;
}

.status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0;
}

.status-label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

.status-value {
    color: #3b82f6;
    font-weight: 500;
}

.info-display textarea {
    width: 100%;
    height: 120px;
    background: rgba(15, 17, 23, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    padding: 12px;
    color: #ffffff;
    font-family: 'Consolas', monospace;
    font-size: 12px;
    resize: vertical;
}

#sd-info-text {
    width: 100%;
    height: 120px;
    background: rgba(15, 17, 23, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    padding: 12px;
    color: #ffffff;
    font-family: 'Consolas', monospace;
    font-size: 12px;
    resize: vertical;
}

/* 表单控件样式 */
.param-group {
    margin-bottom: 20px;
}

.param-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.slider-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.slider-group input[type="range"] {
    flex: 1;
    height: 6px;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.slider-group span {
    min-width: 60px;
    text-align: center;
    background: rgba(59, 130, 246, 0.2);
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 500;
    color: #ffffff;
    font-size: 13px;
}

/* 配置布局 */
.config-layout {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.config-left {
    flex: 1;
    min-width: 400px;
}

.config-right {
    flex: 1;
    min-width: 300px;
}

#config-preview {
    width: 100%;
    height: 400px;
    background: rgba(15, 17, 23, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    padding: 15px;
    color: #ffffff;
    font-family: 'Consolas', monospace;
    font-size: 12px;
    resize: vertical;
}

/* 输入框样式 */
.sd-content-area input[type="text"],
.sd-content-area input[type="password"],
.sd-content-area input[type="number"],
.sd-content-area select {
    width: 100%;
    padding: 12px 15px;
    background: rgba(15, 17, 23, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.sd-content-area input[type="text"]:focus,
.sd-content-area input[type="password"]:focus,
.sd-content-area input[type="number"]:focus,
.sd-content-area select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 开关样式 */
.switch-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 15px 0;
}

.switch-container input[type="checkbox"] {
    position: relative;
    width: 50px;
    height: 26px;
    -webkit-appearance: none;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 13px;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.switch-container input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
}

.switch-container input[type="checkbox"]:before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 22px;
    height: 22px;
    background: #ffffff;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.switch-container input[type="checkbox"]:checked:before {
    transform: translateX(24px);
}

.switch-label {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

/* 文件选择行 */
.file-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 10px 0;
}

.file-row label {
    min-width: 100px;
    margin: 0;
}

.file-row input {
    flex: 1;
}

/* 分隔线 */
.separator {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(59, 130, 246, 0.3) 50%, transparent 100%);
    margin: 20px 0;
}

/* 列表样式 */
.models-list,
.categories-list {
    margin: 15px 0;
}

#models-listbox {
    width: 100%;
    background: rgba(15, 17, 23, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    padding: 8px;
}

#models-listbox option {
    padding: 8px;
    background: rgba(15, 17, 23, 0.9);
    color: #ffffff;
}

#models-listbox option:hover {
    background: rgba(59, 130, 246, 0.2);
}

.model-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

/* 音频配置相关 */
.model-select-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 15px 0;
}

.model-info {
    color: #3b82f6;
    font-style: italic;
    margin: 10px 0;
}

.audio-instruction {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    color: rgba(255, 255, 255, 0.9);
}

.empty-hint {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
    padding: 40px 20px;
}

/* 警告区域 */
.warning-section {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(245, 101, 101, 0.05) 100%);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.warning-section h3 {
    color: #f59e0b;
    margin-bottom: 15px;
}

.warning-section ul {
    margin: 0;
    padding-left: 20px;
    color: rgba(255, 255, 255, 0.9);
}

.warning-section li {
    margin: 8px 0;
    line-height: 1.5;
}

/* 导入方法样式 */
.import-method {
    margin: 20px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.import-method h4 {
    margin: 0 0 10px 0;
    color: #3b82f6;
    font-size: 16px;
}

.import-method p {
    margin: 0 0 15px 0;
    color: rgba(255, 255, 255, 0.7);
}

.file-selection {
    margin: 15px 0;
}

/* WiFi配置 */
.wifi-config {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

/* 生成配置包页面 */
.generate-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    text-align: center;
}

.generate-center h3 {
    font-size: 22px;
    margin-bottom: 30px;
    color: #10b981;
}

.check-list {
    background: rgba(15, 17, 23, 0.6);
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.check-list h4 {
    margin: 0 0 20px 0;
    color: #ffffff;
    font-size: 18px;
}

.check-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    text-align: left;
}

.check-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* 底部生成按钮 */
.generate-button-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.generate-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 8px 32px rgba(16, 185, 129, 0.3),
        0 4px 16px rgba(0, 0, 0, 0.2);
    min-width: 200px;
}

.generate-btn:hover {
    transform: translateY(-3px);
    box-shadow:
        0 12px 40px rgba(16, 185, 129, 0.4),
        0 6px 20px rgba(0, 0, 0, 0.3);
}

.generate-btn:active {
    transform: translateY(-1px);
}

/* 指南内容样式 */
.guide-content {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

.guide-step h4 {
    color: #3b82f6;
    margin: 0 0 15px 0;
}

.guide-step ol {
    margin: 0;
    padding-left: 20px;
}

.guide-step li {
    margin: 10px 0;
    line-height: 1.5;
}

.guide-step strong {
    color: #ffffff;
}

/* 说明文字样式 */
.info-text {
    background: rgba(59, 130, 246, 0.1);
    border-radius: 8px;
    padding: 10px;
    margin: 10px 0;
}

.info-text small {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
}

.note {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-style: italic;
    margin: 8px 0;
}

/* 音频类别配置项样式 */
.category-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    padding: 15px;
    margin: 10px 0;
}

.category-header h4 {
    margin: 0 0 10px 0;
    color: #3b82f6;
    font-size: 16px;
    font-weight: 600;
}

.audio-file-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.audio-file-row label {
    min-width: 80px;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
}

.audio-file-row input {
    flex: 1;
    min-width: 200px;
}

.audio-file-row button {
    padding: 8px 15px;
    font-size: 13px;
}

/* 配置区域 */
.config-section {
    background: linear-gradient(135deg, rgba(15, 17, 23, 0.6) 0%, rgba(26, 31, 46, 0.4) 100%);
    backdrop-filter: blur(15px) saturate(150%);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.config-section h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sd-preconfig-main {
        flex-direction: column;
        height: auto;
    }

    .sd-nav-sidebar {
        width: 100%;
        order: 2;
        border-right: none;
        border-top: 1px solid rgba(59, 130, 246, 0.15);
    }

    .sd-content-area {
        order: 1;
        margin-bottom: 20px;
    }

    .config-layout {
        flex-direction: column;
    }

    .config-left,
    .config-right {
        min-width: auto;
    }

    .generate-button-container {
        position: static;
        margin: 20px;
        text-align: center;
    }

    .audio-file-row {
        flex-direction: column;
        align-items: stretch;
    }

    .audio-file-row input {
        min-width: auto;
    }
}

/* 侧边栏消息过滤样式 */
.filter-input-group {
    margin-top: 10px;
    margin-bottom: 10px;
}

.filter-input-group .filter-label {
    display: block;
    font-size: 13px;
    color: #e2e8f0;
    margin-bottom: 5px;
}

.filter-input-group .filter-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 4px;
    padding: 8px;
    color: #ffffff;
    font-size: 13px;
}

.filter-input-group .filter-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.setting-button {
    width: 100%;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    color: #ffffff;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 10px;
}

.setting-button:hover {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 38, 38, 0.3);
}

.setting-button:active {
    transform: translateY(0);
}

/* 消息项过滤隐藏样式 */
.msg.filtered {
    display: none !important;
}

/* 过滤信息管理样式 */
.filter-management {
    margin-top: 15px;
    border-top: 1px solid rgba(59, 130, 246, 0.2);
    padding-top: 15px;
}

.setting-button-small {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    color: #ffffff;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 8px;
    vertical-align: top;
}

.setting-button-small:hover {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.filter-list {
    margin: 10px 0;
    max-height: 150px;
    overflow-y: auto;
}

.filter-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 4px;
    padding: 6px 10px;
    margin: 4px 0;
    font-size: 12px;
    color: #e2e8f0;
}

.filter-item-text {
    flex: 1;
    margin-right: 10px;
    word-break: break-all;
}

.filter-item-remove {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    border: none;
    border-radius: 3px;
    padding: 2px 6px;
    color: #ffffff;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-item-remove:hover {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    transform: scale(1.1);
}

.filter-actions {
    display: flex;
    gap: 5px;
    margin-top: 10px;
}

.filter-actions .setting-button {
    flex: 1;
}

/* 同步进度条浮层样式 */
.sync-progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease-in-out;
}

.sync-progress-overlay.hidden {
    display: none;
}

.sync-progress-container {
    background: linear-gradient(135deg, #1e2139 0%, #2a2d47 50%, #1a1f2e 100%);
    border: 2px solid rgba(120, 119, 198, 0.3);
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 100px rgba(120, 119, 198, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: syncSlideIn 0.4s ease-out;
}

@keyframes syncSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }

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

.sync-progress-header {
    text-align: center;
    margin-bottom: 30px;
}

.sync-progress-header h2 {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 600;
    background: linear-gradient(135deg, #7877c6, #ff77c6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sync-progress-header p {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
}

.sync-progress-main {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sync-percentage {
    text-align: center;
}

.sync-percentage span {
    font-size: 48px;
    font-weight: 700;
    background: linear-gradient(135deg, #00ff88, #00ccff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(0, 255, 136, 0.3);
}

.sync-progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.sync-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff88, #00ccff, #7877c6);
    background-size: 200% 100%;
    border-radius: 6px;
    transition: width 0.5s ease-out;
    animation: syncProgressShimmer 2s infinite;
    box-shadow:
        0 0 20px rgba(0, 255, 136, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

@keyframes syncProgressShimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.sync-current-info {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(120, 119, 198, 0.2);
}

.sync-current-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.sync-status-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.sync-current-status span:last-child {
    color: #00ff88;
    font-weight: 600;
    font-size: 16px;
}

.sync-current-detail {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    padding-left: 20px;
    position: relative;
}

.sync-current-detail::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #7877c6;
    font-weight: bold;
}

.sync-steps {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 10px;
}

.sync-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
}

.sync-step::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 60%;
    width: 80%;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    z-index: -1;
}

.sync-step:last-child::after {
    display: none;
}

.sync-step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(120, 119, 198, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
}

.sync-step.active .sync-step-icon {
    background: linear-gradient(135deg, #00ff88, #00ccff);
    border-color: #00ff88;
    color: #000;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
    animation: syncStepPulse 2s infinite;
}

.sync-step.completed .sync-step-icon {
    background: linear-gradient(135deg, #7877c6, #ff77c6);
    border-color: #7877c6;
    color: #fff;
    box-shadow: 0 0 15px rgba(120, 119, 198, 0.4);
}

@keyframes syncStepPulse {

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

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

.sync-step-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    font-weight: 500;
}

.sync-step.active .sync-step-label {
    color: #00ff88;
    font-weight: 600;
}

.sync-step.completed .sync-step-label {
    color: #7877c6;
    font-weight: 600;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sync-progress-container {
        padding: 30px 20px;
        margin: 20px;
    }

    .sync-progress-header h2 {
        font-size: 24px;
    }

    .sync-percentage span {
        font-size: 36px;
    }

    .sync-steps {
        gap: 10px;
    }

    .sync-step-icon {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .sync-step-label {
        font-size: 11px;
    }
}

/* 配置确认弹窗样式 */
.config-confirm-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
}

.config-confirm-overlay {
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
}

.config-confirm-modal {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 15px;
    border: 2px solid #00ff88;
    box-shadow: 0 20px 60px rgba(0, 255, 136, 0.3);
    max-width: 80%;
    max-height: 80%;
    width: 600px;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-50px);
    }

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

.config-confirm-header {
    background: linear-gradient(90deg, #00ff88, #00ccff);
    color: #000;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.config-confirm-header h3 {
    margin: 0;
    font-size: 1.2em;
    font-weight: bold;
}

.config-confirm-close {
    background: none;
    border: none;
    color: #000;
    font-size: 1.5em;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.config-confirm-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

.config-confirm-body {
    padding: 20px;
    color: #fff;
    max-height: 400px;
    overflow-y: auto;
}

.config-confirm-body p {
    margin: 0 0 20px 0;
    font-size: 1.1em;
}

.config-changes-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.config-change-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 10px;
    padding: 15px;
    transition: border-color 0.2s;
}

.config-change-item:hover {
    border-color: rgba(0, 255, 136, 0.6);
}

.change-category {
    color: #00ff88;
    font-size: 0.9em;
    font-weight: bold;
    margin-bottom: 5px;
}

.change-name {
    font-size: 1.1em;
    font-weight: bold;
    color: #fff;
    margin-bottom: 8px;
}

.change-values {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-family: "Courier New", monospace;
}

.old-value {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    padding: 4px 8px;
    border-radius: 5px;
}

.arrow {
    color: #00ccff;
    font-weight: bold;
}

.new-value {
    color: #00ff88;
    background: rgba(0, 255, 136, 0.1);
    padding: 4px 8px;
    border-radius: 5px;
}

.change-command {
    font-family: "Courier New", monospace;
    color: #ffeb3b;
    background: rgba(255, 235, 59, 0.1);
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 0.9em;
    margin-bottom: 5px;
    display: inline-block;
}

.change-description {
    color: #ccc;
    font-size: 0.9em;
    font-style: italic;
}

.config-confirm-footer {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.config-confirm-footer button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: bold;
}

.config-confirm-footer .btn-secondary {
    background: rgba(108, 117, 125, 0.8);
    color: white;
}

.config-confirm-footer .btn-secondary:hover {
    background: rgba(108, 117, 125, 1);
}

.config-confirm-footer .btn-success {
    background: linear-gradient(90deg, #00ff88, #00ccff);
    color: #000;
}

.config-confirm-footer .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 255, 136, 0.3);
}

/* 确认配置按钮居中样式 */
.confirm-actions-center {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
}

.confirm-actions-center .btn-large {
    font-size: 1.2em;
    padding: 15px 40px;
    min-width: 200px;
}

/* 侧边栏语音
播报主开关样式 */
.voice-main-toggle {
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 16px;
}

.voice-main-toggle .control-label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95em;
}

.voice-main-toggle .toggle-slider {
    width: 44px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.voice-main-toggle .toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.voice-main-toggle input[type="checkbox"]:checked+.toggle-slider {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.8) 0%, rgba(139, 92, 246, 0.7) 100%);
}

.voice-main-toggle input[type="checkbox"]:checked+.toggle-slider::before {
    transform: translateX(20px);
}

.voice-main-toggle input[type="checkbox"] {
    display: none;
}

/* 用户信息和退出登录样式 */
.nav-user-info {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
}

.user-welcome {
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    font-weight: 500;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    padding: 5px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateY(-1px);
}

/* ICP备案信息样式 */
.icp-footer {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    text-align: center;
}

.icp-footer a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 11px;
    padding: 3px 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.icp-footer a:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(0, 0, 0, 0.5);
    text-decoration: underline;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .icp-footer {
        bottom: 5px;
    }

    .icp-footer a {
        font-size: 10px;
        padding: 2px 6px;
    }
}

/* ==================== 环境监测样式 ==================== */

/* 环境监测主容器 */
.env-monitor-main {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 30px;
}

/* 环境卡片容器 */
.env-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    width: 100%;
}

/* 环境监测卡片 */
.env-card {
    background: linear-gradient(135deg, rgba(30, 35, 50, 0.8) 0%, rgba(40, 45, 65, 0.6) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 20px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.env-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.env-card:hover::before {
    opacity: 1;
}

.env-card:hover {
    transform: translateY(-5px);
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.25);
}

/* 卡片头部 */
.env-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.env-card-header h3 {
    font-size: 24px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

/* 卡片主体 */
.env-card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

/* 环境图标 */
.env-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 温度图标动画 */
.temp-icon svg {
    animation: tempPulse 2s ease-in-out infinite;
}

@keyframes tempPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* 湿度图标动画 */
.humi-icon svg {
    animation: humiDrop 3s ease-in-out infinite;
}

@keyframes humiDrop {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* 气压图标动画 */
.pres-icon svg {
    animation: presRotate 8s linear infinite;
}

@keyframes presRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 数值显示区域 */
.env-value-display {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

/* 环境数值 */
.env-value {
    font-size: 48px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    font-family: 'Courier New', monospace;
    line-height: 1;
}

/* 环境单位 */
.env-unit {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

/* 环境状态文本 */
.env-status-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    padding: 8px 16px;
    background: rgba(30, 35, 50, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* 控制面板 */
.env-control-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.control-section {
    background: linear-gradient(135deg, rgba(30, 35, 50, 0.6) 0%, rgba(40, 45, 65, 0.4) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 16px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.control-section h3 {
    margin: 0;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

/* 查询状态 */
.query-status {
    text-align: center;
    padding: 12px;
    background: rgba(30, 35, 50, 0.5);
    border-radius: 10px;
    border: 1px solid rgba(59, 130, 246, 0.15);
}

.query-status span {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

/* 数据日志 */
.env-data-log {
    background: rgba(15, 17, 23, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 12px;
    padding: 15px;
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
}

.log-placeholder {
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    padding: 20px;
    font-style: italic;
}

.log-entry {
    background: rgba(30, 35, 50, 0.4);
    border-left: 3px solid rgba(59, 130, 246, 0.5);
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

.log-entry .log-time {
    color: rgba(59, 130, 246, 0.8);
    font-weight: 500;
    margin-right: 10px;
}

/* 按钮大尺寸样式 */
.btn-large {
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
}

/* 数值更新动画 */
.env-value.updating {
    animation: valueUpdate 0.5s ease;
}

@keyframes valueUpdate {
    0% {
        transform: scale(1);
        color: #ffffff;
    }
    50% {
        transform: scale(1.1);
        color: #4ecdc4;
    }
    100% {
        transform: scale(1);
        color: #ffffff;
    }
}

/* 数据状态颜色 */
.env-item.temp-high .env-value {
    color: #ff6b6b;
}

.env-item.temp-low .env-value {
    color: #4ecdc4;
}

.env-item.humi-high .env-value {
    color: #4ecdc4;
}

.env-item.humi-low .env-value {
    color: #ffa500;
}

.env-item.pres-high .env-value {
    color: #95a5a6;
}

.env-item.pres-low .env-value {
    color: #bdc3c7;
}
/* ========================================
   用户事件列表页面样式
   ======================================== */

/* 事件配置弹窗样式 */
.event-config-modal {
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.time-trigger-section {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.time-trigger-section h4 {
    margin: 0 0 15px 0;
    color: white;
    font-size: 18px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.time-trigger-section .config-group label {
    color: white;
    font-weight: 500;
}

.time-trigger-section small {
    color: rgba(255, 255, 255, 0.9) !important;
}

.time-trigger-section .weekday-item {
    color: #495057 !important;
}

.time-trigger-section .weekday-item:has(input:checked) {
    color: #495057 !important;
}

/* 星期选择器样式 */
.weekday-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.weekday-item {
    flex: 0 0 calc(25% - 8px);
    display: flex;
    align-items: center;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    color: #495057;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.weekday-item:hover {
    border-color: rgba(255, 255, 255, 1);
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.weekday-item input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.weekday-item input[type="checkbox"]:checked + label,
.weekday-item:has(input:checked) {
    border-color: #ffd700;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #495057;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

/* 计划表弹窗样式 */
.schedule-modal-content {
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
}

.schedule-date-selector {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.schedule-date-selector input[type="date"] {
    flex: 0 0 220px;
    padding: 10px 15px;
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    border: 2px solid white;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.schedule-date-selector input[type="date"]:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

.schedule-date-selector button {
    color: white;
    border: 2px solid white;
    background: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.schedule-date-selector button:hover {
    background: white;
    color: #667eea;
}

/* 时间线样式 - 完全参考4G消息日志风格 */
.schedule-timeline {
    position: relative;
    padding: 16px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    min-height: 600px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.timeline-hour {
    position: relative;
    min-height: auto;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 0 12px 80px;
    transition: background 0.2s;
    background: transparent;
}

.timeline-hour:hover {
    background: rgba(255, 255, 255, 0.05);
}

.timeline-hour:last-child {
    border-bottom: none;
}

.timeline-hour-label {
    position: absolute;
    left: 10px;
    top: 12px;
    width: 60px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 4px 0;
}

.timeline-events {
    position: relative;
    height: 100%;
    padding: 5px 0;
}

.timeline-event-item {
    position: relative;
    padding: 8px 12px;
    margin: 4px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.timeline-event-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.timeline-event-item.disabled {
    opacity: 0.5;
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
}

.timeline-event-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.timeline-event-time {
    font-size: 11px;
    opacity: 0.9;
}

.timeline-event-message {
    font-size: 11px;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid rgba(255,255,255,0.3);
}

.timeline-event-weekdays {
    font-size: 11px;
    margin-top: 4px;
}

.timeline-no-events {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #adb5bd;
    font-size: 14px;
}

/* 事件列表中的时间触发标识 */
.test-button-item .event-type-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 3px 8px;
    background: rgba(0,0,0,0.6);
    color: white;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.test-button-item .event-time-info {
    font-size: 12px;
    color: #6c757d;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid #e9ecef;
}

.test-button-item .event-note {
    font-size: 11px;
    color: #868e96;
    margin-top: 4px;
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.test-button-item .event-status {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    margin-left: 5px;
}

.test-button-item .event-status.enabled {
    background: #d4edda;
    color: #155724;
}

.test-button-item .event-status.disabled {
    background: #f8d7da;
    color: #721c24;
}

/* 按钮预览区域调整 */
.test-button-item .button-preview {
    position: relative;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.test-button-item.time-trigger .button-preview::before {
    content: "⏰";
    position: absolute;
    top: 5px;
    left: 5px;
    font-size: 16px;
}

.test-button-item.click-trigger .button-preview::before {
    content: "👆";
    position: absolute;
    top: 5px;
    left: 5px;
    font-size: 16px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .event-config-modal {
        width: 95%;
        max-height: 95vh;
    }
    
    .weekday-item {
        flex: 0 0 calc(33.333% - 8px);
    }
    
    .schedule-date-selector {
        flex-direction: column;
    }
    
    .schedule-date-selector input[type="date"] {
        flex: 1 1 100%;
        width: 100%;
    }
    
    .timeline-hour {
        padding-left: 60px;
    }
    
    .timeline-hour-label {
        width: 50px;
        font-size: 12px;
    }
}
/* 测试事件样式 */
.event-test-info {
    font-size: 12px;
    color: #28a745;
    font-weight: 600;
    margin-top: 4px;
    padding: 2px 6px;
    background: rgba(40, 167, 69, 0.1);
    border-radius: 4px;
    display: inline-block;
}

.test-button-item.test-trigger {
    border-left: 4px solid #28a745;
}

.test-button-item.test-trigger .button-preview {
    border: 2px solid rgba(40, 167, 69, 0.3);
}/*
 计划表事件项样式 - 参考4G消息日志 */
.timeline-event-item {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 12px;
    margin: 8px 0;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.timeline-event-item:hover {
    background: #f8f9fa;
    border-color: #007bff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

.timeline-event-item.disabled {
    background: #f8f9fa;
    color: #6c757d;
    border-color: #dee2e6;
    opacity: 0.7;
}

.timeline-event-name {
    font-weight: 600;
    color: #495057;
    margin-bottom: 4px;
}

.timeline-event-time {
    font-size: 12px;
    color: #007bff;
    margin-bottom: 2px;
}

.timeline-event-message {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 2px;
}

.timeline-event-weekdays {
    font-size: 11px;
    color: #28a745;
}

.timeline-no-events {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.timeline-no-events p {
    font-size: 16px;
    margin: 0;
}

.bt-message-list {
    flex: 1;
    min-height: 200px;
    max-height: calc(100vh - 400px);
    overflow-y: auto;
    margin-bottom: 10px;
}

.log-input-section {
    flex-shrink: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
    margin-top: 15px;
}

.log-input-section .control-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    justify-content: flex-start;
}

.log-input-section .control-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    min-width: 70px;
    text-align: left;
    margin-right: 4px;
}

.log-input-section .control-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 12px;
    transition: all 0.2s ease;
}

.log-input-section .control-input:focus {
    outline: none;
    border-color: #007bff;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
}

.log-input-section .control-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.log-input-section .control-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.log-input-section .send-btn {
    background: #007bff;
    color: white;
}

.log-input-section .send-btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.log-input-section .send-btn:active {
    transform: translateY(0);
}

.log-input-section .send-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

/* 确保消息列表有滚动条 */
.bt-message-list::-webkit-scrollbar {
    width: 8px;
}

.bt-message-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.bt-message-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.bt-message-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}