/* PC端法庭页面样式 */
.court-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}

/* 法庭头部样式 */
.court-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    min-height: 70px;
}

.court-header h1 {
    margin: 0;
    font-size: 1.8rem;
    flex: 1;
    text-align: center;
    font-weight: 600;
}

.back-button, .settings-button {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 12px 16px;
    border-radius: 10px;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-button {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.settings-button {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.back-button:hover, .settings-button:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

/* 法庭主区域 - 两栏布局 */
.court-main {
    display: flex;
    flex: 1;
    margin: 20px;
    gap: 20px;
    height: calc(100vh - 160px);
}

/* 左侧法庭布局 */
.court-layout {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto 1fr;
    gap: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
}

/* 右侧聊天区域 */
.court-chat {
    flex: 1.3; /* 增加聊天区域宽度 */
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    min-width: 0; /* 防止内容溢出 */
}

/* 右侧聊天区域消息容器 */
.court-messages {
    flex: 1;
    overflow-y: auto;
    padding: 25px 35px; /* 增加内边距 */
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin: 0 25px; /* 增加外边距 */
    max-height: 400px;
    backdrop-filter: blur(10px);
}

/* 法庭消息样式 */
.court-messages .message {
    margin-bottom: 20px; /* 调整消息间距 */
    padding: 12px 15px; /* 调整内边距 */
    border-radius: 18px; /* 增加圆角 */
    max-width: 85%; /* 增加最大宽度 */
    animation: fadeInUp 0.4s ease;
    position: relative;
}

@keyframes fadeInUp {
    from { 
        opacity: 0; 
        transform: translateY(20px) scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

.court-messages .message-user {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15) 0%, rgba(139, 195, 74, 0.15) 100%);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #333;
    align-self: flex-end;
    margin-right: 25px; /* 增加右边距 */
}

.court-messages .message-content {
    max-width: 90%;
    border-radius: 20px; /* 增加圆角 */
    position: relative;
    word-wrap: break-word;
    margin: 0;
    /* 减少内边距以避免多余空行 */
    padding: 8px 12px;
}

.court-messages .message-user .message-content {
    /* 保留原有样式 */
}

.court-messages .message-bot .message-content {
    /* 保留原有样式 */
}

.court-messages .message-system {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.1) 0%, rgba(255, 87, 34, 0.1) 100%);
    border: 1px solid rgba(255, 152, 0, 0.2);
    color: #666;
    align-self: center;
    text-align: center;
    width: 75%; /* 增加宽度 */
    margin: 20px auto; /* 增加上下边距 */
    font-style: italic;
    font-weight: 500;
}

.court-messages .message-participant {
    background: linear-gradient(135deg, rgba(106, 17, 203, 0.1) 0%, rgba(37, 117, 252, 0.1) 100%);
    border: 1px solid rgba(106, 17, 203, 0.2);
    color: #333;
    align-self: flex-start;
    margin-left: 25px; /* 增加左边距 */
    box-shadow: 0 4px 15px rgba(106, 17, 203, 0.1);
}

.court-messages .message-header-container {
    display: flex;
    align-items: center;
    gap: 20px; /* 增加头像和角色名称之间的间距 */
    margin-bottom: 15px; /* 增加底部间距 */
}

.court-messages .message-avatar {
    width: 45px; /* 增大头像尺寸 */
    height: 45px; /* 增大头像尺寸 */
    border-radius: 50%;
    position: absolute;
    left: -22px; /* 调整头像位置 */
    top: 18px; /* 调整头像位置 */
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.court-messages .message-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.court-messages .message-header {
    display: flex;
    align-items: center;
    gap: 15px; /* 增加角色名称和徽章之间的间距 */
    margin-left: 55px; /* 为头像留出空间 */
    padding-top: 8px; /* 增加顶部内边距 */
}

.court-messages .participant-name {
    font-weight: 600;
    color: #6a11cb;
    font-size: 1.1rem; /* 增大字体大小 */
}

.court-messages .message-header .role-badge {
    font-size: 13px; /* 增大字体大小 */
    padding: 3px 10px; /* 增加内边距 */
    border-radius: 12px; /* 增加圆角 */
    color: white;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 25px; /* 增加最小宽度 */
    height: 25px; /* 增加高度 */
}

.court-messages .message-header .judge-badge {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

.court-messages .message-header .plaintiff-badge {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.court-messages .message-header .defendant-badge {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.court-messages .message-header .clerk-badge {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
}

.court-messages .message-header .system-badge {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
}

.court-messages .message-text {
    line-height: 1.6; /* 增加行高 */
    font-size: 15px; /* 增大字体大小 */
    margin: 0;
    padding: 0;
    margin-left: 55px; /* 为头像留出空间 */
    /* 确保换行符正确显示 */
    white-space: normal;
    word-wrap: break-word;
}

.court-messages .message-content {
    max-width: 90%;
    border-radius: 20px; /* 增加圆角 */
    position: relative;
    word-wrap: break-word;
    margin: 0;
    /* 减少内边距以避免多余空行 */
    padding: 10px 15px;
}

.court-messages .judgment-text {
    white-space: pre-wrap;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.8;
    margin: 0;
    padding: 0;
}

/* 法庭信息 */
.court-info {
    grid-column: 1 / 3;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 3px solid rgba(44, 62, 80, 0.1);
}

.court-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 3px solid rgba(44, 62, 80, 0.1);
}

.court-info h2 {
    margin: 0;
    font-size: 1.6rem;
    color: #2c3e50;
    font-weight: 600;
}

.court-status {
    display: flex;
    gap: 20px;
    font-size: 1rem;
    color: #666;
}

.court-status span {
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.1) 0%, rgba(52, 73, 94, 0.1) 100%);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(44, 62, 80, 0.2);
    font-weight: 500;
}

/* 审判席 - 上方中间位置 */
.judge-section {
    grid-column: 1 / 3;
    display: flex;
    flex-direction: column;
    align-items: center; /* 居中对齐 */
    justify-content: center; /* 垂直居中 */
    padding: 15px;
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.1) 0%, rgba(52, 73, 94, 0.1) 100%);
    border-radius: 15px;
    border: 2px solid rgba(44, 62, 80, 0.2);
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.1);
    z-index: 10;
    /* 调整高度使其与原告席一致 */
    min-height: auto;
    height: auto;
}

.judge-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    padding: 8px 20px;
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    border-radius: 20px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 3px 10px rgba(243, 156, 18, 0.3);
    text-align: center; /* 标题居中 */
}

.judge-participants {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 书记员席 - 在法官边上有点距离 */
.clerk-section {
    grid-column: 1 / 3;
    display: flex;
    justify-content: flex-end;
    padding: 10px;
    margin-top: -30px;
    z-index: 5;
    /* 调整高度 */
    min-height: auto;
    height: auto;
}

.clerk-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 10px;
    padding: 6px 16px;
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    border-radius: 15px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.clerk-participants {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* 原告席 - 左侧 */
.plaintiff-section {
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1) 0%, rgba(41, 128, 185, 0.1) 100%);
    border-radius: 15px;
    border: 2px solid rgba(52, 152, 219, 0.2);
    /* 确保高度设置一致 */
    min-height: auto;
    height: auto;
}

.plaintiff-section .side-title {
    font-size: 1.2rem;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 20px;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    margin-bottom: 15px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.3);
}

.plaintiff-section .side-participants {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

/* 被告席 - 右侧 */
.defendant-section {
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.1) 0%, rgba(192, 57, 43, 0.1) 100%);
    border-radius: 15px;
    border: 2px solid rgba(231, 76, 60, 0.2);
    /* 确保高度设置一致 */
    min-height: auto;
    height: auto;
}

.defendant-section .side-title {
    font-size: 1.2rem;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 20px;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    margin-bottom: 15px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    box-shadow: 0 3px 10px rgba(231, 76, 60, 0.3);
}

.defendant-section .side-participants {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

/* 法庭标志 */
.court-symbol {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #2c3e50;
}

.court-symbol i {
    font-size: 4rem;
    margin-bottom: 10px;
    color: #f39c12;
}

.court-name {
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
}

/* 审判席 */
.judge-bench {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.1) 0%, rgba(52, 73, 94, 0.1) 100%);
    border-radius: 15px;
    border: 2px solid rgba(44, 62, 80, 0.2);
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.1);
}

.judge-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    padding: 8px 20px;
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    border-radius: 20px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 3px 10px rgba(243, 156, 18, 0.3);
}

.judge-participants {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 法庭中央区域 */
.court-center {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 40px;
    align-items: center;
    margin: 20px 0;
}

.plaintiff-side, .defendant-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border-radius: 15px;
    min-height: 200px;
}

/* 语音播放动画效果 */
.speaking-animation {
    animation: speaking-pulse 1.5s ease-in-out infinite;
    border: 3px solid #f39c12 !important;
    box-shadow: 0 0 20px rgba(243, 156, 18, 0.6) !important;
}

@keyframes speaking-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 语音控制按钮容器 */
.speech-controls-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
    border: 1px solid rgba(52, 73, 94, 0.2);
}

/* 语音控制按钮样式 */
.speech-control-btn, .speech-stop-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.speech-stop-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.speech-control-btn:hover, .speech-stop-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

.speech-stop-btn:hover {
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.speech-control-btn:active, .speech-stop-btn:active {
    transform: translateY(0);
}

/* 参与者头像动画增强 */
.participant-avatar img, .message-avatar img {
    transition: all 0.3s ease;
    border-radius: 50%;
    border: 2px solid transparent;
}

.participant-avatar img.speaking-animation, .message-avatar img.speaking-animation {
    border-color: #f39c12;
    box-shadow: 0 0 15px rgba(243, 156, 18, 0.5);
}

.plaintiff-side {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1) 0%, rgba(41, 128, 185, 0.1) 100%);
    border: 2px solid rgba(52, 152, 219, 0.2);
}

.defendant-side {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.1) 0%, rgba(192, 57, 43, 0.1) 100%);
    border: 2px solid rgba(231, 76, 60, 0.2);
}

.side-title {
    font-size: 1.2rem;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 20px;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    margin-bottom: 15px;
}

.plaintiff-side .side-title {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.3);
}

.defendant-side .side-title {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    box-shadow: 0 3px 10px rgba(231, 76, 60, 0.3);
}

.side-participants {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

/* 法庭标志 - 居中显示 */
.court-symbol {
    grid-column: 1 / 3;
    grid-row: 2 / 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.1) 0%, rgba(230, 126, 34, 0.1) 100%);
    border: 3px solid rgba(243, 156, 18, 0.3);
    border-radius: 50%;
    width: 120px;
    height: 120px;
    margin: 0 auto;
    align-self: center;
    z-index: 1;
}

.court-symbol i {
    font-size: 2.5rem;
    color: #f39c12;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.court-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c3e50;
    text-align: center;
}

/* 书记员席 */
.clerk-bench {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: linear-gradient(135deg, rgba(142, 68, 173, 0.1) 0%, rgba(155, 89, 182, 0.1) 100%);
    border-radius: 15px;
    border: 2px solid rgba(142, 68, 173, 0.2);
}

.clerk-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 10px;
    padding: 6px 16px;
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    border-radius: 15px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.clerk-participants {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 参与者头像样式 */
.participant {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.participant:hover {
    transform: translateY(-5px);
}

.participant.active {
    transform: scale(1.15) translateY(-5px);
}

.participant-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(106, 17, 203, 0.3);
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(106, 17, 203, 0.2);
}

.judge-participant .participant-avatar {
    border-color: #f39c12;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.plaintiff-participant .participant-avatar {
    border-color: #3498db;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.defendant-participant .participant-avatar {
    border-color: #e74c3c;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.clerk-participant .participant-avatar {
    border-color: #9b59b6;
    box-shadow: 0 4px 15px rgba(155, 89, 182, 0.3);
}

.participant.active .participant-avatar {
    border-color: #6a11cb;
    box-shadow: 0 0 20px rgba(106, 17, 203, 0.4);
}

.participant-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.participant-badge {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.judge-participant .participant-badge {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

.plaintiff-participant .participant-badge {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.defendant-participant .participant-badge {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.clerk-participant .participant-badge {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
}

.participant-name {
    margin-top: 10px;
    font-size: 0.9rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    font-weight: 500;
    color: #333;
}

/* 控制按钮区域 */
.court-controls-bar {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    margin: 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* 主要按钮样式 */
.primary-button {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-size: 1rem;
    min-width: 120px;
    justify-content: center;
    backdrop-filter: blur(10px);
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(106, 17, 203, 0.3);
}

.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(106, 17, 203, 0.4);
}

.primary-button:disabled {
    background: linear-gradient(135deg, #bdc3c7 0%, #95a5a6 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(189, 195, 199, 0.3);
}

/* 控制按钮样式 */
.control-button {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-size: 1rem;
    min-width: 120px;
    justify-content: center;
    backdrop-filter: blur(10px);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 249, 250, 0.9) 100%);
    color: #333;
    border: 1px solid rgba(106, 17, 203, 0.2);
}

.control-button:hover {
    background: linear-gradient(135deg, rgba(106, 17, 203, 0.1) 0%, rgba(37, 117, 252, 0.1) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(106, 17, 203, 0.2);
}

.control-button:disabled {
    background: rgba(0, 0, 0, 0.1);
    color: #999;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 危险按钮样式 */
.danger-button {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-size: 1rem;
    min-width: 120px;
    justify-content: center;
    backdrop-filter: blur(10px);
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.danger-button:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.danger-button:disabled {
    background: rgba(220, 53, 69, 0.5);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 设置面板样式 */
.settings-panel {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    height: 100vh;
    background: linear-gradient(135deg, #1a1c2d 0%, #2d1f3d 100%);
    box-shadow: -8px 0 25px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    backdrop-filter: blur(15px);
}

.settings-panel.active {
    right: 0;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-header h2 {
    margin: 0;
    font-size: 1.4rem;
    color: white;
    font-weight: 600;
}

.close-button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.close-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.settings-content {
    padding: 25px;
    color: white;
    height: calc(100vh - 100px);
    overflow-y: auto;
}

.setting-item {
    margin-bottom: 25px;
}

.setting-item label {
    display: block;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-size: 1rem;
}

.setting-item input[type="text"],
.setting-item input[type="number"],
.setting-item select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transition: all 0.3s ease;
}

.setting-item input:focus,
.setting-item select:focus {
    outline: none;
    border-color: rgba(106, 17, 203, 0.5);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(106, 17, 203, 0.1);
}

.add-role-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.add-role-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.add-role-btn.judge-btn {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.add-role-btn.judge-btn:hover {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.4);
}

.add-role-btn.plaintiff-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.add-role-btn.plaintiff-btn:hover {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.add-role-btn.defendant-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.add-role-btn.defendant-btn:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.add-role-btn.clerk-btn {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    box-shadow: 0 4px 15px rgba(155, 89, 182, 0.3);
}

.add-role-btn.clerk-btn:hover {
    background: linear-gradient(135deg, #8e44ad 0%, #7d3c98 100%);
    box-shadow: 0 6px 20px rgba(155, 89, 182, 0.4);
}

/* 其他模态框和表单样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { 
        opacity: 0; 
        transform: scale(0.8) translateY(-50px); 
    }
    to { 
        opacity: 1; 
        transform: scale(1) translateY(0); 
    }
} 
/* 法庭消息区域 */
.court-messages {
    flex: 1;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    overflow-y: auto;
    border-top: 2px solid rgba(44, 62, 80, 0.1);
}

.court-messages .message {
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 10px;
    background: #f8f9fa;
    border-left: 4px solid #3498db;
}

.court-messages .message-system {
    background: linear-gradient(135deg, #ecf0f1 0%, #bdc3c7 100%);
    border-left-color: #95a5a6;
    font-weight: 500;
}

.court-messages .message-participant {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #ffffff;
    border: 1px solid #e9ecef;
}

.court-messages .message-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.court-messages .message-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.court-messages .message-content {
    flex: 1;
    line-height: 1.5;
}

/* 法庭控制栏 */
.court-controls-bar {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-top: 2px solid rgba(44, 62, 80, 0.1);
    flex-wrap: wrap;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .court-header {
        padding: 10px 20px;
    }
    
    .court-header h1 {
        font-size: 1.5rem;
    }
    
    .court-main {
        flex-direction: column;
        margin: 10px;
        height: auto;
    }
    
    .court-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        margin-bottom: 20px;
    }
    
    .judge-section, .clerk-section, .plaintiff-section, .defendant-section {
        grid-column: 1;
    }
    
    .court-symbol {
        grid-row: auto;
        margin: 20px auto;
    }
    
    .court-controls-bar {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 768px) {
    .court-header {
        flex-direction: row;
        padding: 10px;
    }
    
    .court-header h1 {
        font-size: 1.3rem;
    }
    
    .back-button, .settings-button {
        position: static;
        transform: none;
        padding: 8px 12px;
        font-size: 1rem;
    }
    
    .court-stage {
        margin: 5px;
        padding: 15px;
    }
    
    .court-info {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .court-status {
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .courtroom-layout {
        padding: 15px;
    }
    
    .judge-bench, .clerk-bench {
        padding: 15px;
    }
    
    .court-controls-bar {
        padding: 15px;
        gap: 10px;
    }
    
    .primary-button, .control-button, .danger-button {
        min-width: 120px;
        font-size: 0.9rem;
        padding: 12px 20px;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.modal-body {
    padding: 25px;
    max-height: 60vh;
    overflow-y: auto;
}

.role-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.role-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    text-align: center;
}

.role-card:hover {
    border-color: #2c3e50;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(44, 62, 80, 0.2);
}

.role-card.selected {
    border-color: #2c3e50;
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.1) 0%, rgba(52, 73, 94, 0.1) 100%);
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.3);
}

.role-card img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
    border: 2px solid #e0e0e0;
}

.role-card.selected img {
    border-color: #2c3e50;
}

.role-card span {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
}

.save-settings-button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(106, 17, 203, 0.3);
}

.save-settings-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(106, 17, 203, 0.4);
}

/* 复选框样式 */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #6a11cb;
}

.checkbox-group label {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
}

/* 已选角色显示 */
.selected-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.selected-role {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    padding: 8px 15px;
    border-radius: 20px;
    color: white;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(106, 17, 203, 0.3);
}

.selected-role:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.selected-role img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    margin-right: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.selected-role span {
    font-size: 0.9rem;
    font-weight: 500;
}

.remove-role {
    background: none;
    border: none;
    color: white;
    margin-left: 8px;
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.remove-role:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 角色区域样式 */
.role-section {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.role-section h4 {
    margin: 0 0 15px 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    font-weight: 600;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .court-controls-bar {
        flex-wrap: wrap;
        gap: 10px;
        padding: 20px 15px;
    }
    
    .primary-button, .control-button, .danger-button {
        min-width: auto;
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .settings-panel {
        width: 100%;
        right: -100%;
    }
    
    .courtroom-layout {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
    }
    
    .court-symbol {
        order: -1;
        margin-bottom: 20px;
    }
}

/* 法庭消息区域 - 确保在较小屏幕上也能正确滚动 */
@media (max-width: 768px) {
    .court-messages {
        flex: 1;
        background: rgba(255, 255, 255, 0.9);
        padding: 20px;
        overflow-y: auto;
        border-top: 2px solid rgba(44, 62, 80, 0.1);
        max-height: 40vh; /* 在移动设备上限制最大高度 */
    }
}
