/* ============================================================
   文件: assets/css/style.css
   说明: 自定义样式
   ============================================================ */
:root {
    --primary-green: #2d8a4e;
    --light-green: #e8f5e9;
}

body {
    background-color: #f5f7f5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ===== 卡片样式 ===== */
.checkpoint-card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
    height: 100%;
}
.checkpoint-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}
.checkpoint-card .card-img-top {
    height: 200px;
    object-fit: cover;
    background: #e9ecef;
}
.checkpoint-card .card-body {
    padding: 1rem 1.25rem;
}
.checkpoint-card .card-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}
.checkpoint-card .card-text {
    color: #6c757d;
    font-size: 0.9rem;
}
.checkpoint-card .badge-altitude {
    background-color: var(--light-green);
    color: var(--primary-green);
    font-weight: 500;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* ===== 详情页 ===== */
.detail-hero {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.detail-hero .main-image {
    width: 100%;
    height: 320px;
    object-fit: cover;
    background: #e9ecef;
}
.thumb-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 8px;
}
.thumb-grid img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.2s;
    border: 2px solid transparent;
}
.thumb-grid img.active {
    border-color: var(--primary-green);
    opacity: 1;
}
.thumb-grid img:hover {
    opacity: 0.8;
}

/* ===== 信息卡片 ===== */
.info-card {
    background: #fff;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    text-align: center;
    height: 100%;
}
.info-card .icon {
    font-size: 2rem;
    color: var(--primary-green);
    display: block;
    margin-bottom: 0.25rem;
}
.info-card .number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
}
.info-card .label {
    font-size: 0.85rem;
    color: #6c757d;
}

/* ===== 排行榜 ===== */
.rank-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #fff;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: background 0.2s;
}
.rank-item:hover {
    background: var(--light-green);
}
.rank-number {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
    margin-right: 1rem;
    background: #e9ecef;
    color: #495057;
}
.rank-item:nth-child(1) .rank-number {
    background: #ffd700;
    color: #8b6b00;
}
.rank-item:nth-child(2) .rank-number {
    background: #c0c0c0;
    color: #5a5a5a;
}
.rank-item:nth-child(3) .rank-number {
    background: #cd7f32;
    color: #fff;
}
.rank-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 1rem;
    background: #e9ecef;
}
.rank-info {
    flex: 1;
}
.rank-name {
    font-weight: 600;
    margin-bottom: 0;
}
.rank-count {
    font-size: 0.85rem;
    color: #6c757d;
}
.rank-badge {
    font-size: 0.8rem;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    background: var(--light-green);
    color: var(--primary-green);
}

/* ===== 打卡按钮 ===== */
.btn-checkin {
    background: var(--primary-green);
    color: #fff;
    border: none;
    padding: 0.6rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
}
.btn-checkin:hover {
    background: #1e6b3a;
    color: #fff;
    transform: scale(1.02);
}
.btn-checkin:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
.btn-checkin.checked-in {
    background: #6c757d;
}
.btn-checkin i {
    margin-right: 0.5rem;
}

/* ===== 导航按钮 ===== */
.btn-nav {
    background: #fff;
    color: var(--primary-green);
    border: 2px solid var(--primary-green);
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
}
.btn-nav:hover {
    background: var(--primary-green);
    color: #fff;
}

/* ===== 表单 ===== */
.form-control:focus, .form-select:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 0.2rem rgba(45, 138, 78, 0.25);
}
.btn-primary {
    background: var(--primary-green);
    border-color: var(--primary-green);
}
.btn-primary:hover {
    background: #1e6b3a;
    border-color: #1e6b3a;
}

/* ===== 响应式调整 ===== */
@media (max-width: 576px) {
    .detail-hero .main-image {
        height: 220px;
    }
    .thumb-grid img {
        height: 60px;
    }
    .info-card .number {
        font-size: 1.2rem;
    }
    .checkpoint-card .card-img-top {
        height: 160px;
    }
    .rank-avatar {
        width: 36px;
        height: 36px;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .detail-hero .main-image {
        height: 280px;
    }
    .thumb-grid img {
        height: 70px;
    }
}

/* ===== Toast 提示 ===== */
.toast-container {
    z-index: 9999;
}

/* ===== 后台管理 ===== */
.admin-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}
.admin-image-grid .img-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}
.admin-image-grid .img-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}
.admin-image-grid .img-item .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(220, 53, 69, 0.85);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
}