/* 庭审界面 - 聊天界面风格 CSS */

/* 基础设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Noto Serif SC', serif;
    background-color: #f0f2f5;
    color: #333;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* iOS状态栏 */
.ios-statusbar {
    height: 24px;
    background-color: #18222d;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
    font-size: 12px;
}

.status-icons i {
    margin-left: 4px;
}

/* 顶部区域 */
.top-bar {
    background-color: #2c3e50;
    color: #fff;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.case-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.stage-indicator {
    display: flex;
    gap: 8px;
    font-size: 12px;
}

.stage {
    position: relative;
    color: rgba(255, 255, 255, 0.6);
}

.stage:not(:last-child)::after {
    content: "→";
    margin-left: 8px;
    color: rgba(255, 255, 255, 0.4);
}

.stage.completed {
    color: #4caf50;
}

.stage.active {
    color: #fff;
    font-weight: 500;
}

.menu-btn {
    width: 36px;
    height: 36px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.menu-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.menu-btn i {
    font-size: 20px;
}

/* 消息区域 */
.message-area {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background-color: #141e28;
    background-image: linear-gradient(to bottom, 
        rgba(20, 30, 40, 0.75) 0%,
        rgba(20, 30, 40, 0.5) 40%,
        rgba(20, 30, 40, 0.5) 60%,
        rgba(20, 30, 40, 0.75) 100%),
        url('../assets/images/bg/court.png');
    background-size: auto, cover;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
}

/* 系统消息 */
.message.system {
    align-self: center;
    max-width: 85%;
    margin: 6px 0;
}

.system-content {
    background-color: rgba(0, 0, 0, 0.65);
    color: #fff;
    padding: 8px 14px;
    border-radius: 16px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.system-content i {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
}

/* AI提示 */
.message.system.hint .system-content {
    background-color: rgba(25, 118, 210, 0.75);
    border: 1px solid rgba(100, 181, 246, 0.3);
    animation: glow 2s infinite alternate;
}

@keyframes glow {
    from { box-shadow: 0 2px 10px rgba(25, 118, 210, 0.3); }
    to { box-shadow: 0 2px 15px rgba(25, 118, 210, 0.6); }
}

.message.system.hint strong {
    font-weight: 600;
    text-decoration: underline;
    color: #90caf9;
}

/* AI消息 */
.message.ai-message {
    display: flex;
    align-items: flex-start;
    margin-right: 60px;
}

.message .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background-color: #ddd;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.message .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.message-content {
    margin: 0 12px;
}

.sender-name {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 4px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    font-weight: 500;
}

.message-bubble {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 10px 14px;
    border-radius: 0 12px 12px 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    backdrop-filter: blur(4px);
}

.ai-message .message-bubble {
    background-color: rgba(255, 255, 255, 0.95);
}

.message-time {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 4px;
    text-align: right;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* 玩家消息 */
.message.player-message {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    margin-left: 60px;
}

.player-message .message-content {
    order: 1;
}

.player-message .avatar {
    order: 2;
}

.player-message .message-bubble {
    background-color: rgba(220, 248, 198, 0.95);
    border-radius: 12px 0 12px 12px;
}

/* 高亮文本 */
.highlight {
    font-weight: 600;
    color: #d32f2f;
    background-color: rgba(255, 235, 238, 0.6);
    padding: 0 2px;
    border-radius: 2px;
}

/* 底部交互区域 */
.bottom-bar {
    background-color: rgba(30, 40, 54, 0.95);
    padding: 8px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 10;
    backdrop-filter: blur(10px);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    position: relative;
}

.toolbar {
    display: flex;
    gap: 16px;
    padding: 10px 16px;
    justify-content: center;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    right: 0;
    background-color: rgba(44, 62, 80, 0.9);
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.2);
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 5;
    pointer-events: none;
}

.toolbar.visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.tool-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(70, 80, 95, 0.75);
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.2s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tool-btn i {
    font-size: 20px;
}

.tool-btn:hover {
    background-color: rgba(85, 95, 110, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}

.tool-btn.objection-btn {
    color: #ff5252;
}

.tool-btn.objection-btn:hover {
    background-color: rgba(255, 82, 82, 0.3);
}

/* 输入区域 */
.input-area {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.text-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    font-family: inherit;
    padding: 8px 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
}

.text-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.voice-btn, .send-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.voice-btn:hover, .send-btn:hover {
    background-color: rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}

.send-btn {
    background-color: #4c6ef5;
    color: #fff;
}

.send-btn:hover {
    background-color: #3b5be3;
}

/* 选项区域 */
.options-area {
    padding: 8px 0;
}

.ai-hint {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 12px;
    padding: 0 4px;
    text-align: center;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 4px;
}

.option-btn {
    background-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    text-align: left;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(4px);
}

.option-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* 弹窗样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal-content {
    width: 90%;
    max-width: 480px;
    max-height: 85vh;
    background-color: rgba(30, 40, 54, 0.95);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    animation: modalAppear 0.3s ease;
}

@keyframes modalAppear {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(20, 30, 45, 0.95);
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.close-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.close-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.close-btn i {
    font-size: 20px;
}

.modal-body {
    padding: 16px;
    flex: 1;
    overflow-y: auto;
}

.modal-footer {
    padding: 12px 16px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(20, 30, 45, 0.6);
}

.modal-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.cancel-btn {
    background-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cancel-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.submit-btn, .cite-btn {
    background-color: #4c6ef5;
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.submit-btn:hover, .cite-btn:hover {
    background-color: #3b5be3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* 证据列表 */
.evidence-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.evidence-item {
    display: flex;
    align-items: center;
    padding: 14px;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.evidence-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.evidence-item.highlighted {
    background-color: rgba(76, 110, 245, 0.15);
    border-color: rgba(76, 110, 245, 0.4);
    box-shadow: 0 2px 8px rgba(76, 110, 245, 0.2);
}

.evidence-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.evidence-icon i {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.9);
}

.evidence-info {
    flex: 1;
}

.evidence-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.9);
}

.evidence-desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.4;
}

.evidence-actions {
    margin-left: 8px;
}

.view-btn {
    padding: 8px 14px;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.view-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* 法律知识库 */
.search-bar {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px 16px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.search-bar input {
    flex: 1;
    border: none;
    outline: none;
    background: none;
    font-size: 14px;
    font-family: inherit;
    color: rgba(255, 255, 255, 0.9);
}

.search-bar input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-bar button {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
}

.search-bar button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.search-bar button i {
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
}

.law-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s ease;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tab-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.tab-btn.active {
    background-color: #4c6ef5;
    color: #fff;
    box-shadow: 0 2px 8px rgba(76, 110, 245, 0.3);
    border-color: transparent;
}

.law-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.law-item {
    padding: 16px;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.law-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.law-item.highlighted {
    background-color: rgba(76, 110, 245, 0.15);
    border-color: rgba(76, 110, 245, 0.4);
    box-shadow: 0 2px 8px rgba(76, 110, 245, 0.2);
}

.law-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.9);
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.law-content {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.message {
    position: relative;
    z-index: 1;
    animation: fadeIn 0.3s ease;
}

/* 响应式调整 */
@media (max-width: 480px) {
    .message-area {
        padding: 12px;
    }
    
    .message.ai-message {
        margin-right: 40px;
    }
    
    .message.player-message {
        margin-left: 40px;
    }
    
    .evidence-item {
        padding: 10px;
    }
} 