/* 我的页面样式 */

/* 下拉刷新样式 */
.refresh-indicator {
    position: absolute;
    top: -50px;
    left: 0;
    right: 0;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.9);
    transform: translateY(-50px);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.refresh-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #ab2824;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

.refresh-text {
    font-size: 14px;
    color: #666;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.soldier-info {
    position: relative;
    z-index: 2;
    padding: 20px;
    margin-top: 20px;
}

.soldier-card {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    padding: 20px;
}

.soldier-details {
    text-align: center;
}

.soldier-title {
    font-size: 24px;
    font-weight: bold;
    color: #ab2824;
    margin-bottom: 10px;
    display: block;
}

.soldier-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.soldier-id {
  font-size: 18px;
  display: flex;
  align-items: center;
}
.soldier-id-label {
  color: #e6531d;
  font-weight: bold;
  margin-right: 4px;
}
.logout-btn {
  font-size: 16px;
  height: 36px;
  line-height: 36px;
  padding: 0 18px;
  border-radius: 8px;
  background: #dc3545;
  color: #fff;
  border: none;
  font-weight: bold;
  cursor: pointer;
  display: inline-block;
  text-align: center;
  transition: background 0.2s;
}
.logout-btn:hover {
  background: #c82333;
}

.template-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.soldier-status {
    font-size: 14px;
    color: #28a745;
    font-weight: bold;
}

.home-container {

    flex-direction: column;
    justify-content: flex-start;
    padding-bottom: 60px; /* 与底部导航栏高度一致，避免内容被遮挡 */
    margin-bottom: 0;
}

.home-content {

    flex-direction: column;
    justify-content: flex-start;
    /* 移除min-height: calc(100vh - 140px - 60px); */
}

.tabs {
    display: flex;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.tab {
    flex: 1;
    text-align: center;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab.active {
    color: #ab2824;
    border-bottom-color: #ab2824;
    font-weight: bold;
}

.tab:hover {
    color: #ab2824;
}

.tab-content {
    display: none;
    height: 70vh;
    overflow-y: auto;
}

.tab-content.active {
    display: block;

}

.scroll-content {
    padding: 10px 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 24px;

    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    /* height: 100%; */
}

.empty-tip {
    text-align: center;
    color: #999;
    padding: 40px 20px;
    font-size: 16px;
    width: 100%;
}

.media-item {
    width: calc(50% - 7.5px);
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 200px;
}

.date {
    font-size: 12px;
    color: #666;
    padding: 8px 12px 4px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.status-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.progress-container {
    position: relative;
    width: 50px;
    height: 50px;
    margin: 0 auto 8px;
}

.progress-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: 
        conic-gradient(#ab2824 0%, #ab2824 var(--progress), 
        transparent var(--progress), 
        transparent 100%);
    position: relative;
    -webkit-mask: radial-gradient(transparent 18px, #000 19px);
    mask: radial-gradient(transparent 18px, #000 19px);
}

.progress-mask {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 50%;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: bold;
    color: #ab2824;
}

.status {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.media-container {
    flex: 1;
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.media-image, .media-video {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    background: #000;
    display: block;
    margin: auto;
}

/* 全屏预览modal样式 */
.media-preview-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}
.media-preview-content {
    position: relative;
    background: transparent;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.media-preview-close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 32px;
    color: #fff;
    cursor: pointer;
    z-index: 2;
}
.media-preview-image, .media-preview-video {
    max-width: 90vw;
    max-height: 70vh;
    object-fit: contain;
    background: #000;
    border-radius: 8px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.4);
}
.media-preview-tip {
    color: #fff;
    font-size: 16px;
    margin-top: 18px;
    text-align: center;
    background: rgba(0,0,0,0.4);
    border-radius: 6px;
    padding: 6px 18px;
}

/* 视频封面播放按钮icon */
.media-video-cover {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.video-play-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 48px;
    height: 48px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.video-play-icon::before {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-left: 22px solid #fff;
    border-top: 14px solid transparent;
    border-bottom: 14px solid transparent;
    margin-left: 8px;
}

.download-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: #ab2824;
    color: white;
    border: none;
    border-radius: 16px;
    padding: 4px 12px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.download-btn:hover {
    background: #8a1f1c;
    transform: scale(1.05);
}

.order-item {
    width: 100%;
    height: 120px;
    flex-direction: column;
    margin-bottom: 15px;
    padding: 15px;
    background-color: white;
    border-radius: 12px;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.order-id {
    font-size: 12px;
    color: #000000;
}

.order-status {
    font-size: 12px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
}

.order-status.success {
    background-color: #d4edda;
    color: #155724;
}

.order-status.pending {
    background-color: #fff3cd;
    color: #856404;
}

.order-content {
    border-top: 1px solid #eee;
    padding-top: 10px;
}

.order-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-type, .order-price, .order-date {
    font-size: 12px;
    color: #000000;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .soldier-info {
        padding: 15px;
        margin-top: 15px;
    }
    
    .soldier-card {
        padding: 15px;
    }
    
    .soldier-title {
        font-size: 20px;
    }
    
    .soldier-id {
        font-size: 14px;
    }
    
    .home-container {
        margin: 15px;
    }
    
    .home-content {
        padding: 15px;
    }
    
    .tab {
        padding: 12px;
        font-size: 14px;
    }
    
    .tab-content {
        height: 40vh;
    }
    
    .scroll-content {
        gap: 10px;
    }
    
    .media-item {
        width: calc(50% - 5px);
        height: 180px;
    }
    
    .date {
        padding: 6px 10px 3px;
        font-size: 11px;
    }
    
    .status-container {
        padding: 6px;
    }
    
    .progress-container {
        width: 45px;
        height: 45px;
    }
    
    .progress-circle {
        -webkit-mask: radial-gradient(transparent 16px, #000 17px);
        mask: radial-gradient(transparent 16px, #000 17px);
    }
    
    .progress-mask {
        width: 32px;
        height: 32px;
    }
    
    .progress-text {
        font-size: 11px;
    }
    
    .status {
        font-size: 11px;
    }
    
    .download-btn {
        padding: 3px 10px;
        font-size: 10px;
        bottom: 6px;
        right: 6px;
    }
    
    .order-item {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .soldier-info {
        padding: 10px;
        margin-top: 10px;
    }
    
    .soldier-card {
        padding: 12px;
    }
    
    .soldier-title {
        font-size: 18px;
    }
    
    .soldier-id {
        font-size: 13px;
    }
    
    .template-info {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .home-container {
        margin: 10px;
    }
    
    .home-content {
        padding: 12px;
    }
    
    .tab {
        padding: 10px;
        font-size: 13px;
    }
    
    .tab-content {
        height: 65vh;
    }
    
    .scroll-content {
        gap: 8px;
    }
    
    .media-item {
        width: calc(50% - 4px);
        height: 160px;
    }
    
    .date {
        padding: 5px 8px 2px;
        font-size: 10px;
    }
    
    .status-container {
        padding: 5px;
    }
    
    .progress-container {
        width: 40px;
        height: 40px;
    }
    
    .progress-circle {
        -webkit-mask: radial-gradient(transparent 14px, #000 15px);
        mask: radial-gradient(transparent 14px, #000 15px);
    }
    
    .progress-mask {
        width: 28px;
        height: 28px;
    }
    
    .progress-text {
        font-size: 10px;
    }
    
    .status {
        font-size: 10px;
    }
    
    .download-btn {
        padding: 2px 8px;
        font-size: 9px;
        bottom: 4px;
        right: 4px;
    }
    
    .order-item {
        padding: 10px;
    }
    
    .order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
} 