.jiegua-container {
    display: flex;
    height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #e8e8e8;
}

.left-panel,
.right-panel {
    width: 25%;
    display: flex;
    flex-direction: column;
    padding: 20px;
    border-right: 2px solid rgba(255, 215, 0, 0.3);
    overflow-y: auto;
}

.right-panel {
    border-right: none;
    border-left: 2px solid rgba(255, 215, 0, 0.3);
}

.center-panel {
    width: 50%;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.panel-header h2 {
    color: #ffd700;
    font-size: 24px;
    font-family: 'KaiTi', '楷体', serif;
    margin: 0;
}

.back-btn {
    padding: 8px 16px;
    border: 2px solid #ffd700;
    border-radius: 6px;
    background: rgba(255, 215, 0, 0.1);
    color: #ffd700;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'KaiTi', '楷体', serif;
}

.back-btn:hover {
    background: rgba(255, 215, 0, 0.3);
}

.left-panel .gua-display,
.right-panel .gua-display {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    margin-bottom: 20px;
}

.left-panel .gua-name,
.right-panel .gua-name {
    text-align: center;
    font-size: 28px;
    color: #ffd700;
    margin-bottom: 15px;
    font-family: 'KaiTi', '楷体', serif;
}

.left-panel .gua-text h3,
.right-panel .gua-text h3,
.yaos-list h3 {
    color: #ffd700;
    margin-bottom: 10px;
    font-size: 16px;
}

.left-panel .gua-text p,
.right-panel .gua-text p {
    line-height: 1.8;
    color: #e8e8e8;
    font-size: 14px;
}

.yaos-list {
    margin-top: 15px;
}

.yao-item {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
}

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

.yao-item p {
    margin: 0;
    line-height: 1.6;
    font-size: 14px;
}

.yao-item strong {
    color: #ffd700;
}

.no-gua {
    text-align: center;
    padding: 40px 20px;
    color: #888;
    font-size: 16px;
}

.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 100px);
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    overflow: hidden;
}

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

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

.welcome-message p {
    margin: 10px 0;
    line-height: 1.8;
}

.message {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    flex-shrink: 0;
}

.message.ai .message-avatar {
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
    color: #1a1a2e;
}

.message.user .message-avatar {
    background: linear-gradient(135deg, #4a9eff 0%, #3a7ecc 100%);
    color: #fff;
}

.message-content {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 8px;
    line-height: 1.8;
}

.message.ai .message-content {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.message.user .message-content {
    background: rgba(74, 158, 255, 0.2);
    border: 1px solid rgba(74, 158, 255, 0.3);
}

.message-content p {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

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

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #ffd700;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

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

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

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0);
    } 40% {
        transform: scale(1);
    }
}

.chat-input {
    display: flex;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid rgba(255, 215, 0, 0.2);
}

.chat-input textarea {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    color: #e8e8e8;
    font-size: 16px;
    resize: none;
    line-height: 1.6;
    transition: all 0.3s;
}

.chat-input textarea:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.chat-input textarea::placeholder {
    color: #888;
}

.chat-input button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
    color: #1a1a2e;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    align-self: flex-end;
}

.chat-input button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.chat-input button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-messages::-webkit-scrollbar,
.left-panel::-webkit-scrollbar,
.right-panel::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track,
.left-panel::-webkit-scrollbar-track,
.right-panel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb,
.left-panel::-webkit-scrollbar-thumb,
.right-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.3);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover,
.left-panel::-webkit-scrollbar-thumb:hover,
.right-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.5);
}
