:root {
    --primary-color: #007AFF;
    --bg-color: #F5F5F7;
    --text-color: #1D1D1F;
    --border-radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    padding: 20px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.logo h1 {
    font-size: 24px;
    font-weight: 600;
}

.logo svg {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    transition: all 0.3s ease;
}

.logo svg:hover {
    transform: scale(1.05) rotate(-2deg);
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.chat-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    height: 70vh;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.message {
    margin: 12px 0;
    padding: 12px 16px;
    border-radius: var(--border-radius);
    max-width: 80%;
    user-select: text;
    animation: messageSlide 0.3s ease-out;
}

.message.system {
    background: #E8E8E8;
    margin-left: 0;
}

.message.user {
    background: var(--primary-color);
    color: white;
    margin-left: auto;
}

.message.assistant {
    background: #F5F5F7;
    margin-right: auto;
}

.input-area {
    border-top: 1px solid #E8E8E8;
    padding: 20px;
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

textarea {
    flex: 1;
    border: 1px solid #E8E8E8;
    border-radius: var(--border-radius);
    padding: 12px;
    resize: none;
    height: 60px;
    font-family: inherit;
}

button {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 12px 24px;
    cursor: pointer;
    transition: opacity 0.2s;
}

button:hover {
    opacity: 0.9;
}

.upload-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px !important;
    background: var(--primary-color);
    border-radius: var(--border-radius);
    cursor: pointer;
}

.upload-text {
    font-size: 14px;
    color: white;
    white-space: nowrap;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .chat-container {
        height: calc(100vh - 100px);
    }
    
    .message {
        max-width: 90%;
    }
    
    .upload-text {
        display: none;
    }
    
    .upload-btn {
        padding: 12px !important;
    }
}

.timestamp {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.content {
    white-space: pre-wrap;
    word-break: break-word;
}

.message.system {
    background: #FFE8E8;
    color: #D03030;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.loading {
    opacity: 0.7;
}

/* 添加法律分类按钮样式 */
.legal-categories {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.category-btn {
    background: transparent;
    color: var(--text-color);
    border: 1px solid var(--primary-color);
    padding: 8px 16px;
    font-size: 14px;
}

.category-btn:hover,
.category-btn.active {
    background: var(--primary-color);
    color: white;
}

/* 添加文件预览样式 */
.file-preview {
    background: #F5F5F7;
    padding: 12px;
    border-radius: var(--border-radius);
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-preview img {
    max-width: 100px;
    max-height: 100px;
    object-fit: cover;
    border-radius: 4px;
}

@keyframes glowPulse {
    0% { 
        filter: drop-shadow(0 2px 4px rgba(74,144,226,0.3));
        transform: translateY(0);
    }
    50% { 
        filter: drop-shadow(0 4px 8px rgba(74,144,226,0.5));
        transform: translateY(-1px);
    }
    100% { 
        filter: drop-shadow(0 2px 4px rgba(74,144,226,0.3));
        transform: translateY(0);
    }
}

.logo svg path:first-of-type {
    animation: glowPulse 3s ease-in-out infinite;
}

/* 添加高光动画 */
@keyframes highlightShine {
    0% { opacity: 0.4; }
    50% { opacity: 0.8; }
    100% { opacity: 0.4; }
}

.logo svg path:nth-of-type(2) {
    animation: highlightShine 4s ease-in-out infinite;
} 