/* 投稿詳細画面専用スタイル */

/* ヘッダーレイアウト調整 */
.header {
    text-align: center;
    position: relative;
}

/* 戻るボタン */
.back-btn {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background-color: rgba(255,255,255,0.1);
}

/* ページタイトル */
.page-title {
    font-size: 18px;
    font-weight: bold;
    margin: 0;
}

/* 共有ボタン */
.share-btn {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.share-btn:hover {
    background-color: rgba(255,255,255,0.1);
}

/* 投稿詳細 */
.post-detail {
    background-color: white;
    margin-bottom: 16px;
}

.post-header {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #e0e0e0;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #ddd;
    margin-right: 12px;
}

.user-info {
    flex: 1;
}

.user-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 4px 0;
}

.post-time {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* 投稿内容 */
.post-content {
    padding: 16px;
}

.post-description {
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    margin: 0 0 20px 0;
}

/* 運動統計 */
.exercise-stats {
    margin-bottom: 24px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    background-color: #f8f9fa;
    padding: 16px;
    border-radius: 12px;
}

.stat-item {
    text-align: center;
}

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

.stat-value {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: #2196F3;
}

/* 心拍数グラフ */
.heartrate-graph-container {
    margin-bottom: 24px;
}

.heartrate-graph {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 80px;
    background-color: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    gap: 1px;
}

.heartrate-bar {
    background-color: #ff4757;
    width: 2px;
    min-height: 2px;
    border-radius: 1px;
    transition: all 0.3s ease;
}

.heartrate-bar:hover {
    background-color: #ff3742;
}

/* スピードグラフ */
.speed-graph-container {
    margin-bottom: 24px;
}

.graph-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 12px 0;
}

.speed-graph {
    display: flex;
    align-items: flex-end;
    height: 80px;
    gap: 1px;
    background-color: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
}

.speed-bar {
    background-color: #2196F3;
    width: 2px;
    min-height: 2px;
    border-radius: 1px;
    transition: all 0.3s ease;
}

.speed-bar:hover {
    background-color: #1976D2;
}

/* ルートマップ */
.route-map {
    margin-bottom: 20px;
}

.map-placeholder {
    background-color: #f8f9fa;
    border: 2px dashed #ddd;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    color: #666;
}

.map-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 8px;
}

.map-placeholder p {
    margin: 0;
    font-size: 16px;
}

/* アクションボタン */
.post-actions {
    display: flex;
    justify-content: space-around;
    padding: 16px;
    border-top: 1px solid #e0e0e0;
    border-bottom: 8px solid #f5f5f5;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.like-btn {
    color: #4CAF50;
}

.like-btn:hover {
    background-color: rgba(76, 175, 80, 0.1);
}

.ouen-btn {
    color: #FF9800;
}

.ouen-btn:hover {
    background-color: rgba(255, 152, 0, 0.1);
}

.comment-btn {
    color: #2196F3;
}

.comment-btn:hover {
    background-color: rgba(33, 150, 243, 0.1);
}

.action-icon {
    font-size: 16px;
}

.action-count {
    font-weight: 600;
}

/* コメントセクション */
.comments-section {
    background-color: white;
    padding: 16px;
}

.comments-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.comments-list {
    margin-bottom: 20px;
}

.comment-item {
    display: flex;
    margin-bottom: 16px;
    align-items: flex-start;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #ddd;
    margin-right: 12px;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 12px;
}

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

.comment-user {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.comment-time {
    font-size: 12px;
    color: #666;
}

.comment-text {
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    margin: 0;
}

/* コメント入力 */
.comment-input-container {
    border-top: 1px solid #e0e0e0;
    padding-top: 16px;
}

.comment-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-input {
    flex: 1;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.comment-input:focus {
    border-color: #2196F3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

.send-comment-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background-color: #2196F3;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.send-comment-btn:hover {
    background-color: #1976D2;
    transform: scale(1.05);
}

.send-comment-btn:active {
    transform: scale(0.95);
}

.send-icon {
    font-size: 14px;
}

/* レスポンシブ対応 */
@media (max-width: 430px) {
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 12px;
    }
    
    .stat-value {
        font-size: 16px;
    }
    
    .post-actions {
        padding: 12px;
    }
    
    .action-btn {
        padding: 6px 8px;
        font-size: 13px;
    }
    
    .comment-item {
        margin-bottom: 12px;
    }
    
    .comment-avatar {
        width: 32px;
        height: 32px;
        margin-right: 10px;
    }
    
    .comment-content {
        padding: 10px;
    }
}