/* チーム画面専用スタイル */

/* チーム情報セクション */
.team-info {
    padding: 16px;
    background-color: #f8f9fa;
    border-bottom: 8px solid #f5f5f5;
}

.team-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.team-avatar {
    width: 60px;
    height: 60px;
    background-color: #f0f0f0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-right: 16px;
    overflow: hidden;
}

.team-icon {
    font-size: 28px;
    line-height: 1;
}

.team-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-details {
    flex: 1;
}

.team-name {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin: 0 0 4px 0;
}

.team-members {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.team-members-link {
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.team-members-link:hover {
    color: #2196F3;
    text-decoration: underline;
}

.team-members-link::after {
    content: '›';
    font-size: 16px;
    color: #999;
    transition: transform 0.3s ease;
}

.team-members-link:hover::after {
    transform: translateX(3px);
}

.team-stats {
    display: flex;
    gap: 16px;
}

.team-stat {
    flex: 1;
    background-color: white;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

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

.team-stat .stat-label {
    font-size: 12px;
    color: #666;
}

/* チームチャットボタン（控えめなスタイル） */
.team-chat-btn {
    width: 100%;
    background-color: transparent;
    color: #666;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.team-chat-btn:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
    color: #333;
}

.team-chat-btn:active {
    background-color: #e0e0e0;
}

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

.chat-text {
    font-size: 14px;
}

/* チームアクションセクション */
.team-actions {
    padding: 16px;
}

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

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

.filter-buttons {
    display: flex;
    gap: 8px;
}

.filter-btn {
    background-color: transparent;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 4px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.filter-btn.active {
    background-color: #2196F3;
    color: white;
    border-color: #2196F3;
}

.filter-btn:hover:not(.active) {
    background-color: #f5f5f5;
}

/* アクションリスト */
.actions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-item {
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.action-time {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

.action-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.action-content .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #ddd;
    flex-shrink: 0;
}

.action-details {
    flex: 1;
    line-height: 1.4;
}

.user-name {
    font-weight: 600;
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.user-name:hover {
    color: #2196F3;
    text-decoration: underline;
}

.action-type {
    font-weight: 600;
    color: #2196F3;
}

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

/* クリック可能なアクションアイテム */
a.action-item-link {
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
    transition: all 0.2s ease;
}

a.action-item-link:hover {
    background-color: #f8f9fa;
    border-color: #2196F3;
}

a.action-item-link .action-content {
    position: relative;
}

.action-arrow {
    font-size: 20px;
    color: #ccc;
    margin-left: auto;
    padding-left: 12px;
    transition: all 0.2s ease;
}

a.action-item-link:hover .action-arrow {
    color: #2196F3;
    transform: translateX(3px);
}

a.action-item-link .user-name {
    color: #333;
    font-weight: 600;
}

/* ヘッダーの設定ボタン */
.team-settings-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    color: white;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: absolute;
    right: 16px;
}

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

/* チーム詳細ページ専用スタイル */
.join-team-btn {
    width: 100%;
    padding: 16px;
    margin-top: 16px;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

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

.join-icon {
    font-size: 18px;
}

.team-description {
    margin-top: 8px;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    text-align: center;
}

.recent-activities {
    border-bottom: 8px solid #f5f5f5;
    padding: 16px;
}

.activity-list {
    background: white;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid #e0e0e0;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
    border-radius: 50%;
}

.activity-info {
    flex: 1;
}

.activity-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.activity-details {
    font-size: 12px;
    color: #666;
    margin: 0;
}

.team-ranking {
    padding: 16px;
}

.team-ranking .ranking-list {
    background: white;
}

.team-ranking .ranking-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #e0e0e0;
}

.team-ranking .ranking-item:last-child {
    border-bottom: none;
}

.team-ranking .rank-number {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
    border-radius: 50%;
    font-weight: bold;
    color: #666;
}

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

.member-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.member-distance {
    font-size: 14px;
    font-weight: bold;
    color: #2196F3;
    margin: 0;
}

/* すでに参加しているチームの場合のスタイル */
.already-member-btn {
    width: 100%;
    padding: 16px;
    margin-top: 16px;
    background-color: #e0e0e0;
    color: #666;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: not-allowed;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.already-member-btn .join-icon {
    font-size: 18px;
}

/* チームメンバー画面のスタイル */
.members-list {
    background: white;
}

.member-section {
    background: white;
    margin-bottom: 8px;
}

.member-section .section-title {
    font-size: 14px;
    font-weight: bold;
    color: #666;
    padding: 12px 16px 8px;
    margin: 0;
    background: #f5f5f5;
}

.member-card {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    transition: background-color 0.2s;
}

.member-card:hover {
    background-color: #f5f5f5;
}

.member-card:last-child {
    border-bottom: none;
}

.member-card .member-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    position: relative;
    font-size: 20px;
    font-weight: bold;
    color: white;
}

.member-avatar.owner {
    background: linear-gradient(45deg, #FFD700, #FFA000);
}

.member-avatar.admin {
    background: linear-gradient(45deg, #2196F3, #1976D2);
}

.member-avatar:not(.owner):not(.admin) {
    background: #4CAF50;
}

/* アバターフレーム */
.member-avatar.avatar-frame-gold {
    background: linear-gradient(45deg, #FFD700, #FFA000);
    padding: 2px;
}

.member-avatar.avatar-frame-gold .avatar-text {
    background: white;
    border-radius: 50%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFD700;
    font-size: 18px;
}

.member-avatar.avatar-frame-rainbow {
    background: linear-gradient(45deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #8b00ff);
    padding: 2px;
}

.member-avatar.avatar-frame-rainbow .avatar-text {
    background: white;
    border-radius: 50%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9400d3;
    font-size: 18px;
}

.member-avatar.avatar-frame-fire {
    background: linear-gradient(45deg, #ff4444, #ff8800);
    padding: 2px;
}

.member-avatar.avatar-frame-fire .avatar-text {
    background: white;
    border-radius: 50%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff4444;
    font-size: 18px;
}

.member-avatar.avatar-frame-nature {
    background: linear-gradient(45deg, #4caf50, #81c784);
    padding: 2px;
}

.member-avatar.avatar-frame-nature .avatar-text {
    background: white;
    border-radius: 50%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4caf50;
    font-size: 18px;
}

.role-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    font-size: 16px;
    background: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.member-card .member-info {
    flex: 1;
}

.member-card .member-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 4px;
}

.member-joined {
    font-size: 12px;
    color: #999;
    margin: 0;
}

.member-badge {
    font-size: 14px;
    display: inline-block;
}

.member-title {
    font-size: 12px;
    color: #999;
    margin: 0;
    font-style: italic;
}

.member-status {
    font-size: 13px;
    color: #666;
    margin: 4px 0 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-total-time {
    font-size: 13px;
    color: #666;
    margin: 4px 0 0;
}

.member-action {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.member-action:hover {
    background-color: #e0e0e0;
}

.show-more-btn {
    width: 100%;
    padding: 16px;
    background: none;
    border: none;
    color: #2196F3;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.show-more-btn:hover {
    background-color: #f5f5f5;
}

/* レスポンシブ対応 */
@media (max-width: 430px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .filter-buttons {
        align-self: stretch;
        justify-content: center;
    }
    
    .team-stats {
        flex-direction: column;
        gap: 8px;
    }
    
    .team-stat {
        padding: 8px;
    }
    
    .team-stat .stat-value {
        font-size: 16px;
    }
}