/* プロフィール画面専用スタイル */

/* ヘッダー */
.back-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
}

.page-title {
    font-size: 18px;
    font-weight: bold;
    margin: 0;
}

.edit-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
}

/* プロフィールヘッダー */
.profile-header {
    text-align: center;
    padding: 24px 16px;
    background: linear-gradient(180deg, #2196F3 0%, #42A5F5 100%);
    color: white;
}

.profile-avatar-container {
    position: relative;
    display: inline-block;
    margin-bottom: 16px;
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.profile-edit-btn {
    position: absolute;
    bottom: 0;
    right: -10px;
    padding: 2px 6px;
    border-radius: 12px;
    background: #2196F3;
    border: 2px solid white;
    color: white;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    font-weight: 500;
}

.profile-edit-btn:hover {
    background: #1976D2;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

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

.edit-text {
    font-size: 12px;
}

.avatar-text {
    font-size: 48px;
    color: #2196F3;
    font-weight: bold;
}

.profile-name {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 4px;
}

.profile-username {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.profile-location {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 12px;
}

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

.location-text {
    color: white;
}

.profile-bio {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 16px;
    padding: 0 20px;
}

/* フィッツコイン表示 */
.point-display {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 16px;
    margin: 0 20px 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.point-balance {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.point-icon {
    font-size: 24px;
    margin-right: 4px;
}

.point-amount {
    font-size: 28px;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.point-label {
    font-size: 14px;
    color: white;
    opacity: 0.9;
}

.point-details {
    display: flex;
    justify-content: space-around;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    padding-top: 12px;
}

.point-detail-item {
    text-align: center;
}

.detail-label {
    display: block;
    font-size: 11px;
    color: white;
    opacity: 0.8;
    margin-bottom: 4px;
}

.detail-value {
    display: block;
    font-size: 16px;
    font-weight: bold;
    color: white;
}

/* フィッツコイン交換リンク */
.point-exchange-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 16px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    text-decoration: none;
    color: white;
    font-size: 12px;
    transition: all 0.3s ease;
}

.point-exchange-link:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

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

.exchange-text {
    font-weight: bold;
}

/* プロフィールアクション */
.profile-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
    padding: 0 20px;
}

.friend-request-btn,
.message-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.friend-request-btn {
    background: #2196F3;
    color: white;
}

.friend-request-btn:hover {
    background: #1976D2;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.3);
}

.message-btn {
    background: white;
    color: #2196F3;
    border: 2px solid #2196F3;
}

.message-btn:hover {
    background: #E3F2FD;
}

.friend-request-btn.requested {
    background: #4CAF50;
}

.friend-request-btn.requested:hover {
    background: #45a049;
}

.more-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    padding: 16px 0 0;
    border-top: 1px solid rgba(255,255,255,0.3);
}

.stat-item {
    text-align: center;
    text-decoration: none;
    color: white;
}

.stat-item.clickable {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.stat-item.clickable:hover {
    transform: scale(1.1);
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: bold;
}

.stat-label {
    display: block;
    font-size: 12px;
    opacity: 0.8;
    margin-top: 4px;
}

/* 運動統計 */
.exercise-stats {
    padding: 20px 16px;
    background: white;
}

.section-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 16px;
    color: #333;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.stat-card {
    background: #f5f7fa;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-icon {
    font-size: 32px;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 24px;
    font-weight: bold;
    color: #2196F3;
}

.stat-unit {
    font-size: 14px;
    color: #666;
    margin-left: 2px;
}

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

/* バッジセクション */
.achievements {
    padding: 0 16px 20px;
    background: white;
}

.badge-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.badge-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.badge-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.badge-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
}

.badge-name {
    font-size: 12px;
    color: #666;
}

/* メニューリスト */
.profile-menu {
    background: white;
    padding: 8px 0;
    margin-top: 8px;
}

.menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 16px;
    background: none;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s;
    text-align: left;
}

.menu-item:hover {
    background-color: #f5f5f5;
}

.menu-item.logout {
    color: #ff4444;
    border-bottom: none;
    margin-top: 8px;
    border-top: 8px solid #f0f0f0;
}

.menu-icon {
    font-size: 20px;
    margin-right: 12px;
    min-width: 24px;
}

.menu-text {
    flex: 1;
    font-size: 16px;
    color: #333;
}

.menu-item.logout .menu-text {
    color: #ff4444;
}

.menu-arrow {
    font-size: 20px;
    color: #ccc;
    margin-left: auto;
}

/* 投稿一覧 */
.user-posts {
    background: white;
    padding: 20px 16px;
    margin-top: 8px;
}

.posts-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.post-card {
    background: #f5f7fa;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.post-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

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

.post-content {
    margin-bottom: 12px;
}

.post-text {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 8px;
}

.post-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 12px;
    color: #666;
}

.post-stats .stat {
    padding: 4px 8px;
    background: rgba(33, 150, 243, 0.1);
    border-radius: 4px;
}

.post-image {
    width: 100%;
    height: 200px;
    background: #e0e0e0;
    border-radius: 8px;
    margin-top: 8px;
}

.post-actions {
    border-top: 1px solid #e0e0e0;
    padding-top: 8px;
}

.action-counts {
    display: flex;
    gap: 16px;
}

.action-count {
    font-size: 12px;
    color: #666;
}

.show-all-posts {
    width: 100%;
    padding: 12px;
    margin-top: 8px;
    background: white;
    border: 1px solid #2196F3;
    border-radius: 8px;
    color: #2196F3;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.show-all-posts:hover {
    background: #2196F3;
    color: white;
}

/* アバターフレーム（プロフィール用） */
.profile-avatar-wrapper {
    margin: 0 auto 16px;
    display: inline-block;
}

.avatar-frame-gold {
    background: linear-gradient(45deg, #FFD700, #FFA000);
    padding: 5px;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.avatar-frame-gold .avatar-text {
    background: white;
    display: flex;
    width: 90px;
    height: 90px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* プロフィールバッジと称号 */
.profile-name-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.profile-name {
    margin: 0;
}

.profile-badge {
    font-size: 24px;
}

.profile-title {
    font-size: 14px;
    color: #FFD700;
    font-weight: bold;
    margin: -4px 0 4px 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}