* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    min-height: 100vh;
    padding-bottom: 60px;
}

.nav {
    background: linear-gradient(135deg, #165dff, #0d4bd6);
    padding: 14px 20px;
    display: flex;
    justify-content: space-around;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav a {
    color: white;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 30px;
}

.nav a:active {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(0.95);
}

.card {
    background: rgba(255, 255, 255, 0.96);
    width: 94%;
    margin: 16px auto;
    padding: 20px 18px;
    border-radius: 28px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
}

.card h2 {
    font-size: 20px;
    margin-bottom: 14px;
    color: #165dff;
    border-left: 4px solid #165dff;
    padding-left: 12px;
}

.btn {
    background: linear-gradient(135deg, #165dff, #0d4bd6);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: bold;
    width: 100%;
    cursor: pointer;
}

.btn:active { transform: scale(0.97); }
.btn-red { background: linear-gradient(135deg, #e60000, #cc0000); }
.btn-small { padding: 8px 16px; font-size: 14px; width: auto; display: inline-block; }

input, textarea, select {
    width: 100%;
    padding: 14px 18px;
    font-size: 15px;
    border: 2px solid #e8e8e8;
    border-radius: 50px;
    background: white;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #165dff;
}

.broadcast-box {
    background: #fff5f5;
    border-left: 4px solid #e60000;
    padding: 14px;
    border-radius: 18px;
    font-weight: bold;
    color: #d81e06;
}

.weather-broadcast-box {
    background: #e8f4ff;
    border-left: 4px solid #1890ff;
    padding: 14px;
    border-radius: 18px;
    font-weight: bold;
    color: #096dd9;
}

.weather {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 16px;
    border-radius: 28px;
    margin: 16px auto;
    width: 94%;
    text-align: center;
    font-weight: bold;
}

.chat-box {
    height: 320px;
    overflow-y: auto;
    background: #fafafc;
    padding: 15px;
    border-radius: 24px;
    margin-bottom: 12px;
    border: 1px solid #eee;
}

.msg-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 12px 0;
}

.msg-content {
    flex: 1;
    padding: 12px 16px;
    border-radius: 20px;
    font-size: 15px;
    max-width: 75%;
}

.msg-left .msg-content {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 20px 20px 20px 6px;
}

.msg-right .msg-content {
    background: linear-gradient(135deg, #165dff, #0d4bd6);
    color: white;
    border-radius: 20px 20px 6px 20px;
    margin-left: auto;
}

.del-msg-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 6px 14px;
    font-size: 12px;
    cursor: pointer;
}

.voice-record-btn {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: linear-gradient(135deg, #07c160, #06ad56);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 12px auto 8px;
    cursor: pointer;
}

.voice-record-btn.recording {
    background: linear-gradient(135deg, #ff6600, #ff4400);
    animation: pulse 0.8s infinite;
}

.voice-record-btn svg {
    width: 32px;
    height: 32px;
    fill: white;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

.voice-hint {
    text-align: center;
    font-size: 12px;
    color: #07c160;
    margin-top: 5px;
}

.chat-input-area {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    align-items: center;
}

.chat-input-area input {
    flex: 1;
    margin-top: 0;
}

.chat-input-area button {
    background: linear-gradient(135deg, #165dff, #0d4bd6);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: bold;
}

.row {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    align-items: center;
}

.row input {
    flex: 1;
    margin-top: 0;
}

.big-num {
    font-size: 24px;
    font-weight: bold;
    color: #d81e06;
    text-decoration: none;
    background: #fff0ee;
    padding: 6px 14px;
    border-radius: 40px;
    display: inline-block;
}

.assistant-btn {
    position: fixed;
    bottom: 30px;
    right: 20px;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
}

.assistant-btn.listening {
    animation: pulse-purple 0.8s infinite;
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

@keyframes pulse-purple {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

.assistant-btn svg {
    width: 34px;
    height: 34px;
    fill: white;
}

.assistant-tip {
    position: fixed;
    bottom: 110px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 11px;
    z-index: 1000;
}

.assistant-result {
    position: fixed;
    bottom: 170px;
    right: 20px;
    background: linear-gradient(135deg, #4caf50, #388e3c);
    color: white;
    padding: 10px 16px;
    border-radius: 25px;
    font-size: 13px;
    z-index: 1000;
    max-width: 250px;
    display: none;
}

audio { width: 100%; border-radius: 20px; }
.empty-tip { text-align: center; color: #aaa; padding: 40px; font-size: 14px; }
.footer { text-align: center; font-size: 12px; color: #aaa; margin-top: 30px; padding: 20px; }

/* 社区端样式 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 18px 12px;
    border-radius: 24px;
    text-align: center;
}
.stat-card:nth-child(2) { background: linear-gradient(135deg, #f093fb, #f5576c); }
.stat-card:nth-child(3) { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.stat-card:nth-child(4) { background: linear-gradient(135deg, #43e97b, #38f9d7); }

.stat-number { font-size: 34px; font-weight: bold; }
.stat-label { font-size: 12px; margin-top: 6px; opacity: 0.9; }

.chart-bars {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 150px;
    margin-top: 15px;
    gap: 10px;
}

.chart-bar {
    flex: 1;
    background: linear-gradient(180deg, #165dff, #0d4bd6);
    border-radius: 12px 12px 0 0;
    text-align: center;
    color: white;
    font-size: 11px;
    padding-top: 5px;
}

.chart-label {
    text-align: center;
    font-size: 10px;
    margin-top: 6px;
    color: #888;
}

.log-list {
    max-height: 200px;
    overflow-y: auto;
    font-size: 13px;
}

.log-item {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    color: #555;
}

.voice-small-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #07c160, #06ad56);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.voice-small-btn.recording {
    background: linear-gradient(135deg, #ff6600, #ff4400);
    animation: pulse 0.8s infinite;
}

.voice-small-btn svg {
    width: 28px;
    height: 28px;
    fill: white;
}

.flex-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.broadcast-input-area {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.broadcast-input-area input { flex: 2; }

.target-user-select {
    width: 100%;
    padding: 12px 16px;
    border-radius: 50px;
    border: 2px solid #e8e8e8;
    margin-bottom: 12px;
}

.input-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.input-row input { flex: 1; }

.help-status {
    padding: 10px;
    border-radius: 20px;
    text-align: center;
    margin-top: 10px;
    font-weight: bold;
}
.help-status.pending { background: #fff3e0; color: #ff9800; }
.help-status.received { background: #e3f2fd; color: #2196f3; }
.help-status.done { background: #e8f5e9; color: #4caf50; }

.replay-weather-btn {
    background: linear-gradient(135deg, #1890ff, #0c6bcc);
    color: white;
    border: none;
    border-radius: 40px;
    padding: 8px 22px;
    font-size: 14px;
    margin-top: 12px;
    cursor: pointer;
}

@media (max-width: 480px) {
    .nav a { font-size: 14px; padding: 6px 10px; }
    .card { padding: 16px 14px; }
    .stat-number { font-size: 28px; }
}