/* 主隊伍頁面樣式 */

/* 導航樣式擴展 */
.nav-link {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background-color: #f0f5ff;
    color: #4a7bff;
}

.nav-link.active {
    color: #4a7bff;
    background-color: #f0f5ff;
}

.nav-link i {
    margin-right: 8px; /* 圖示與文字間距 */
}

.login {
    margin-left: 15px;
    color: #4a7bff; /* 與 .btn-outline 的文字顏色一致 */
}

.login:hover {
    background-color: #e6f0ff; /* 淺藍色背景，與主題一致 */
    color: #4a7bff;
}

.logout {
    color: #f44336;
}

.logout:hover {
    background-color: #fff5f5;
    color: #f44336;
}

/* 主要內容佈局 */
.main-content {
    padding: 30px 0;
}

.page-layout {
    display: flex;
    gap: 30px;
}

/* 側邊欄樣式 */
.sidebar {
    width: 250px;
    flex-shrink: 0;
}

.user-profile {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #e6f0ff;
    color: #4a7bff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 2rem;
}

.user-profile h3 {
    margin-bottom: 5px;
    color: #333;
}

.status {
    color: #4caf50;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.user-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #4a7bff;
}

.stat-label {
    font-size: 0.8rem;
    color: #666;
}

/* 主內容區域樣式 */
.content {
    flex-grow: 1;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.content-header h2 {
    margin: 0;
    color: #333;
}

/* 過濾器樣式 */
.filters {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 5px;
}

.filter-group label {
    color: #555;
    font-size: 0.9rem;
}

.filter-group select,
.filter-group input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.search-btn {
    padding: 8px 12px;
}

/* 隊伍列表樣式 */
.team-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.team-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.team-card-header {
    padding: 15px 20px;
    background-color: #f9f9f9;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.team-card-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.2rem;
}

.team-type {
    font-size: 0.8rem;
    padding: 3px 8px;
    border-radius: 15px;
    font-weight: 500;
    color: #ff692e; /* 團隊類型字體顏色 */
}

.team-type.sport {
    background-color: #e1f5fe;
    color: #0288d1;
}

.team-type.study {
    background-color: #e8f5e9;
    color: #388e3c;
}

.team-type.project {
    background-color: #fff8e1;
    color: #ffa000;
}

.team-type.game {
    background-color: #f3e5f5;
    color: #8e24aa;
}

.team-card-body {
    padding: 15px 20px;
    flex-grow: 1;
}

.team-description {
    margin-bottom: 15px;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
    height: 60px;
    overflow: hidden;
}

.team-meta {
    display: flex;
    justify-content: space-between;
    color: #777;
    font-size: 0.9rem;
}

.team-members, .team-location {
    display: flex;
    align-items: center;
    gap: 5px;
}

.team-card-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: center;
}

.join-btn {
    width: 100%;
}

/* 隊伍類型標籤樣式 */
.team-types {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}

.team-type-tag {
    background-color: #f0f5ff;
    color: #4a7bff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* 類型選擇樣式 */
.type-selection {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#types-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 5px 0;
}

.type-item {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.type-item input[type="checkbox"] {
    cursor: pointer;
}

/* 新增類型模態框樣式 */
.custom-type-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

#add-custom-type {
    align-self: flex-start;
}

/* 分頁控制樣式 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
}

.pagination-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    background-color: white;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-btn:hover:not([disabled]) {
    background-color: #f0f5ff;
    border-color: #4a7bff;
    color: #4a7bff;
}

.pagination-btn.active {
    background-color: #4a7bff;
    border-color: #4a7bff;
    color: white;
}

.pagination-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 響應式設計 */
@media (max-width: 992px) {
    .page-layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .user-profile {
        display: flex;
        align-items: center;
        text-align: left;
        padding: 15px;
    }
    
    .avatar {
        width: 60px;
        height: 60px;
        margin: 0 15px 0 0;
        font-size: 1.5rem;
    }
    
    .user-stats {
        margin: 0 0 0 auto;
        border-top: none;
        padding-top: 0;
    }
}

@media (max-width: 768px) {
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .filters {
        width: 100%;
    }
    
    .team-list {
        grid-template-columns: 1fr;
    }
    
    .user-profile {
        flex-direction: column;
        text-align: center;
    }
    
    .avatar {
        margin: 0 auto 15px;
    }
    
    .user-stats {
        margin: 15px auto 0;
        width: 100%;
        border-top: 1px solid #eee;
        padding-top: 15px;
    }
}