/* ============================================
   首页样式 - index.html
   包含：卡片网格、视频播放组件
   ============================================ */

/* 卡片网格 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}
/* 天气信息卡片 */
.weather-card {
    grid-column: 1 / -1; /* 新增：横跨从第一列到最后一列，独占一行 */
    
    padding: 12px 10px;
   
    
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 85px;
    border-radius: 15px;
}



/* 数据卡片 */
.data-card {
    padding: 12px 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 85px;
    border-radius: 15px;
}

.card-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.card-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.card-value {
    font-size: 16px;
    font-weight: bold;
    color: var(--accent-color);
}

/* 云数据、风数据换行显示 */
#val-cloud,
#val-wind {
    white-space: pre-wrap;
}

/* ============================================
   视频播放组件
   ============================================ */
.video-section {
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 20px;
}

.video-section-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 15px;
    text-align: center;
}

.video-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 比例 */
    border-radius: 15px;
    overflow: hidden;
    background: #1a1a2e;
    box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
}

.video-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 15px;
    object-fit: contain;
    background: #000;
}

.video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: rgba(0,0,0,0.25);
    transition: opacity 0.3s;
}

.video-play-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.play-icon {
    font-size: 50px;
    color: rgba(255,255,255,0.9);
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    transition: transform 0.2s;
}

.video-play-overlay:active .play-icon {
    transform: scale(0.9);
}

.video-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
}

.video-upload-time {
    font-size: 12px;
    color: #888;
}

.video-fullscreen-btn {
    padding: 8px 18px;
    font-size: 13px;
    font-weight: bold;
    color: var(--accent-color);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    background: var(--bg-color);
    box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
    transition: 0.2s;
}

.video-fullscreen-btn:active {
    box-shadow: inset 2px 2px 4px var(--shadow-dark), inset -2px -2px 4px var(--shadow-light);
}
