/* 通用样式 */
* {
    font-family: Arial, sans-serif;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    padding: 20px;
    background-color: #f9f9f9;
    color: #333;
}

#app {
    max-width: 800px;
    margin: 0 auto;
}

h1, h2, h3 {
    margin-bottom: 15px;
    color: #333;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

/* 登录界面 */
.login-container {
    text-align: center;
    background: white;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin: 30px auto;
    max-width: 400px;
}

.login-button {
    padding: 8px 20px;
    margin-top: 15px;
}

/* 主容器 */
.main-container {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 头部区域 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #f0f0f0;
    border-bottom: 1px solid #ddd;
}

.header h2 {
    margin: 0;
}

.logout-button {
    padding: 5px 10px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* 区域标题和筛选器文本一行显示 */
.section-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
    gap: 15px;
}

.section-header h2 {
    margin: 0;
    font-size: 16px;
    padding: 5px 10px;
    background-color: #f0f0f0;
    border-radius: 4px;
}

.filter-label, .theme-label {
    font-size: 13px;
    color: #555;
}

/* 按钮容器 */
.theme-buttons-container {
    margin-bottom: 15px;
}

/* 主题按钮 */
.theme-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.theme-buttons button {
    padding: 5px 10px;
    font-size: 13px;
    border-radius: 4px;
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
    cursor: pointer;
}

.theme-buttons button.active {
    background-color: #e0e0e0;
    border-color: #ccc;
    font-weight: bold;
}

/* 移除不需要的样式 */
.inline-filter, .inline-theme-selector, .theme-filter, .theme-selector {
    display: none;
}

/* 调整间距 */
.read-section, .send-section {
    padding: 15px;
}

.messages {
    margin-top: 0;
}

/* 区域标题 */
.read-section h2, .send-section h2 {
    font-size: 16px;
    margin-bottom: 10px;
    padding: 5px 10px;
    background-color: #f0f0f0;
    border-radius: 4px;
    display: inline-block;
}

/* Read 部分 */
.read-section {
    padding: 15px;
    border-bottom: 1px solid #ddd;
}

.messages {
    max-height: 600px;
    overflow-y: auto;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 4px;
    margin-top: 15px;
    border: 1px solid #eee;
}

/* Send 部分 */
.send-section {
    padding: 15px;
}

.send-button {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
}

/* 主题筛选器样式 */
.theme-filter {
    background: #f9f9f9;
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
    border: 1px solid #eee;
}

.theme-filter h3 {
    margin-bottom: 8px;
    font-size: 14px;
}

.theme-toggle {
    padding: 5px 10px !important;
    margin: 3px;
    font-size: 13px;
}

/* 主题选择器样式 */
.theme-selector {
    margin-bottom: 15px;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #eee;
}

.theme-selector span {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
}

/* 消息样式 */
.messages ul {
    list-style: none;
    padding: 0;
}

.messages li {
    background: white;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 4px;
    border: 1px solid #eee;
}

.message-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 5px;
}

/* 消息主题标签组 */
.message-themes {
    display: flex;
    gap: 5px;
    margin-left: auto;
    flex-wrap: wrap;
}

/* 活跃主题标签组 */
.active-themes {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 5px;
    max-width: 70%;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* 消息主题标签 - 统一简洁风格，无颜色 */
.message-theme {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    background-color: #f0f0f0;
    color: #333;
    white-space: nowrap;
    border: 1px solid #ddd;
}

/* 活跃主题标签 - 统一简洁风格，无颜色 */
.active-theme {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    background-color: #f0f0f0;
    color: #333;
    white-space: nowrap;
    border: 1px solid #ddd;
}

/* 主题按钮基础样式 */
.theme-toggle.active {
    background-color: #f5f5f5;
    border-color: #ccc;
    font-weight: bold;
}

/* 主题按钮颜色 */
.theme-toggle.active.theme-attraction {
    border-left: 3px solid #4CAF50;
}

.theme-toggle.active.theme-food {
    border-left: 3px solid #FF9800;
}

.theme-toggle.active.theme-stay {
    border-left: 3px solid #2196F3;
}

.theme-toggle.active.theme-leisure {
    border-left: 3px solid #9C27B0;
}

.message-actions {
    display: flex;
    gap: 5px;
    margin-left: 5px;
}

.action-btn {
    padding: 3px 6px;
    font-size: 11px;
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.action-btn.delete {
    border-left: 2px solid #f44336;
}

.edit-mode {
    margin-top: 5px;
}

.edit-mode input[type="text"] {
    width: 100%;
    margin-bottom: 5px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.edit-actions {
    display: flex;
    gap: 5px;
    justify-content: flex-end;
}

.message-content {
    margin-top: 5px;
    word-break: break-word;
}

.message-time {
    font-size: 11px;
    color: #999;
    text-align: right;
    margin-top: 5px;
}

.my-message {
    background-color: #f5f5f5;
}

/* 输入框样式 */
.input-wrapper {
    position: relative;
    flex-grow: 1;
}

.input-wrapper input[type="text"] {
    width: 100%;
    padding: 8px;
    padding-right: 100px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* 消息表单样式 */
.message-form fieldset {
    display: flex;
    gap: 8px;
    border: none;
    padding: 0;
    margin-top: 10px;
}

/* 响应式调整 */
@media (max-width: 600px) {
    .theme-buttons {
        flex-wrap: wrap;
    }

    .message-form fieldset {
        flex-direction: column;
    }

    .message-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .message-themes {
        margin-left: 0;
        margin-top: 5px;
    }

    .message-actions {
        margin-left: 0;
        margin-top: 5px;
    }
}
