/* 通用重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft Yahei", sans-serif;
}

/* 浅红色主题变量 */
:root {
    --primary-color: #f84b4b;
    --primary-light: #fad0d0;
    --primary-dark: #e03e3e;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #fff;
    --border-color: #eee;
}

/* 自适应布局 */
html {
    font-size: 14px;
}

@media (max-width: 768px) {
    html {
        font-size: 12px;
    }
}

@media (min-width: 1200px) {
    html {
        font-size: 16px;
    }
}

body {
    background-color: #f9f9f9;
    color: var(--text-color);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* 顶部导航/底部标签栏 */
.tab-bar {
    display: flex;
    align-items: center;
    justify-content: space-around;
    background-color: var(--bg-color);
    border-top: 1px solid var(--border-color);
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    z-index: 999;
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.8rem;
}

.tab-item.active {
    color: var(--primary-color);
}

.tab-item i {
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-outline {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background-color: transparent;
}

.btn-outline:hover {
    background-color: var(--primary-light);
}

/* 卡片样式 */
.card {
    background-color: var(--bg-color);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    padding: 1rem;
    margin-bottom: 1rem;
}

/* 表单样式 */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary-color);
}

/* 地图容器 */
#map-container {
    width: 100%;
    height: 300px;
    border-radius: 12px;
    margin-bottom: 1rem;
}

/* 急救速查模块 */
.first-aid-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.first-aid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border-radius: 8px;
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.first-aid-item i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* 节拍器样式 */
.heartbeat-container {
    width: 100%;
    padding: 2rem;
    text-align: center;
}

.heartbeat-box {
    width: 100px;
    height: 100px;
    margin: 0 auto;
    border-radius: 50%;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2rem;
    animation: heartbeat 1s infinite;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* 后台管理样式 */
.admin-header {
    background-color: var(--primary-color);
    color: #fff;
    padding: 1rem;
    margin-bottom: 1rem;
}

.admin-nav {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.admin-card {
    background-color: var(--bg-color);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    text-align: left;
}

.table th {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

/* 帮助中心样式 */
.help-item {
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.help-question {
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    #map-container {
        height: 250px;
    }
    
    .admin-nav {
        flex-wrap: wrap;
    }
    
    .heartbeat-container {
        padding: 1rem;
    }
}