/* Activities Page Styles */

/* 页面整体布局调整 */
.activities-page {
    padding-bottom: 80px !important;
}

/* 数据概览区域 */
.yearly-summary {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid #333;
}

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

.summary-header h2 {
    margin: 0;
    color: #fff;
    font-size: 24px;
}

.summary-actions {
    display: flex;
    gap: 10px;
}

.summary-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
}

.summary-stat-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.summary-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.stat-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #fc4c02;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 月度统计区域 */
.monthly-stats-section {
    background: #2d2d2d;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid #404040;
}

.monthly-stats-section h3 {
    margin: 0 0 16px 0;
    color: #fff;
    font-size: 18px;
}

.monthly-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px;
}

.monthly-stat-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 16px 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: all 0.2s;
}

.monthly-stat-card:hover {
    background: rgba(252, 76, 2, 0.1);
    border-color: rgba(252, 76, 2, 0.3);
}

.monthly-stat-card.active {
    background: rgba(252, 76, 2, 0.15);
    border-color: #fc4c02;
}

.month-name {
    font-size: 13px;
    color: #999;
    margin-bottom: 6px;
}

.month-count {
    font-size: 20px;
    font-weight: bold;
    color: #fff;
}

.month-distance {
    font-size: 12px;
    color: #fc4c02;
    margin-top: 4px;
}

/* 活动列表区域 */
.activities-list-section {
    background: #2d2d2d;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #404040;
}

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

.list-header h3 {
    margin: 0;
    color: #fff;
    font-size: 18px;
}

.list-filters {
    display: flex;
    gap: 10px;
}

.filter-select {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #555;
    background: #1a1a1a;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}

/* 活动表格 */
.activities-table-container {
    overflow-x: auto;
    margin-bottom: 16px;
}

.activities-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.activities-table th {
    text-align: left;
    padding: 14px 12px;
    color: #999;
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #404040;
    white-space: nowrap;
}

.activities-table td {
    padding: 14px 12px;
    color: #fff;
    border-bottom: 1px solid #333;
    vertical-align: middle;
}

.activities-table tbody tr {
    transition: background 0.15s;
}

.activities-table tbody tr:hover {
    background: rgba(252, 76, 2, 0.05);
}

.activity-name {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.activity-date {
    color: #999;
    font-size: 13px;
    white-space: nowrap;
}

.activity-time-display {
    color: #ccc;
    font-size: 13px;
}

.distance-value {
    color: #fc4c02;
    font-weight: 500;
}

.speed-value {
    color: #4ecdc4;
}

.elevation-value {
    color: #95e1d3;
}

.gear-info {
    font-size: 12px;
    color: #888;
}

.loading-cell {
    text-align: center;
    padding: 40px !important;
}

/* 操作按钮 */
.action-btn {
    background: none;
    border: none;
    color: #fc4c02;
    cursor: pointer;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 4px;
    transition: background 0.2s;
}

.action-btn:hover {
    background: rgba(252, 76, 2, 0.1);
}

/* 分页控件 */
.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #404040;
}

.pagination-info {
    color: #999;
    font-size: 14px;
}

.pagination-buttons {
    display: flex;
    gap: 10px;
}

/* 无数据状态 */
.no-data-message {
    text-align: center;
    padding: 60px 20px;
    background: #2d2d2d;
    border-radius: 16px;
    border: 1px solid #404040;
}

.no-data-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.no-data-message h3 {
    color: #fff;
    margin: 0 0 12px 0;
}

.no-data-message p {
    color: #999;
    margin: 8px 0;
}

.no-data-message .btn {
    margin-top: 20px;
}

/* 认证提示 */
.auth-required-message {
    text-align: center;
    padding: 60px 20px;
    background: #2d2d2d;
    border-radius: 16px;
    border: 1px solid #404040;
}

.auth-required-message p {
    color: #999;
    font-size: 16px;
}

.auth-required-message a {
    color: #fc4c02;
    text-decoration: none;
}

.auth-required-message a:hover {
    text-decoration: underline;
}

/* 活动详情模态框 */
.activity-detail-modal-content {
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
}

.activity-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #404040;
}

.activity-detail-title {
    font-size: 22px;
    color: #fff;
    margin: 0 0 8px 0;
}

.activity-detail-date {
    color: #999;
    font-size: 14px;
}

.activity-detail-close {
    font-size: 28px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 0 8px;
}

.activity-detail-close:hover {
    color: #fff;
}

.activity-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.activity-detail-stat {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.activity-detail-stat-label {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.activity-detail-stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #fc4c02;
}

.activity-detail-stat-unit {
    font-size: 14px;
    color: #999;
    margin-left: 4px;
}

.activity-detail-description {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 20px;
}

.activity-detail-description-label {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.activity-detail-description-text {
    color: #ccc;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
}

.strava-link {
    display: inline-block;
    margin-top: 20px;
    color: #fc4c02;
    text-decoration: none;
    font-size: 14px;
}

.strava-link:hover {
    text-decoration: underline;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .summary-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .activity-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .activities-table th:nth-child(7),
    .activities-table td:nth-child(7) {
        display: none;
    }
    
    .pagination-controls {
        flex-direction: column;
        gap: 12px;
    }
}
