/**
 * 活动详情页样式
 * 从模板中提取的所有CSS
 */

/* ===================================
   基础样式
   =================================== */
* { 
    box-sizing: border-box; 
}

.uam-activity-wrap { 
    max-width: 100%; 
    margin: 0; 
    background: #f5f5f5; 
}

.activity-page { 
    max-width: 1000px; 
    margin: 0 auto; 
    background: #fff; 
}

/* ===================================
   封面头部
   =================================== */
.hero-banner {
    position: relative;
    min-height: 350px;
    background: #333 center/cover no-repeat;
    display: flex;
    align-items: flex-end;
    color: #fff;
    will-change: background-image;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.7) 100%);
}

.hero-content {
    position: relative;
    padding: 30px 20px;
    width: 100%;
}

.hero-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.badge {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 600;
    color: #fff;
}

.badge-planning { background: #ff9800; }
.badge-ongoing { background: #4caf50; }
.badge-completed { background: #9e9e9e; }
.badge-price { background: #ffc107; color: #000; }
.badge-joined { background: #2196f3; }

.hero-content h1 {
    margin: 0 0 15px 0;
    font-size: 2em;
    line-height: 1.2;
}

.hero-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 0.95em;
    opacity: 0.95;
}

/* ===================================
   粘性操作栏
   =================================== */
.sticky-bar {
    position: sticky;
    top: 0;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    will-change: transform;
}

.sticky-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.sticky-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.sticky-info strong {
    font-size: 1em;
    color: #212529;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sticky-info .price {
    color: #f57c00;
    font-weight: 700;
}

/* ===================================
   按钮样式
   =================================== */
.sticky-action a, 
.sticky-action span {
    padding: 10px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9em;
    white-space: nowrap;
    display: inline-block;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-register {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.5);
    color: #fff;
}

.btn-joined {
    background: #e8f5e9;
    color: #2e7d32;
    border: 2px solid #66bb6a;
}

.btn-disabled {
    background: #e0e0e0;
    color: #999;
    cursor: not-allowed;
}

/* ===================================
   标签页
   =================================== */
.activity-tabs-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px 20px;
}

.activity-tabs-header {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 30px;
    position: relative;
}

.activity-tab-btn {
    padding: 15px 25px;
    background: none;
    border: none;
    font-size: 1em;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    position: relative;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.activity-tab-btn:hover {
    color: #212529;
    background: rgba(0,0,0,0.02);
}

.activity-tab-btn.active {
    color: #ff6b35;
    border-bottom-color: #ff6b35;
    background: rgba(255, 107, 53, 0.05);
}

.activity-tab-panel {
    display: none;
}

.activity-tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* ===================================
   内容区
   =================================== */
.section {
    margin-bottom: 40px;
}

.section h2 {
    font-size: 1.5em;
    color: #212529;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #212529;
}

.text-content {
    line-height: 1.8;
    color: #495057;
}

.text-content p {
    margin: 0 0 15px 0;
}

/* ===================================
   地图
   =================================== */
.map-wrapper {
    margin-bottom: 20px;
}

/* ===================================
   加载指示器
   =================================== */
.loading-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 15px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ff6b35;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-placeholder {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* ===================================
   藏点网格
   =================================== */
.spots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    contain: layout style;
}

.spot-card {
    position: relative;
    padding: 20px;
    margin-top: 10px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    contain: layout style;
}

.spot-card:hover {
    border-color: #ff6b35;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.spot-num {
    position: absolute;
    top: -10px;
    right: 15px;
    width: 32px;
    height: 32px;
    background: #ff6b35;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(255, 107, 53, 0.3);
}

.spot-card h3 {
    margin: 0 0 10px 0;
    font-size: 1.1em;
}

.spot-card h3 a {
    color: #212529;
    text-decoration: none;
    transition: color 0.2s ease;
}

.spot-card h3 a:hover {
    color: #ff6b35;
}

.spot-card p {
    color: #6c757d;
    font-size: 0.9em;
    line-height: 1.5;
    margin: 0 0 15px 0;
}

.spot-link {
    color: #ff6b35;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9em;
    transition: text-decoration 0.2s ease;
}

.spot-link:hover {
    text-decoration: underline;
}

/* ===================================
   锁定状态
   =================================== */
.locked-section {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.locked-box {
    text-align: center;
    padding: 40px 20px;
    max-width: 500px;
}

.lock-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.locked-box h3 {
    font-size: 1.5em;
    color: #212529;
    margin: 0 0 10px 0;
}

.locked-box p {
    color: #6c757d;
    margin: 0 0 25px 0;
}

.btn-unlock {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-unlock:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.5);
    color: #fff;
}

/* ===================================
   响应式设计
   =================================== */
@media (max-width: 768px) {
    .hero-banner { min-height: 250px; }
    .hero-content { padding: 20px 15px; }
    .hero-content h1 { font-size: 1.5em; }
    .hero-meta { font-size: 0.85em; }
    
    .sticky-content { 
        padding: 10px 15px; 
        flex-wrap: wrap; 
    }
    .sticky-info strong { font-size: 0.9em; }
    
    .activity-tabs-wrapper { padding: 0 15px 15px; }
    .activity-tabs-header { 
        overflow-x: auto; 
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .activity-tabs-header::-webkit-scrollbar { display: none; }
    .activity-tab-btn { 
        padding: 12px 20px; 
        font-size: 0.95em; 
        white-space: nowrap; 
    }
    
    .section h2 { font-size: 1.3em; }
    .spots-grid { grid-template-columns: 1fr; }
}

/* ===================================
   性能优化
   =================================== */
.activity-tab-btn,
.spot-card,
.btn-register,
.btn-unlock {
    backface-visibility: hidden;
    transform: translateZ(0);
}